Customer Support
Trillion Direct Search Network
API Manual
API Queries - Update Keyword
The update_keyword function allows you to change settings or the status of an existing Keyword. This function requires additional parameters. Although optional parameters are not all required, at least one must be included. Failing to include required parameters or at least one optional will result in an error response.
Additional Parameters
- keyword - Name of Keyword to update. (Required)
- traffic_type - The traffic type, either "desktop", "mobile" or "all". (Required)
- my_bid - Your bid for the keyword. (Optional)
- daily_limit - Daily spend limit for the keyword. (Optional)
- negative - Any negative keywords, comma separated. (Optional)
Note: If this attribute is defined, any previous negative keywords will be replaced with the new ones. - target_url - The Target URL, including http:// (Optional)
- active - To Stop or Activate the keyword, use values 0 or 1, respectively. (Optional)
- geo_target - The Geo Target, either "all", "us", "uk", "ca", "au", "nz", "in", "br", "de", "fr", "nl", "it", or "es". (Required)
- freq_cap - Limit on number of visits per unique user in 24 hour period. Choose from "3", "6" or "12". (Optional)
- bl_subid - Adds subid to blacklist. (Optional)
- del_bl_subid - Removes blacklisted subid. (Optional)
- wl_subid - Adds subid to whitelist. (Optional)
- premium_bid - Premium bid amount for whitelisted subid. (Required)
- other_subid_traffic - Allow traffic from whitelisted subids plus all other subids associated with this campaign.
On is 1 and off is 0. Default is 1 (on). (Optional) - del_wl_subid - Removes subid from whitelist. (Optional)
- remarketing_multiple - Set your max bid for the remarketed visit at multiple times the original cpc price. Minimum is "2". "0" means to turn remarketing off. (Optional)
Notes:
- The traffic_type and geo_target parameters are used to select the correct keyword and will not be changed.
- Make sure to URL encode all values, most importantly the target_url value.
Example queries and responses:
- In this example, we will be stopping the keyword "credit cards" with the geo target "all" and the traffic type "mobile".
Example query:
https://bid.trellian.com/api.html?username=user&api_key=key&mode=update_keyword&
keyword=credit%20cards&geo_target=all&traffic_type=mobile&active=0Note the URL encoding on the values.
Response:
<results> <result Setting="Active" Success="1" Value="0"/> </results>
The result for the setting update will be shown (represented by Success="1", meaning it was successful). The above response means that the Keyword's status is now stopped (represented by Value="0").
- In this example, we will be updating the keyword "credit cards" with the geo target "all" and traffic type "desktop" to a bid of $5, daily spend of $200, negative keyword "interest free", target URL http://www.trellian.com.
Example query:
https://bid.trellian.com/api.html?username=user&api_key=key&mode=update_keyword&
keyword=credit%20cards&traffic_type=desktop&my_bid=5.00&daily_limit=200.00&negative=interest%20free&
target_url=http%3A%2F%2Fwww.trellian.com&geo_target=allNote the URL encoding on the values.
Response:
<results> <result Setting="NegativeKeywords" Success="1" Value="interest free"/> <result Setting="MaxBid" Success="1" Value="$5.000"/> <result Setting="DailySpendLimit" Success="1" Value="$200.00"/> <result Setting="TargetUrl" Success="1" Value="http://www.Trillion.com"/> </results>
The result for each setting update will be shown (represented by Success="1", meaning it was successful). If the setting could not be updated for any reason, the result for that setting will be Success="0". If any of your values were the incorrect format or out of range, an error response will be returned and no settings will be updated.
- In this example, we will be updating the keyword "credit cards" with the geo target "all" and traffic type "desktop" to a premium bid on the subid 123456 of $20.
Example query:
https://bid.trellian.com/api.html?username=user&api_key=key&mode=update_keyword&
keyword=credit%20cards&traffic_type=desktop&geo_target=all&wl_subid=123456&premium_bid=20Note the URL encoding on the values.
Response:
<results> <result Setting="WhiteListSubID" Success="1" Value="123456"/> </results>
Error Responses:
Possible error responses for this function are:
- 401 - Multiple Sub ID actions not supported.
- 412 - Keyword is a required argument for this mode.
- 412 - Traffic Type is a required argument for this mode.
- 412 - Geo Target is a required argument for this mode.
- 412 - Premium Bid is a required argument for parameter Whitelist Subid.
- 413 - No changes were requested.
- 420 - Keyword not found.
- 420 - Subid ###### does not exist.
- 420 - Subid ###### is blacklisted. Please delete first before whitelisting.
- 420 - Subid ###### not in whitelist.
- 420 - Subid ###### not in blacklist.
- 420 - Subid ###### is whitelisted. Please delete first before blacklisting.
- 421 - Keyword may only contain letters, digits or spaces.
- 421 - Traffic Type may only be "all","mobile","desktop".
- 421 - Target URL entered is invalid.
- 421 - Frequency Cap for Keywords may only be "3","6","12".
- 421 - Remarketing Multiple must be integer which is equal to or greater than 2.
- 422 - Negative keyword list must be comma separated, and keywords may only contain letters, digits and spaces.
- 423 - My Bid must contain digits and an optional decimal point only.
- 423 - Sorry, the entered bid is not valid. Bid should be entered in a valid format (2 decimal places).
- 423 - Sorry, the bid amount is outside the allowed range. My Bid should be no more than $100.
- 423 - Premium Bid must be numeric.
- 423 - Your Premium Bid must be less than or equal to $100.
- 424 - Subid must be numeric.
- 424 - Daily Limit must contain digits and an optional decimal point only, or be left blank to have no limit set.
- 424 - Sorry, the Daily Limit amount is outside the allowed range. Limit must be no less than $10.00 and no greater than $10000.00.
- 424 - Subid invalid.
- 424 - Subid not blacklisted as it exceeds limit on campaign.
- 425 - Target URL is not in valid format.
- 429 - Geo Target is invalid.
- 429 - Other Subid Traffic may only be "1" or "0".
- 429 - Your Premium Bid does not meet the required bid for this Subid. Please increase your bid to at least $##.##.
- Other general errors, such as 200 - Internal Error or 300 - Username or API Key invalid.
For a complete list of error responses, see the Error Codes manual page.