API Queries - Add Keyword
The add_keyword function creates a new Keyword. This function requires additional parameters. Failing to include them will result in an error response.
- keyword - Keyword to be added. Does not accept multiple keywords. (Required)
- campaign - Name of the campaign folder where the keyword is to be added. (Required)
- max_bid - Maximum bid for the keyword. (Required)
- daily_limit - Daily spend limit for the keyword. (Required)
- negative - Any negative keywords, comma separated. (Optional)
- target_url - The Target URL, including http:// (Required)
- geo_target - The Geo Target, either "all", "us", "uk", "ca", "au", "nz", "in", "br", "de", "fr", "nl", "it", or "es". (Required)
Note: Make sure to URL encode all values, most importantly the target_url value.
Example query and response:
In this example, we will be adding the keyword "credit cards" to the campaign folder "Student Loans" with a maximum bid of $5, daily spend of $200, negative keyword "interest free", target URL http://www.trellian.com and geo target of "US".
Note the URL encoding on the values.
The above response means that the Keyword was successfully created and will be in the "Paused" status. It will be automatically activated once approved by our system.
Possible error responses for this function are:
- 412 - Keyword required
- 421 - Keyword Invalid
- 422 - Negative Keyword(s) Invalid
- 423 - Maximum Bid Invalid
- 424 - Daily Limit Invalid
- 425 - Target URL Invalid
- 429 - Geo Target Invalid
- Other general errors, such as 200 - Internal Error or 300 - Username or password invalid.
For a complete list of error responses, see the Error Codes manual page.