Get keywords
GET {{baseUrl}}/ad_accounts/:ad_account_id/keywords?campaign_id=579382468&ad_group_id=579382468&match_types=BROAD&page_size=25&bookmark=<string>
Get a list of keywords based on the filters provided. If no filter is provided, it will default to the ad_account_id filter, which means it will only return keywords that specifically have parent_id set to the ad_account_id. Note: Keywords can have ad_account_ids, campaign_ids, and ad_group_ids set as their parent_ids. Keywords created through Ads Manager will have their parent_id set to an ad_group_id, not ad_account_id.
For more information, see Keyword targeting.
Notes:
- Advertisers and campaigns can only be assigned keywords with excluding ('_NEGATIVE').
- All keyword match types are available for ad groups.
For more information on match types, see match type enums.
Returns:
A successful call returns an object containing an array of new keyword objects and an empty "errors" object array.
An unsuccessful call returns an empty keywords array, and, instead, inserts the entire object with nulled/negated properties into the "errors" object array:
{
keywords
: [],errors
: [ {data
: {archived
: null,match_type
:EXACT
,parent_type
: null,value
:foobar
,parent_id
: null,type
:keyword
,id
: null },error_messages
: [Advertisers and Campaigns only accept excluded targeting attributes.
] } }
Request Params
Key | Datatype | Required | Description |
---|---|---|---|
campaign_id | number | Campaign Id to use to filter the results. | |
ad_group_id | number | Ad group Id. | |
match_types | string | Keyword <a href="/docs/redoc/#section/Match-type-(keyword).">match type</a> | |
page_size | number | Maximum number of items to include in a single page of the response. See documentation on <a href='/docs/getting-started/pagination/'>Pagination</a> for more information. | |
bookmark | string | Cursor used to fetch the next page of items |
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Accept | string |
RESPONSES
status: OK
{"items":[{"match_type":"PHRASE","value":"\u003cstring\u003e","archived":true,"id":"4847","parent_id":"74","parent_type":"proident labore esse","type":"in deserunt","bid":"\u003cinteger\u003e"},{"match_type":"BROAD","value":"\u003cstring\u003e","archived":true,"id":"676","parent_id":"1054522928","parent_type":"nulla velit Lorem et ex","type":"laboris","bid":"\u003cinteger\u003e"}],"bookmark":"\u003cstring\u003e"}