{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Ads Transparency Center Scraper",
    "description": "Get ads from Google Ads Transparency Center. In: domain, advertiser name/ID or URL; optional country, dates, format, platform. Out: one JSON row per ad with advertiser, creative ID, format, ad copy (OCR for screenshots), regions, first/last shown, URLs. $0.80 per 1,000 ads; 10 per input by default.",
    "version": "0.1",
    "x-build-id": "BNMlevK92TX9jQROz"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/krundle~google-ads-transparency-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-krundle-google-ads-transparency-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/krundle~google-ads-transparency-scraper/runs": {
      "post": {
        "operationId": "runs-sync-krundle-google-ads-transparency-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/krundle~google-ads-transparency-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-krundle-google-ads-transparency-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": {
          "advertisers": {
            "title": "Advertisers (names or IDs)",
            "type": "array",
            "description": "Advertiser names or advertiser IDs. Examples: [\"Nike\"], [\"AR16735076323512287233\"]. A name resolves to the matching advertiser with the most ads (see advertiserNameMatch); an ID is exact. Transparency Center URLs are accepted here too.",
            "items": {
              "type": "string"
            }
          },
          "domains": {
            "title": "Domains",
            "type": "array",
            "description": "Website domains (no protocol). Examples: [\"nike.com\"], [\"allbirds.com\", \"hoka.com\"]. Returns ads from every advertiser whose ads link to that domain.",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "Ads Transparency Center URLs",
            "type": "array",
            "description": "adstransparency.google.com URLs. Examples: [{\"url\": \"https://adstransparency.google.com/advertiser/AR17828074650563772417?region=US\"}], a single creative (/advertiser/AR…/creative/CR…), or a domain search (/?domain=nike.com&region=GB). A region parameter in the URL is applied.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "advertiserNameMatch": {
            "title": "Advertiser name matching",
            "enum": [
              "best",
              "all"
            ],
            "type": "string",
            "description": "How advertiser names are resolved. \"best\" (default): only the matching advertiser with the most ads, e.g. Nike -> Nike, Inc. \"all\": every advertiser Google suggests whose name contains the term (up to 10).",
            "default": "best"
          },
          "regions": {
            "title": "Regions",
            "type": "array",
            "description": "ISO 3166-1 alpha-2 country codes, e.g. [\"US\"], [\"GB\", \"DE\"]. Empty = all regions.",
            "items": {
              "type": "string"
            }
          },
          "startDate": {
            "title": "Shown from",
            "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$",
            "type": "string",
            "description": "Only ads shown on or after this date, format YYYY-MM-DD, e.g. \"2026-09-01\". Google keeps roughly the last 12 months."
          },
          "endDate": {
            "title": "Shown until",
            "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$",
            "type": "string",
            "description": "Only ads shown on or before this date, format YYYY-MM-DD, e.g. \"2026-10-15\"."
          },
          "adFormat": {
            "title": "Ad format",
            "enum": [
              "all",
              "text",
              "image",
              "video"
            ],
            "type": "string",
            "description": "Ad format filter: \"all\" (default), \"text\", \"image\" or \"video\".",
            "default": "all"
          },
          "platform": {
            "title": "Platform",
            "enum": [
              "all",
              "search",
              "youtube",
              "maps",
              "play",
              "shopping"
            ],
            "type": "string",
            "description": "Google surface filter: \"all\" (default), \"search\", \"youtube\", \"maps\", \"play\" or \"shopping\".",
            "default": "all"
          },
          "maxAdsPerSource": {
            "title": "Max ads per advertiser/domain/URL",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum ads returned per advertiser/domain/URL. Default 10 keeps calls cheap and fast (about $0.01 and 2 minutes with OCR; set extractText false for a few seconds); raise it (e.g. 100, 1000) for full exports. 0 = no limit (large advertisers have 100k+ ads).",
            "default": 10
          },
          "maxAdsTotal": {
            "title": "Max ads in total",
            "minimum": 0,
            "type": "integer",
            "description": "Hard cap on ads in the whole run, across all inputs. 0 = no cap. Example: 50.",
            "default": 0
          },
          "includeDetails": {
            "title": "Include full creative details",
            "type": "boolean",
            "description": "true = also load per-ad details: all variations, per-region first/last shown dates, impression ranges by region and platform (mostly EU/DSA data), topic, audience criteria, advertiser legal info. One extra request per ad; billed $0.002 per ad instead of $0.0008.",
            "default": false
          },
          "extractText": {
            "title": "Extract ad text",
            "type": "boolean",
            "description": "true (default) = read headline, description, call to action, display/landing URL and YouTube video ID from each ad's preview. false = metadata only (fastest: advertiser, creative ID, format, dates, URLs); also disables OCR.",
            "default": true
          },
          "maxVariationsWithText": {
            "title": "Variations to extract text from (details mode)",
            "minimum": 0,
            "maximum": 20,
            "type": "integer",
            "description": "Details mode only: extract text from up to this many variations per ad (0-20).",
            "default": 3
          },
          "ocrMode": {
            "title": "OCR for image-only ads",
            "enum": [
              "textAdsWithoutText",
              "allImageAds",
              "off"
            ],
            "type": "string",
            "description": "OCR for ads Google stores only as an image. \"textAdsWithoutText\" (default): OCR search text-ad screenshots without machine-readable copy. \"allImageAds\": also image/banner ads. \"off\": no OCR. Fills headline, description, displayUrl, ocrText. Billed +$0.0004 per ad only when usable text was read.",
            "default": "textAdsWithoutText"
          },
          "ocrLanguages": {
            "title": "OCR languages",
            "type": "array",
            "description": "Tesseract language codes, e.g. [\"eng\"] (default, bundled), [\"eng\", \"deu\"], [\"kor\"], [\"jpn\"], [\"chi_sim\"]. Extra languages download once per run (2-15 MB each) and slow OCR.",
            "items": {
              "type": "string"
            },
            "default": [
              "eng"
            ]
          },
          "includeRawDetail": {
            "title": "Include raw detail response",
            "type": "boolean",
            "description": "true = attach Google's raw creative detail JSON (large; for debugging).",
            "default": false
          },
          "onlyNew": {
            "title": "Only new ads since last run",
            "type": "boolean",
            "description": "Monitoring mode. true = skip ads already returned by earlier runs with the same stateKey, inputs and filters (state kept in the named key-value store google-ads-transparency-state). Skipped ads are free. Use with a schedule.",
            "default": false
          },
          "stateKey": {
            "title": "Monitoring state key",
            "type": "string",
            "description": "Optional name for the monitoring memory, e.g. \"competitors-weekly\". Separate keys = independent memories."
          },
          "maxPagesPerSource": {
            "title": "Max result pages per input",
            "minimum": 0,
            "type": "integer",
            "description": "Safety cap on result pages (100 ads each) scanned per input, mainly for onlyNew. 0 = no cap.",
            "default": 0
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Apify Proxy settings. Default {\"useApifyProxy\": true} (datacenter) is enough; the scraper rotates IPs when Google rate-limits.",
            "default": {
              "useApifyProxy": true
            }
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Parallel requests (1-10, default 2). Keep low to avoid throttling.",
            "default": 2
          },
          "requestIntervalMs": {
            "title": "Minimum delay between requests (ms)",
            "minimum": 300,
            "maximum": 60000,
            "type": "integer",
            "description": "Minimum milliseconds between request starts (300-60000, default 1200).",
            "default": 1200
          },
          "maxRetries": {
            "title": "Max retries per request",
            "minimum": 0,
            "maximum": 15,
            "type": "integer",
            "description": "Retries per request with exponential backoff (0-15, default 6).",
            "default": 6
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}