{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Ads Transparency Scraper — Competitor Ads & Monitor",
    "description": "Scrape Google Ads Transparency Center ads by domain, brand, or advertiser ID. Get creatives, landing URLs, days running, and region, and monitor new versus ended ads. A Google Ads Transparency API alternative for Python, Node.js, and MCP.",
    "version": "1.0",
    "x-build-id": "2yQvewXhc17wpNqQI"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/crawloop~google-ads-transparency-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-crawloop-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/crawloop~google-ads-transparency-scraper/runs": {
      "post": {
        "operationId": "runs-sync-crawloop-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/crawloop~google-ads-transparency-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-crawloop-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": {
          "mode": {
            "title": "Mode",
            "enum": [
              "ads",
              "advertisers",
              "monitor"
            ],
            "type": "string",
            "description": "ads = creatives (default). advertisers = one summary row per advertiser (ad-check / lead-gen). monitor = snapshot creative IDs in a named KV store and emit new + ended ads.",
            "default": "ads"
          },
          "domains": {
            "title": "Domains",
            "type": "array",
            "description": "Advertiser websites (nike.com). Protocol and www are stripped. Best starting point for competitor intel.",
            "items": {
              "type": "string"
            }
          },
          "queries": {
            "title": "Brand names",
            "type": "array",
            "description": "Free-text advertiser names resolved via Transparency Center suggestions (Nike, HelloFresh). Use when you do not have the AR… ID yet.",
            "items": {
              "type": "string"
            }
          },
          "advertiserIds": {
            "title": "Advertiser IDs",
            "type": "array",
            "description": "Stable Google advertiser IDs starting with AR (from the Transparency Center URL). Deterministic — preferred for scheduled monitors.",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "Start URLs",
            "type": "array",
            "description": "Paste Ads Transparency Center URLs: advertiser pages, creative pages, or ?domain= search pages.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "region": {
            "title": "Region",
            "type": "string",
            "description": "ISO 3166-1 alpha-2 country (US, DE, GB) or ANYWHERE. Applied as a Transparency Center region filter when the RPC accepts it; the value is always stored on each row.",
            "default": "US"
          },
          "platforms": {
            "title": "Platforms",
            "type": "array",
            "description": "Restrict to Google surfaces. Empty = all. Google only applies platform filters to ads shown on/after 2023-09-04.",
            "items": {
              "type": "string",
              "enum": [
                "SEARCH",
                "YOUTUBE",
                "SHOPPING",
                "MAPS",
                "PLAY"
              ],
              "enumTitles": [
                "Google Search",
                "YouTube",
                "Shopping",
                "Maps",
                "Play"
              ]
            },
            "default": []
          },
          "adFormat": {
            "title": "Ad format",
            "enum": [
              "ALL",
              "text",
              "image",
              "video"
            ],
            "type": "string",
            "description": "Filter by creative format.",
            "default": "ALL"
          },
          "dateFrom": {
            "title": "Shown after",
            "type": "string",
            "description": "Keep ads whose last-shown date is on or after this day (YYYY-MM-DD)."
          },
          "dateTo": {
            "title": "Shown before",
            "type": "string",
            "description": "Keep ads whose first-shown date is on or before this day (YYYY-MM-DD)."
          },
          "maxAdsPerTarget": {
            "title": "Max ads per target",
            "minimum": 0,
            "type": "integer",
            "description": "Cap creatives per domain/advertiser. 0 = paginate until Google stops (still bounded by a safety page cap).",
            "default": 100
          },
          "maxAdvertisersPerQuery": {
            "title": "Max advertisers per brand query",
            "minimum": 1,
            "maximum": 25,
            "type": "integer",
            "description": "When a brand name matches several AR accounts, how many to scrape.",
            "default": 5
          },
          "maxItems": {
            "title": "Max dataset items",
            "minimum": 0,
            "type": "integer",
            "description": "Hard cap on pushed rows (all types). 0 = unlimited.",
            "default": 0
          },
          "includeDetails": {
            "title": "Fetch full creative details",
            "type": "boolean",
            "description": "One extra RPC per ad: variations plus per-country first/last shown when Google discloses them. Slower; billed as a separate event.",
            "default": false
          },
          "outputMode": {
            "title": "Monitor output",
            "enum": [
              "all",
              "changes_only",
              "new_only",
              "ended_only"
            ],
            "type": "string",
            "description": "In monitor mode: all = new + active + ended; changes_only = new + ended; new_only / ended_only = one side.",
            "default": "changes_only"
          },
          "monitorStoreName": {
            "title": "Monitor KV store name",
            "type": "string",
            "description": "Named Key-Value Store for seen creative IDs. Use a distinct name per competitor set so histories do not mix. Alias: monitorId.",
            "default": "google-ads-transparency-monitor"
          },
          "monitorBaselineOnly": {
            "title": "Monitor baseline only",
            "type": "boolean",
            "description": "First run: seed KV creative IDs without emitting rows or webhooks.",
            "default": false
          },
          "resetMonitorState": {
            "title": "Reset monitor state",
            "type": "boolean",
            "description": "Clear MONITOR_STATE in the named store before this run.",
            "default": false
          },
          "webhookUrl": {
            "title": "Webhook URL",
            "type": "string",
            "description": "Slack / Discord / custom HTTPS endpoint for monitor alerts (JSON POST)."
          },
          "telegramToken": {
            "title": "Telegram Bot Token",
            "type": "string",
            "description": "Optional Telegram bot token for monitor alerts."
          },
          "telegramChatId": {
            "title": "Telegram Chat ID",
            "type": "string",
            "description": "Telegram chat/user ID for alerts (requires token)."
          },
          "notifyOnNewAds": {
            "title": "Notify on new ads",
            "type": "boolean",
            "description": "Send webhook/Telegram when a creative ID appears that was not in the previous snapshot.",
            "default": true
          },
          "notifyOnEndedAds": {
            "title": "Notify on ended ads",
            "type": "boolean",
            "description": "Send webhook/Telegram when a previously seen creative ID is gone from the current snapshot.",
            "default": true
          },
          "includeRawData": {
            "title": "Include raw RPC payload",
            "type": "boolean",
            "description": "Attach decoded proto-JSON on each row for debugging. Off by default.",
            "default": false
          },
          "requestDelaySecs": {
            "title": "Delay between RPC calls (seconds)",
            "minimum": 0,
            "maximum": 5,
            "type": "number",
            "description": "Polite spacing. Raise if you see HTTP 429.",
            "default": 0.35
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Residential proxies recommended for scheduled bulk monitors. Datacenter often works for small lookups.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ],
              "apifyProxyCountry": "US"
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}