Get keywords

GET {{baseUrl}}/ad_accounts/:ad_account_id/keywords?campaign_id=47&ad_group_id=47&match_types=PHRASE_NEGATIVE&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

KeyDatatypeRequiredDescription
campaign_idnumberCampaign Id to use to filter the results.
ad_group_idnumberAd group Id.
match_typesstringKeyword <a href="/docs/redoc/#section/Match-type-(keyword).">match type</a>
page_sizenumberMaximum 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.
bookmarkstringCursor used to fetch the next page of items

HEADERS

KeyDatatypeRequiredDescription
Acceptstring

RESPONSES

status: OK

{&quot;items&quot;:[{&quot;match_type&quot;:&quot;EXACT_NEGATIVE&quot;,&quot;value&quot;:&quot;\u003cstring\u003e&quot;,&quot;archived&quot;:true,&quot;id&quot;:&quot;9437555&quot;,&quot;parent_id&quot;:&quot;1&quot;,&quot;parent_type&quot;:&quot;esse e&quot;,&quot;type&quot;:&quot;id&quot;,&quot;bid&quot;:&quot;\u003cinteger\u003e&quot;},{&quot;match_type&quot;:null,&quot;value&quot;:&quot;\u003cstring\u003e&quot;,&quot;archived&quot;:true,&quot;id&quot;:&quot;545703&quot;,&quot;parent_id&quot;:&quot;2854440658&quot;,&quot;parent_type&quot;:&quot;deserunt in eu nostrud offici&quot;,&quot;type&quot;:&quot;ut ex&quot;,&quot;bid&quot;:&quot;\u003cinteger\u003e&quot;}],&quot;bookmark&quot;:&quot;\u003cstring\u003e&quot;}