{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Ads Library Scraper — Google Ads Transparency Center",
    "description": "Scrape the Google Ads Transparency Center (Google Ads library) by brand, website or advertiser ID: ad text with OCR for text ads kept as pictures, variations, countries, EU reach and targeting, political spend. Check which websites run Google Ads; get only new ads. No login.",
    "version": "0.1",
    "x-build-id": "L0jQr5c3v2MI0SEhL"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/anuarbakty~google-ads-library-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-anuarbakty-google-ads-library-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/anuarbakty~google-ads-library-scraper/runs": {
      "post": {
        "operationId": "runs-sync-anuarbakty-google-ads-library-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/anuarbakty~google-ads-library-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-anuarbakty-google-ads-library-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "queries": {
            "title": "Brands, websites, advertiser IDs or links",
            "type": "array",
            "description": "One per line. A website (\"zocdoc.com\") gives every ad that points to it, from any advertiser. A brand name (\"Zocdoc\") goes through the Transparency Center search to the advertiser accounts whose names start with it. An advertiser ID (AR…) gives that advertiser's ads. A Transparency Center link (advertiser, ad or website search) keeps the filters in it. For one exact company, give its website or advertiser ID.",
            "items": {
              "type": "string"
            }
          },
          "domains": {
            "title": "Websites (exact)",
            "type": "array",
            "description": "Same as a website in the first field, but never read as a brand name: every ad that points to the site, from any advertiser. In Advertiser check: does the website run Google Ads, and the advertiser of its latest ad.",
            "items": {
              "type": "string"
            }
          },
          "advertiserIds": {
            "title": "Advertiser IDs",
            "type": "array",
            "description": "Advertiser IDs that start with AR, from the advertiser page address on the Transparency Center.",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "Transparency Center links",
            "type": "array",
            "description": "Advertiser pages, ad pages or website searches copied from adstransparency.google.com. The region, platform, format and dates in the link are used for that link.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "urlsFromFile": {
            "title": "Import a list",
            "type": "string",
            "description": "Paste lines (one target per line), or one link to a .txt or .csv file, Google Sheet or Google Drive file with them. Share the file so that anyone with the link can view it."
          },
          "resultType": {
            "title": "What to return",
            "enum": [
              "ads",
              "advertisers"
            ],
            "type": "string",
            "description": "\"ads\" (default): every ad with its details. \"advertisers\" (Advertiser check): one row per website or advertiser with runsGoogleAds true or false, the advertiser (for a website, the advertiser of its latest ad), the ad count of that advertiser's whole account, country, verified badge and the latest ad. A website without ads gives a free row.",
            "default": "ads"
          },
          "region": {
            "title": "Region",
            "type": "string",
            "description": "Where the ads were shown: a two-letter code (\"US\", \"DE\"), an English name (\"Germany\"), several separated by commas (\"US, CA\"), or \"anywhere\" for all regions.",
            "default": "anywhere"
          },
          "adPlatforms": {
            "title": "Google platforms",
            "type": "array",
            "description": "Only ads shown on these Google platforms. Empty = all. Google filters by platform only for ads shown since 2023-09-04.",
            "items": {
              "type": "string",
              "enum": [
                "SEARCH",
                "YOUTUBE",
                "SHOPPING",
                "MAPS",
                "PLAY"
              ],
              "enumTitles": [
                "Google Search",
                "YouTube",
                "Google Shopping",
                "Google Maps",
                "Google Play"
              ]
            },
            "default": []
          },
          "creativeFormat": {
            "title": "Ad format",
            "enum": [
              "ALL",
              "TEXT",
              "IMAGE",
              "VIDEO"
            ],
            "type": "string",
            "description": "Only ads of this format.",
            "default": "ALL"
          },
          "startDate": {
            "title": "Shown on or after",
            "type": "string",
            "description": "Ads shown at any time on or after this date, including ads that started earlier. A date like 2026-10-01, or a number of days back: \"30 days\" = shown in the last 30 days. Google keeps the last 12 months of dates for this filter."
          },
          "endDate": {
            "title": "Shown on or before",
            "type": "string",
            "description": "A date like 2026-11-01, or a number of days back like \"7 days\". Empty = today."
          },
          "politicalAds": {
            "title": "Political ads",
            "type": "boolean",
            "description": "Read Google's political ads view: impressions and spend ranges of each ad, and the places it targeted. Needs a region; the United States includes its territories.",
            "default": false
          },
          "maxAdsPerSearch": {
            "title": "Max ads per advertiser or website",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Ads to deliver for each advertiser, website or link. A brand name reads up to \"Max advertisers per brand name\" accounts, each with this limit; for a hard total use \"Max paid rows in the run\".",
            "default": 100
          },
          "maxItems": {
            "title": "Max paid rows in the run",
            "minimum": 1,
            "type": "integer",
            "description": "Stops the run after this many ads or advertiser rows. Set it here in the input: the run option of the same name does not limit this Actor. Empty = no limit besides the run's maximum cost."
          },
          "maxAdvertisersPerQuery": {
            "title": "Max advertisers per brand name",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "A brand name can match several advertiser accounts (one per country or company). This many of the first matches are read.",
            "default": 5
          },
          "includeDetails": {
            "title": "Ad details",
            "type": "boolean",
            "description": "One more request per ad gives every variation, every country with its dates, and for EU ads the impression ranges per platform and the targeting. Included in the ad price. Off = faster, with the list fields only.",
            "default": true
          },
          "includeAdText": {
            "title": "Ad text",
            "type": "boolean",
            "description": "Headline, description, display and landing address, sitelinks, button, video ID: read from Google's preview. Included in the ad price.",
            "default": true
          },
          "ocr": {
            "title": "Read text ads kept as pictures (OCR)",
            "type": "boolean",
            "description": "Google keeps many text ads only as a picture. With this on, their words are read with Tesseract inside the run, no AI and no outside service. Off = faster, those ads keep the picture link only.",
            "default": true
          },
          "ocrAllVariations": {
            "title": "Read every variation",
            "type": "boolean",
            "description": "Read the words of every A/B variation, not only the first. Slower for text ads kept as pictures.",
            "default": true
          },
          "landingPages": {
            "title": "Landing pages",
            "type": "boolean",
            "description": "Open the page each ad leads to: final address, HTTP status, title, description, first heading, main button. Charged per page as \"landing-page\".",
            "default": false
          },
          "onlyNewAds": {
            "title": "Only new ads",
            "type": "boolean",
            "description": "Deliver only ads that earlier runs with the same memory did not deliver. Schedule the run daily or weekly to get new competitor ads only. The first run delivers what it finds and remembers it.",
            "default": false
          },
          "monitorStoreName": {
            "title": "Memory name",
            "type": "string",
            "description": "Name of the memory of \"only new ads\" in your account. Use one name per watch list, so that lists do not mix.",
            "default": "google-ads-library-monitor"
          },
          "webhookUrl": {
            "title": "Send a message when the run ends",
            "type": "string",
            "description": "A Slack or Discord webhook, a Telegram bot link (https://api.telegram.org/bot<token>/sendMessage?chat_id=<chat>) or any webhook (Make, n8n, Zapier): it gets the count of ads and the dataset link."
          },
          "notifyWhen": {
            "title": "When to send the message",
            "enum": [
              "ads",
              "always"
            ],
            "type": "string",
            "description": "\"When there are ads\" skips runs that found nothing.",
            "default": "ads"
          },
          "skipDuplicateAds": {
            "title": "Deliver each ad once per run",
            "type": "boolean",
            "description": "When two inputs lead to the same ad (a website and its brand name), the ad is delivered and charged once. The summary of the second input counts it.",
            "default": true
          },
          "tags": {
            "title": "Your labels",
            "type": "array",
            "description": "Added to every row, to tell runs and lists apart in one table.",
            "items": {
              "type": "string"
            }
          },
          "includeErrorRows": {
            "title": "Free notice rows for empty inputs",
            "type": "boolean",
            "description": "A free row of type \"notice\" for each input that gave nothing, with a code (NO_ADS, NOT_FOUND, FETCH_FAILED, INVALID_INPUT) and the reason.",
            "default": true
          },
          "customMapFunction": {
            "title": "Change each row (JavaScript)",
            "type": "string",
            "description": "A function that takes a row and returns a new one, e.g. (row) => ({ ...row, brand: row.advertiserName }). Return nothing to drop the row. The columns type, source, tags and scrapedAt stay."
          },
          "fastMode": {
            "title": "Fast mode for agents",
            "type": "boolean",
            "description": "For agents whose tool call waits 30 to 45 seconds: at most 10 ads in the whole run, the first variation of each, no landing pages; ad text and OCR stay on. Overrides larger limits.",
            "default": false
          },
          "maxConcurrency": {
            "title": "Parallel ads",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How many ads are read at once.",
            "default": 5
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Google limits each address after a few dozen requests, so the run changes addresses as it goes. Apify Proxy is used by default.",
            "default": {
              "useApifyProxy": true
            }
          },
          "residentialFallback": {
            "title": "Switch to residential proxies when refused",
            "type": "boolean",
            "description": "When Google keeps refusing datacenter addresses, move to residential ones.",
            "default": true
          },
          "failIfAllInputsFail": {
            "title": "Fail the run when nothing is delivered",
            "type": "boolean",
            "description": "Off: a run that delivers nothing still succeeds and explains why in free rows, so schedules and integrations keep going.",
            "default": false
          },
          "strictInput": {
            "title": "Stop on unknown input fields",
            "type": "boolean",
            "description": "On: an unknown field name stops the run before anything is read or charged.",
            "default": false
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}