Lists the keywords of a Google Ads account with match type, status, Quality Score, bid and impressions, clicks, cost and conversions for a date range.
curl -X POST "https://api.primaryapi.com/v1/run/google-ads.keywords" \
-H "Authorization: Bearer $PRIMARYAPI_API_KEY" \
-H "Content-Type: application/json" \
-d '{"customerId":"1234567890"}'{
"output": {
"found": true,
"data": {
"currencyCode": "USD",
"period": "DURING LAST_30_DAYS",
"nextCursor": null,
"keywords": [
{
"qualityScore": 8,
"cpcBid": 1.2,
"cpcBidMicros": 1200000,
"effectiveCpcBid": 1.2, …
}
], …
}
},
"credits": 1
}Input and output
11 fields
1234567890.customerId THROUGH a manager (MCC) account: that manager account’s id (10 digits). Sent as the login-customer-id header. Omit for accounts the Google account can open directly.5 fields
Good to know
Runs as your connected Google account. Needs the Google Ads capability.
Lists the keywords of the keyword report. Amounts are in the account currency.
Quality Score is today’s score (1-10) with its three parts. Null when Google has too little data.
Sorted by cost, highest first.
Narrow with campaignId or adGroupId. See what people actually searched with google-ads.search_terms.
Unknown customer ID? It comes back as not found, not as an error.
The same key and credits work for every API.