Lists the ads of a Google Ads account with type, final URLs, responsive search ad headlines, status, policy approval and clicks, cost and conversions for a date range.
curl -X POST "https://api.primaryapi.com/v1/run/google-ads.ads" \
-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,
"ads": [
{
"name": null,
"resourceName": "customers/1234567890/adGroupAds/222…",
"type": "RESPONSIVE_SEARCH_AD",
"status": "ENABLED", …
}
], …
}
},
"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.
headlines, descriptions and paths are filled for responsive search ads. Other ad types return their type, final URLs, status and policy.
policy.topics lists Google’s policy findings without the evidence text.
Amounts are in the account currency.
Sorted by cost, highest first.
Narrow with campaignId or adGroupId.
The same key and credits work for every API.