Keyword¶
Abstract¶
The Keyword object specifies the search keyword phrase that you would like to target.
Overview¶
Using this service, you can set and manage keyword match types as well as keyword-level bids. Note that bids that are set at the keyword level override bids that are set at higher levels.
Fields¶
The Keyword object contains the following fields:
Name |
Description |
Type |
Add |
Update |
---|---|---|---|---|
|
The ID of the advertiser associated with the keyword. This field cannot be updated. |
long |
Required |
Optional (Read-Only) |
|
Keywords can carry bids that override any bids set at the ad group level. See the example representation below for an example on how to set a bid at the keyword level. In order to clear a bid for a given keyword, pass in an empty bid value when updating the keyword. Note that this is not applicable for negative keywords ( |
|
Required |
Optional |
|
Specifies whether to exclude ( |
enum |
Required |
Optional |
|
The ID of the keyword. |
long |
N/A |
Required |
|
The serving matching algorithm. Supported match types: For positive keywords (
For negative keywords (
|
enum |
Required |
Optional. Note that |
|
The ID of the ad group the keyword belongs to. If it is a negative keyword ( |
long |
Required |
Required |
|
The type of parent. For a keyword object, this value is typically ADGROUP. It can also be CAMPAIGN for negative keywords ( |
enum |
Required |
Required |
|
The status of the keyword. Valid input values are:
The |
enum |
Required |
Optional |
|
The editorial status of the ad. Valid values are:
The |
enum |
Read-only |
Read-only |
|
The actual keyword. Maximum limit is 255 characters. Please note that value for an existing keyword cannot be updated. In order to update this field, a new keyword must be created. Therefore this field will be ignored if passed when attempting to update a keyword. |
string |
Required |
Optional |
|
The values that are substituted at serve time within the Ad “ |
|
Optional |
Optional |
|
The landing page URL is the web address that a user is sent to after clicking on the ad triggered by the keyword. A URL set at the keyword level overrides the landing URL set at the ad level. Maximum limit is 2048 characters. Not applicable for negative keywords ( |
|
Optional |
Optional |
The Entity Status and Editorial Status

v3 Upgraded URL Attributes¶
Important
For the v3 Yahoo Native API, Upgraded URL (UU) attributes are now supported for the Keyword object type.
The following table describes the supported UU attributes per the Keyword object type.
Object |
Landing Url |
Display Url |
Final Url |
Mobile Final Url |
Tracking Template |
Custom Parameters |
Display Url Path1 |
Display Url Path2 |
---|---|---|---|---|---|---|---|---|
Keyword |
dp |
no |
yes |
yes |
yes |
yes |
no |
no |
Note
dp stands for deprecated in the above table.
Note
The landing page url is deprecated only for search. The Final url is eligible in a native context. Native-only ads are not required to use the final URL and may continue to use the landing page url.
For more information on Upgraded URLs in v3, refer to Upgraded URLs.
Keyword level statuses¶
Any new keyword undergoes automatic quality review. If no issues are raised, the keyword can start running less than a minute after its creation. A keyword can be in one of the following statuses:
Status |
Description |
---|---|
|
The keyword is running. |
|
The keyword is paused and can be re-activated. |
|
The keyword was declined due to policy violations; further information is available in the Ad Manager UI. |
|
Set the status of the keyword to |
Endpoint¶
Resource URI
https://api.gemini.yahoo.com/v3/rest/keyword/
Example Representations¶
Keyword
{
"value": "Your keyword 1",
"id": 282782226512,
"status": "ACTIVE",
"advertiserId": 11610,
"parentType": "ADGROUP",
"parentId": 7237162494,
"landingUrl": "https://www.yahoo.com",
"exclude": "FALSE",
"bidSet": {
"id": null,
"bids": [
{
"priceType": "CPC",
"value": 2,
"channel": "SEARCH"
}
]
},
"matchType": "EXACT"
"adParamValues": null
}
Keyword Array
[
{
"value": "Your keyword 1",
"id": 282782226512,
"status": "ACTIVE",
"advertiserId": 11610,
"parentType": "ADGROUP",
"parentId": 7237162494,
"landingUrl": "https://www.yahoo.com",
"exclude": "FALSE",
"bidSet": {
"id": null,
"bids": [
{
"priceType": "CPC",
"value": 2,
"channel": "SEARCH"
}
]
},
"matchType": "EXACT",
"adParamValues": null
},
{
"value": "Your keyword 2",
"id": 282782226513,
"status": "ACTIVE",
"advertiserId": 11610,
"parentType": "ADGROUP",
"parentId": 7237162494,
"landingUrl": "https://www.yahoo.com",
"exclude": "FALSE",
"bidSet": {
"id": null,
"bids": [
{
"priceType": "CPC",
"value": 1.5,
"channel": "SEARCH"
}
]
},
"matchType": "EXACT",
"adParamValues": null
}
]
Keyword Response
{
"errors": null,
"response": {
"value": "Your keyword 1",
"id": 282782226512,
"status": "ACTIVE",
"advertiserId": 11610,
"parentType": "ADGROUP",
"parentId": 7237162494,
"landingUrl": "https://www.yahoo.com",
"exclude": "FALSE",
"bidSet": {
"id": null,
"bids": [
{
"priceType": "CPC",
"value": 2,
"channel": "SEARCH"
}
]
},
"matchType": "EXACT"
"adParamValues": null
}
}
Example Representation of UU¶
The following is a JSON snippet of UU attributes that resides in a Keyword object:
{
...
"finalUrl": "https://www.mywebsite.com/c/10366",
"mobileFinalUrl": "https://m.mywebsite.com/c/10366",
"trackingUrl": "{lpurl}?source=YAHOO&kw={keyword}&mt={matchtype}&camp={campaignid}&p1={_param1}&p2={_param2}&p3={_param3}",
"customParameters": [
{
"key": "param1",
"value": "abc"
},
{
"key": "param2",
"value": "xyz"
}
],
"displayUrlPath1": "promo",
"displayUrlPath2": null,
...
}
Operations¶
Read specific keyword data
Method: To retrieve data for a specific keyword, make a GET call with the id parameter.
For example:
https://api.gemini.yahoo.com/v3/rest/keyword/282782226512
Response: The keyword associated with the given ID.
{
"errors": null,
"response": {
"value": "Your keyword 1",
"id": 282782226512,
"status": "ACTIVE",
"advertiserId": 11610,
"parentType": "ADGROUP",
"parentId": 7237162494,
"landingUrl": "https://www.yahoo.com",
"exclude": "FALSE",
"bidSet": {
"id": null,
"bids": [
{
"priceType": "CPC",
"value": 2,
"channel": "SEARCH"
}
]
},
"matchType": "EXACT",
"adParamValues": null
}
}
Example: You can also make a GET call and pass in multiple IDs. Please note that when you pass multiple IDs, all other filters besides id will be ignored:
https://api.gemini.yahoo.com/v3/rest/keyword/?id=282782226512&id=282782226513
Response: The keywords associated with the given IDs:
{
"errors": null,
"response": [
{
"value": "Your keyword 1",
"id": 282782226512,
"status": "ACTIVE",
"advertiserId": 11610,
"parentType": "ADGROUP",
"parentId": 7237162494,
"landingUrl": "https://www.yahoo.com",
"exclude": "FALSE",
"bidSet": {
"id": null,
"bids": [
{
"priceType": "CPC",
"value": 2,
"channel": "SEARCH"
}
]
},
"matchType": "EXACT",
"adParamValues": null
},
{
"value": "Your keyword 2",
"id": 282782226513,
"status": "ACTIVE",
"advertiserId": 11610,
"parentType": "ADGROUP",
"parentId": 7237162494,
"landingUrl": "https://www.yahoo.com",
"exclude": "FALSE",
"bidSet": {
"id": null,
"bids": [
{
"priceType": "CPC",
"value": 1.5,
"channel": "SEARCH"
}
]
},
"matchType": "EXACT",
"adParamValues": null
}
}
}
Read data for filtered list of keywords
Method: To retrieve data for a filtered list of keywords, make a GET call with the following parameters:
Name |
Description |
Type |
Required? |
---|---|---|---|
|
The exclude flag. This is either true for negative keywords or false for positive keywords. |
boolean |
Optional |
|
The maximum number of rows to retrieve. |
int |
Optional |
|
The ID of the parent to filter the keywords by. |
long |
Yes |
|
The type of parent to filter by. Valid values are:
|
enum |
Yes |
|
The start index or the first element to retrieve. |
int |
Optional |
|
The keyword value. |
enum |
Optional |
|
The status of the filtered list of keywords. |
enum |
|
|
The ID of the advertiser associated with the keyword. This field cannot be updated. |
long |
Required |
Important
Only one parentId
or advertiserId
parameter is allowed to be passed in as a query parameter for all filtered lists keyword calls.
Example: GET call to fetch negative keywords for a given ad group:
https://api.gemini.yahoo.com/v3/rest/keyword/?parentId=46756&parentType=ADGROUP&exclude=true
Response: The response will be the list of keywords that match the given filter:
{
"errors": null,
"response": {
"value": "Negative keyword",
"id": 282782,
"status": "ACTIVE",
"advertiserId": 11610,
"parentType": "ADGROUP",
"parentId": 46756,
"landingUrl": "https://www.yahoo.com",
"exclude": "TRUE",
"bidSet": null,
"matchType": "EXACT",
"adParamValues": null
}
}
Example: You can also make a GET call to fetch keywords filtered by multiple ad group IDs:
https://api.gemini.yahoo.com/v3/rest/keyword/parentType=ADGROUP&parentId=1&parentId=2
Response: The list of keywords that match the given filter:
{
"errors": null,
"response": [
{
"value": "Keyword from one ad group",
"id": 282782226512,
"status": "ACTIVE",
"advertiserId": 11610,
"parentType": "ADGROUP",
"parentId": 1,
"landingUrl": "https://www.yahoo.com",
"exclude": "FALSE",
"bidSet": {
"id": null,
"bids": [
{
"priceType": "CPC",
"value": 2,
"channel": "SEARCH"
}
]
},
"matchType": "EXACT",
"adParamValues": null
},
{
value": "Another keyword from the ad group",
"id": 282782226513,
"status": "ACTIVE",
"advertiserId": 11610,
"parentType": "ADGROUP",
"parentId": 1,
"landingUrl": "https://www.yahoo.com",
"exclude": "FALSE",
"bidSet": {
"id": null,
"bids": [
{
"priceType": "CPC",
"value": 1.5,
"channel": "SEARCH"
}
]
},
"matchType": "EXACT",
"adParamValues": null
},
{
"value": "Keyword from the other ad group",
"id": 282782226514,
"status": "ACTIVE",
"advertiserId": 11610,
"parentType": "ADGROUP",
"parentId": 2,
"landingUrl": null,
"exclude": "FALSE",
"bidSet": null,
"matchType": "BROAD",
"adParamValues": null
}
]
}
Update existing keywords
Method: To update existing keywords, make a PUT call with one or more keyword objects. The result will be the list of updated keywords. For example, to update a bid for multiple keywords:
PUT https://api.gemini.yahoo.com/v3/rest/keyword/
Data passed
[
{
"id": 282782226512,
"bidSet": {
"bids": [
{
"priceType": "CPC",
"value": 2,
"channel": "SEARCH"
}
]
}
},
{
"id": 282782226513,
"bidSet": {
"bids": [
{
"priceType": "CPC",
"value": 1.5,
"channel": "SEARCH"
}
]
}
}
]
Example response
{
"errors": null,
"response": [
{
"value": "Your keyword 1",
"id": 282782226512,
"status": "ACTIVE",
"advertiserId": 11610,
"parentType": "ADGROUP",
"parentId": 7237162494,
"landingUrl": "https://www.yahoo.com",
"exclude": "FALSE",
"bidSet": {
"id": null,
"bids": [
{
"priceType": "CPC",
"value": 2,
"channel": "SEARCH"
}
]
},
"matchType": "EXACT",
"adParamValues": null
},
{
"value": "Your keyword 2",
"id": 282782226513,
"status": "ACTIVE",
"advertiserId": 11610,
"parentType": "ADGROUP",
"parentId": 7237162494,
"landingUrl": "https://www.yahoo.com",
"exclude": "FALSE",
"bidSet": {
"id": null,
"bids": [
{
"priceType": "CPC",
"value": 1.5,
"channel": "SEARCH"
}
]
},
"matchType": "EXACT",
"adParamValues": null
}
]
}
Create a new keyword
Method: To create new keywords, make a POST call with one or more keyword objects. The response will be the newly created keywords.
For example:
POST https://api.gemini.yahoo.com/v3/rest/keyword/
Data passed
[
{
"advertiserId": 11610,
"parentType": "ADGROUP",
"parentId": 7237162494,
"value": "newkeyword1",
"matchType": "EXACT",
"exclude": "FALSE",
"status": "ACTIVE",
"bidSet": {
"bids": [
{
"priceType": "CPC",
"value": 3,
"channel": "SEARCH"
}
]
}
},
{
"advertiserId": 11610,
"parentType": "ADGROUP",
"parentId": 7237162494,
"value": "newkeyword2",
"matchType": "EXACT",
"exclude": "FALSE",
"status": "ACTIVE",
"bidSet": {
"bids": [
{
"priceType": "CPC",
"value": 2.5,
"channel": "SEARCH"
}
]
}
}
]
Example response
{
"errors": null,
"response": [
{
"value": "newkeyword1",
"id": 289344782063,
"status": "ACTIVE",
"advertiserId": 11610,
"parentType": "ADGROUP",
"parentId": 7237162494,
"landingUrl": null,
"exclude": "FALSE",
"bidSet": {
"id": null,
"bids": [
{
"priceType": "CPC",
"value": 3,
"channel": "SEARCH"
}
]
},
"matchType": "EXACT",
"adParamValues": null
},
{
"value": "newkeyword2",
"id": 289344782064,
"status": "ACTIVE",
"advertiserId": 11610,
"parentType": "ADGROUP",
"parentId": 7237162494,
"landingUrl": null,
"exclude": "FALSE",
"bidSet": {
"id": null,
"bids": [
{
"priceType": "CPC",
"value": 2.5,
"channel": "SEARCH"
}
]
},
"matchType": "EXACT",
"adParamValues": null
}
]
}
Create a new negative keyword
Method: To create a new keyword, make a POST call with the keyword object and set exclude=TRUE. Supported match types for negative keywords are either EXACT or PHRASE. You can set negative keywords at both the ad group and the campaign levels. Indicate the level at which the negative keyword should be set using the parentType attribute:
POST https://api.gemini.yahoo.com/v3/rest/keyword/
Data passed
{
"advertiserId": 11610,
"parentType": "CAMPAIGN",
"parentId": 334418145,
"value": "negativekeywordCampaign",
"matchType": "EXACT",
"exclude": "TRUE",
"status": "ACTIVE"
}
Example response
{
"errors": null,
"response": {
"value": "negativekeywordCampaign",
"id": 289344787160,
"status": "ACTIVE",
"advertiserId": 11610,
"parentType": "CAMPAIGN",
"parentId": 334418145,
"landingUrl": null,
"exclude": "TRUE",
"bidSet": null,
"matchType": "EXACT",
"adParamValues": null
}
}
Delete a keyword
Method: To delete a keyword, make a PUT call with the keyword object. The following parameters are required:
Field |
Description |
---|---|
|
The ID of the keyword to delete. |
|
The status of the keyword set to |
Note
In v2, the DELETE operation is supported for both single and multiple ids.
For example:
PUT https://api.gemini.yahoo.com/v3/rest/keyword/
DELETE https://api.gemini.yahoo.com/v3/rest/keyword/{id}
DELETE https://api.gemini.yahoo.com/v3/rest/keyword?id=123&id=1234&...
Data passed
{
"id": 289344787160,
"status": "DELETED"
}
Example response
{
"errors": null,
"response": {
"value": "negativekeywordCampaign",
"id": 289344787160,
"status": "DELETED",
"advertiserId": 11610,
"parentType": "CAMPAIGN",
"parentId": 334418145,
"landingUrl": null,
"exclude": "TRUE",
"bidSet": null,
"matchType": "EXACT",
"adParamValues": null
}
}
AdParamValue Object
The following parameters are supported.
Parameter |
Description |
Required? |
---|---|---|
|
The index for params (1, 2, and 3), which identifies which placeholder must use which replacement text. Valid values are 1, 2, and 3. |
Yes |
|
The substitution text to display on the ad. The character limit for the insertionText of paramIndex=1 is 1022. The character limit for the insertionText of paramIndex=2 and paramIndex=3 is 70 each. |
Yes |
Example
This example shows how to set adParam1 and adParam2 when updating a keyword:
PUT https://api.gemini.yahoo.com/v3/rest/keyword/
Data passed
{
"id": 289344782063,
"adParamValues": [
{
"paramIndex": 1,
"insertionText": "dynamic text for param1"
},
{
"paramIndex": 2,
"insertionText": "dynamic text for param2"
}
]
}
Example response
{
"errors": null,
"response": {
"value": "newkeyword1",
"id": 289344782063,
"status": "ACTIVE",
"advertiserId": 11610,
"parentType": "ADGROUP",
"parentId": 7237162494,
"landingUrl": null,
"exclude": "FALSE",
"bidSet": {
"id": null,
"bids": [
{
"priceType": "CPC",
"value": 3,
"channel": "SEARCH"
}
]
},
"matchType": "EXACT",
"adParamValues": [
{
"paramIndex": 2,
"insertionText": "dynamic text for param2"
},
{
"paramIndex": 1,
"insertionText": "dynamic text for param1"
}
]
}
}
bidSet object¶
The bidSet object is used to specify bids.
Both the ad group and the keyword objects can carry bids. As a rule, the lower level bid (keyword is the lowest level) overrides bids set at a higher level. Ad groups that run on mobile search, for example, will carry a bid with a channel value of SEARCH and a priceType of CPC.
Please note that in order to have your ads serve on a given channel, you need to set a bid for the channel. For native ads, a bid for channel=NATIVE needs to be set at the ad group level. For mobile search ads, either a default bid for channel=SEARCH at the ad group level or keyword level bids need to be set.
Refer to Ad Groups - bidSet object for more information on ad groups for carrying bids.
Example
Please see below for more information on how to set bids.
"bids": [
{
"priceType": "CPC",
"value": 1.5,
"channel": "NATIVE"},
{
"priceType": "CPC",
"value": 2.5,
"channel": "SEARCH"}
]
bids Fields
Parameter |
Description |
Required? |
---|---|---|
|
The supply channel where the ads will run. Value can be:
|
Yes |
|
The pricing type. Supported types are:
|
Yes |
|
The bid amount. Refer to Data Dictionary to look up currency by type. |
Yes |