Ads

Google Ads API

Also known asGoogle 广告谷歌google ads transparency center谷歌广告谷歌广告透明度中心

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.

Endpoints3 endpointsin 2 groups, one response shape
PriceFrom $0.0020per call. Failed calls are free
When an upstream failsRetried for youChecked every day with real calls · 4 days on record
DataFetched liveat the moment of the call

One call, as it came back

A recorded call, fields already tidied up: ready for an AI or a spreadsheet.
Recorded
GET/v1/google/ads/get$0.0020
FieldValue
formattext
first_shown_at2024-05-06
last_shown_at2026-10-12 21:34 UTC

The first 3 rows of a response recorded 2026-10-12 21:59 UTC.

Run it in the Playground · $0.0020
Recorded response
{
  "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.

EndpointPathReturnsPrice
Ad library1
Google ad detailGET/v1/google/ads/getAd$0.0020
Advertisers2
Google advertiser searchGET/v1/google/advertisers/searchAdvertiser list$0.0020
Google advertiser's adsGET/v1/google/advertisers/ads/listAd list$0.0020
Prices are the prices in force. A call that fails, or whose result is uncertain, costs nothing.Google Ads API pricing →Google Ads data in your AI →See live status →

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.

Google Ads MCP setup →
https://api.dataxapi.com/mcp

Start 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 https://dataxapi.com/agents.md and set up DataXAPI in this agent. My API key is dx_live_…; use it for every DataXAPI call.

Sign in to copy it with your key

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.

Read the quickstart →
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 as cursor, 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.

Start free