{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Ads Transparency Center Scraper (Pay-Per-Event)",
    "description": "Monitor who is running what ads on Google. Search the Ads Transparency Center by brand name, advertiser ID, domain, or Transparency Center URL. Returns every creative with format, first/last-shown dates, preview image/video, and — optionally — per-region impression ranges. HTTP-only, no login.",
    "version": "0.1",
    "x-build-id": "CaOIwKytp0CsDMDMg"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/prodiger~google-ads-transparency-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-prodiger-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/prodiger~google-ads-transparency-scraper/runs": {
      "post": {
        "operationId": "runs-sync-prodiger-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/prodiger~google-ads-transparency-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-prodiger-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",
        "required": [
          "advertisers"
        ],
        "properties": {
          "advertisers": {
            "title": "🔎 Advertisers to scrape",
            "minItems": 1,
            "uniqueItems": true,
            "type": "array",
            "description": "One or more advertisers. Each item can be:\n- A brand / company name, e.g. `Nike`, `Lululemon` (resolved to advertiser IDs via search)\n- An advertiser ID, e.g. `AR01614014350098432001` (used directly, no lookup)\n- A domain, e.g. `nike.com`\n- A full Transparency Center URL, e.g. `https://adstransparency.google.com/advertiser/AR01614014350098432001?region=US`",
            "items": {
              "type": "string"
            }
          },
          "region": {
            "title": "🌍 Region",
            "pattern": "^([A-Za-z]{2}|anywhere|ANYWHERE)$",
            "type": "string",
            "description": "Two-letter ISO country code (e.g. `US`, `GB`, `DE`, `FR`, `IN`) to restrict ads to those served in that country, or `anywhere` for all regions. Applied server-side.",
            "default": "anywhere"
          },
          "format": {
            "title": "Ad format",
            "enum": [
              "all",
              "text",
              "image",
              "video"
            ],
            "type": "string",
            "description": "Only keep creatives of this format. `All` emits every ad (text, image, and video).",
            "default": "all"
          },
          "advertiserMatch": {
            "title": "Advertiser match strategy",
            "enum": [
              "top",
              "verified",
              "exact",
              "all"
            ],
            "type": "string",
            "description": "When an advertiser is given by name or domain (not a direct `AR…` ID), several advertisers can match. This chooses which:\n- **Top match** — the single best match (default)\n- **Verified only** — the top match that carries Google's verified badge\n- **Exact name** — only advertisers whose name equals the query exactly\n- **All matches** — every candidate, up to the limit below",
            "default": "top"
          },
          "maxAdvertisersPerQuery": {
            "title": "Max advertisers per query",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Cap how many advertisers a single name/domain query fans out to. Keeps an ambiguous name like `Nike` from scraping dozens of unrelated advertisers. Ignored for direct `AR…` IDs.",
            "default": 1
          },
          "maxAds": {
            "title": "Max ads (total)",
            "minimum": 1,
            "type": "integer",
            "description": "Stop the run after this many ads have been written across all advertisers. Defaults to 100 when left empty (a safety cap — every ad is billed). Raise it deliberately for larger runs; the per-advertiser cap still applies.",
            "default": 100
          },
          "maxAdsPerAdvertiser": {
            "title": "Max ads per advertiser",
            "minimum": 1,
            "type": "integer",
            "description": "Cap ads collected per advertiser. Google itself stops disclosing at a few thousand per advertiser.",
            "default": 1000
          },
          "scrapeAdDetails": {
            "title": "Scrape ad details",
            "type": "boolean",
            "description": "Fetch one extra lookup per ad for per-region impression ranges, first/last-shown dates per region, and every creative variant. Slower and adds a small per-ad charge. Note: impression numbers are disclosed by Google only for EU and political/issue ads.",
            "default": false
          },
          "maxRequestRetries": {
            "title": "Max request retries",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many times to retry a failed Transparency Center request (each retry rotates the proxy IP).",
            "default": 4
          },
          "runTag": {
            "title": "Run tag",
            "type": "string",
            "description": "Optional label written into every output row's `runTag` field — handy when joining datasets later."
          },
          "customMapFunction": {
            "title": "Custom map function",
            "type": "string",
            "description": "Optional JavaScript applied to every output row before it is saved. Receives `item` and returns the transformed object. Example: `({ ...item, brand: item.advertiserName?.toUpperCase() })`."
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Proxy settings. Google throttles datacenter IPs aggressively; the default Apify Proxy with residential IPs is strongly recommended.",
            "default": {
              "useApifyProxy": true
            }
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}