Google Ads API
3 endpoints read Google Ads: ad library, advertisers. From $0.0020 a call. No Google Ads login and no cookie; a failed call is free.
One call, as it came back
A recorded call, fields already tidied up: ready for an AI or a spreadsheet.The first 3 rows of a response recorded 2026-10-12 21:59 UTC.
Run it in the Playground · $0.0020{
"code": "ok",
"request_id": "2c6d1a4f-a2f2-4537-b339-dfd44262a0ec",
"data": {
"item": {
"id": "AR16957588921303948228/CR14623979096670259597",
"url": "https://adstransparency.google.com/advertiser/AR16957588921303948228/creative/CR14623979096670259597",
"format": "text",
"title": "Weekend hiking essentials, 20% off this week only",
"text": "Weekend hiking essentials, 20% off this week only",
"landing_url": null,
"advertiser": { "id": "AR12673385717193703136" },
"images": [
"https://tpc.googlesyndication.com/simgad/10334992425704947224",
"https://tpc.googlesyndication.com/simgad/13598759742669398477",
// … 1 more
],
"first_shown_at": "2024-05-06T00:00:00.000Z",
"last_shown_at": "2026-10-12T21:34:42.000Z"
}
},
"warnings": [],
"meta": {
"capability": "google.ads.get",
"result_status": "complete",
"fetched_at": "2026-10-12T21:59:26.000Z",
"cached": false,
"replayed": false,
"unavailable": {
"advertiser.name": "capability",
"advertiser.url": "platform",
"advertiser.avatar_url": "platform"
},
"billing": {
"amount": "0.002",
"currency": "USD",
"balance_after": "9.998"
}
}
}From a response recorded 2026-10-12 21:59 UTC. Names, text and IDs are examples, and so are the links: none is the recorded one (the page shows no one's personal data); the figures are as recorded. Long lists are cut. The request ID, cursor and balance are made up.
What you can get
Each row is an endpoint: what it returns and what one call costs.
Ask about Google Ads right inside Claude or Cursor
Add the DataXAPI MCP server and the AI finds the Google Ads endpoint it needs and calls it; answers link back to the source. You pay for the calls it makes.
https://api.dataxapi.com/mcpStart in three steps
The call shown here is Google ad detail. Every other Google Ads endpoint is called the same way and answers in the same envelope.
Get a key
Sign in with an emailed code or Google. Free trial, no card needed.
Call it, or let your AI call it
One GET from your code. Or paste this prompt into your agent with your key in it: it sets itself up, then finds and calls these endpoints by itself.
Read the same shape every time
Items are in data.items (one object in data.item), the next page in page.next_cursor, the charge in meta.billing.amount. A failed call is not charged.
curl -G "https://api.dataxapi.com/v1/google/ads/get" \ --data-urlencode "id=AR16735076323512287233/CR13384474926044413953" \ -H "Authorization: Bearer $DATAXAPI_API_KEY"
from dataxapi import DataXAPI dx = DataXAPI() # reads DATAXAPI_API_KEY result = dx.google.ads.get(id="AR16735076323512287233/CR13384474926044413953") print(result["data"]["item"])
import { DataXAPI } from "@dataxapi/sdk";
const dx = new DataXAPI(); // reads DATAXAPI_API_KEY
const result = await dx.google.ads.get({ id: "AR16735076323512287233/CR13384474926044413953" });
console.log(result.data.item);dataxapi call google.ads.get id=AR16735076323512287233/CR13384474926044413953
{
"mcpServers": {
"dataxapi": {
"type": "http",
"url": "https://api.dataxapi.com/mcp",
"headers": {
"Authorization": "Bearer ${DATAXAPI_API_KEY}"
}
}
}
}Add this to your MCP client, then ask your agent to call google.ads.get.
Edge cases
What the Google Ads endpoints do at their edges, and what to check when a call does not return what you expected.
- Page sizes
- A list returns 10 to 40 items a page, depending on the endpoint. 1 of the 2 lists go on to a next page:
page.next_cursor, passed back ascursor, each page a call of its own. The others return one page only. - Fields it cannot give
- 3 of the 3 endpoints cannot fill every field of the object they return. Each endpoint's page lists which, and every answer repeats them in
meta.unavailable: a missing field is never a silent zero. - A missing object that reads as empty
- Google advertiser's ads: an object that does not exist cannot be told from one with nothing under it, so the answer is an empty result, not a 404, and is charged as an empty result is.
- The advertiser ID
- An advertiser is named by AR and a string of digits; the advertiser search finds it by name, in the US when no region is named.
- The ad ID
- An ad is named by the advertiser's ID and the creative's joined by a slash (AR…/CR…), as in its link adstransparency.google.com/advertiser/AR…/creative/CR….
- What the ad list leaves out
- An advertiser's ad list gives format, dates and a picture; what an ad says, where it leads and its video come from the ad detail.
- Gaps the center leaves
- The impressions range is null where the center does not publish it. Where an ad names its destination as a bare domain, it is kept as written in
ext.variations. - Empty is not “not found”
- An advertiser ID nobody has returns an empty ad list, charged as an empty result.
Questions about the Google Ads API
Short answers. The details are on each endpoint's page.
How is the Google Ads API priced?
Per call, no subscription. All 3 endpoints cost $0.0020 a call. You are charged when data comes back; a failed call costs nothing.
Do I need a Google Ads account or a cookie?
No. One DataXAPI key is all you hold: no Google Ads login, no cookie, no device to keep alive. The endpoints return publicly visible data only.
Is the data live?
A call fetches from Google Ads at that moment, and meta.fetched_at says when. A result is kept for 24 hours, so a retry with the same Idempotency-Key is not charged again.
Is an empty result charged?
A list that comes back empty is charged its price: the search was run. Reading one object that does not exist answers not_found and is free.
What happens when Google Ads changes something?
A call that fails is not charged, whatever the reason. An endpoint that is paused answers capability_paused, also free, and GET /v1/catalog/status says what is up right now.
Related
Call Google Ads with one key.
Free trial on sign-up: up to 50 calls at $0.0020. No card. No Google Ads login, no cookie, no subscription. A failed call is free.