API Queries - List Traffic Opportunities

The list_traffic_opportunities function shows the new traffic opportunities for one of your direct Keywords: Subids that are not available at your current bid, with the recommended (minimum) bid for each. This is the same list shown under "New Traffic Opportunities" when editing a Keyword in the dashboard. Subids already in your whitelist or blacklist are not included.


Additional Parameters

  • keyword - Name of the Keyword. (Required)
  • traffic_type - The traffic type, either "desktop", "mobile" or "all". (Required)
  • geo_target - The Geo Target of the Keyword, either "all" or a country code from the Country List. (Required)
  • type - Specifies the format of the API response: "json" for JSON, "csv" or "excel" for CSV; otherwise, the response will be in XML. Error responses are JSON for "json" and XML for all other types. (Optional)

Note: Make sure to URL encode all values.

Note: Results are sorted by recommended bid, highest first. To buy traffic from a Subid, add it to the Keyword's whitelist at or above its recommended bid using Update Keyword with the wl_subid and premium_bid parameters.


Example query and response:

Example query:

https://www.trillion.com/api.html?mode=list_traffic_opportunities&keyword=credit%20cards&traffic_type=all&geo_target=us

Use Trillion Direct API key in place of Bearer Token.

Response (XML):

<results>
<result Recommended_Bid="0.35" Subid="1059815679"/>
<result Recommended_Bid="0.12" Subid="2045611873"/>
</results>

Response (JSON):



                {
                "results": [ 
                {
                "Subid": "1059815679",
                "Recommended_Bid": "0.35"
                },
                {
                "Subid": "2045611873",
                "Recommended_Bid": "0.12"
                }
                ]
                }
            

If there are no traffic opportunities for the Keyword, the response will not be an error. Instead, this will be shown:

<results/>

    {
    "results": [ ]
    }

Error Responses:

Possible error responses for this function are:

For a complete list of error responses, see the Error Codes manual page.