Read Apple Ads campaigns, ad groups, keywords (with bids), negatives, or a performance report.
view=campaigns → ad_groups (campaign_id) → keywords (campaign_id, ad_group_id) gives the ids the ads.*
actions take. view=report&level=keywords|searchterms|adgroups|campaigns&campaign_id= returns impressions,
taps, installs, spend, avg CPT / CPA for start..end (default the last 7 days, UTC).
Request
curl "https://api.appgoat.ai/v1/connections/123/ads" \
-H "x-api-key: $APPGOAT_API_KEY"const res = await fetch("https://api.appgoat.ai/v1/connections/123/ads", {
headers: {
"x-api-key": process.env.APPGOAT_API_KEY,
},
});
const { data, meta } = await res.json();import os, requests
res = requests.get(
"https://api.appgoat.ai/v1/connections/123/ads",
headers={"x-api-key": os.environ["APPGOAT_API_KEY"]}
)
body = res.json()Path parameters
idstringrequiredConnection id (
con_…).Query parameters
view"campaigns" | "ad_groups" | "keywords" | "negatives" | "report"Default "campaigns"
campaign_idstringad_group_idstringlevel"campaigns" | "adgroups" | "keywords" | "searchterms"startstringendstringlimitintegerDefault 200
Response
200 with a JSON body. See the envelope for meta.
Example
{
"data": null,
"meta": {
"credits_used": 1,
"credits_remaining": 9981,
"request_id": "req_123"
}
}Status codes
200
The requested view.
Missing or invalid API key.
insufficient_credits (the call costs more than you have left; nothing was done) or plan_limit (a feature of a higher plan).404
not_foundNot found.
429
rate_limitedToo many requests per second for your plan.
502
App Store Connect / Google Play / Apple Ads answered with an error (message passed through).