> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mindcase.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Google Ads Library API

> Extract ads from the Google Ads Transparency Center for any advertiser or website: format, first and last shown dates, countries with impression ranges per country and per Google surface, and ad text, link and image

`POST /v1/data/google-ads/ads/run`

**Pricing:** $0.002 per ad ($2.00 per 1,000).

## Ways to call it

* **By website**: set `domains` (optional: `country`, `maxResults`)
* **By advertiser**: set `advertisers` (optional: `country`, `maxResults`)

## Request

Send the inputs under `params`. Only the keys below are accepted; any other key returns `422 invalid_params`.

**domains** `string[]`

Advertiser websites to find ads for, one per line, e.g. nike.com. A bare host or a full URL both work; returns the ads Google shows that send people to that site.

**advertisers** `string[]`

Advertiser names (HubSpot) or Google advertiser IDs (AR13611357312189988865), one per line. A name matches up to 3 advertiser accounts, which share that name's share of Max Results. Not a link: use Domains for a website.

**country** `string`

Only ads shown in this country. Any country by default.

240 allowed values, for example `af` (Afghanistan), `al` (Albania), `dz` (Algeria), `as` (American Samoa), `ad` (Andorra), `ao` (Angola), `ai` (Anguilla), `aq` (Antarctica), `ag` (Antigua and Barbuda), `ar` (Argentina). Fetch the full list with `GET /v1/data/google-ads/ads?expand=options`.

**maxResults** `integer` (default: 100)

How many ads to return in total. Defaults to 100; use 0 for all.

## Example

```bash cURL theme={null}
curl -X POST "https://api.mindcase.co/v1/data/google-ads/ads/run?wait=true" \
  -H "Authorization: Bearer $MINDCASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "params": {
    "domains": [
      "nike.com",
      "basecamp.com",
      "zalando.de"
    ],
    "maxResults": 10
  }
}'
```

```python Python theme={null}
import os, requests

r = requests.post(
    "https://api.mindcase.co/v1/data/google-ads/ads/run",
    params={"wait": "true"},
    headers={"Authorization": f"Bearer {os.environ['MINDCASE_API_KEY']}"},
    json={"params": {
    "domains": [
        "nike.com",
        "basecamp.com",
        "zalando.de"
    ],
    "maxResults": 10
}},
)
job = r.json()
rows = job.get("data", [])  # if job["status"] == "running", poll /v1/jobs/{job_id}/results
```

```javascript Node.js theme={null}
const r = await fetch("https://api.mindcase.co/v1/data/google-ads/ads/run?wait=true", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.MINDCASE_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({ params: {
  "domains": [
    "nike.com",
    "basecamp.com",
    "zalando.de"
  ],
  "maxResults": 10
} }),
});
const job = await r.json();
const rows = job.data ?? []; // if job.status === "running", poll /v1/jobs/{job_id}/results
```

## Response fields

Each row in `data` is one ad, keyed by these fields.

| Field | Name | Type |
| - | - | - |
| `adUrl` | Ad URL | url |
| `adId` | Ad ID | text |
| `advertiserId` | Advertiser ID | text |
| `advertiserName` | Advertiser Name | text |
| `format` | Format | text |
| `headline` | Headline | text |
| `body` | Body | text |
| `clickUrl` | Click URL | text |
| `mediaUrl` | Media URL | url |
| `startDate` | Start Date | datetime |
| `endDate` | End Date | datetime |
| `daysActive` | Days Active | number |
| `regions` | Regions | array |
| `impressionsByCountry` | Impressions By Country | object\_array |
| `variations` | Variations | object\_array |
| `targeting` | Targeting | object |

## Example response

Abridged: long text and lists are shortened.

```json theme={null}
{
  "job_id": "7f3a1c2e-0b9d-4c55-9a51-3f2e8d1b6a40",
  "agent": "google-ads/ads",
  "status": "completed",
  "row_count": 1,
  "truncated": false,
  "data": [
    {
      "headline": null,
      "format": "TEXT",
      "impressionsByCountry": [
        {
          "regionCode": "AR",
          "regionName": "Argentina",
          "lastShown": "2026-09-12"
        },
        {
          "regionCode": "BE",
          "regionName": "Belgium",
          "firstShown": "2026-04-14",
          "lastShown": "2026-09-10",
          "impressions": {
            "lowerBound": 0,
            "upperBound": 1000
          },
          "surfaceServingStats": [
            {
              "surfaceCode": "SEARCH",
              "surfaceName": "Google Search",
              "impressions": {
                "lowerBound": 0,
                "upperBound": 1000
              }
            }
          ]
        }
      ],
      "variations": [
        {
          "imageUrl": "https://tpc.googlesyndication.com/archive/simgad/7035816888523546811"
        }
      ],
      "startDate": "2026-04-02T17:12:06.469Z",
      "endDate": "2026-09-14T19:15:19.118Z",
      "advertiserName": "37SIGNALS LLC",
      "adId": "CR08194127319581851649",
      "adUrl": "https://adstransparency.google.com/advertiser/AR08167247833695518721/creative/CR08194127319581851649",
      "clickUrl": null,
      "regions": [
        "Argentina",
        "Belgium"
      ],
      "advertiserId": "AR08167247833695518721",
      "body": null,
      "daysActive": 155,
      "targeting": {
        "targetingCategory": {
          "demographics": {
            "included": true,
            "excluded": false
          },
          "contextual": {
            "included": true,
            "excluded": false
          }
        }
      },
      "mediaUrl": "https://tpc.googlesyndication.com/archive/simgad/7035816888523546811"
    }
  ]
}
```

## Related APIs

For Meta ads use [`facebook/ads`](https://docs.mindcase.co/apis/facebook/ads); for TikTok ads use [`tiktok/ads`](https://docs.mindcase.co/apis/tiktok/ads).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.