{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Ads Transparency Scraper & Real-Time MCP Server",
    "description": "Extract Google Ads creatives, structured copy, EU DSA reach & targeting, political spend, fundedBy end-payers, KVS asset archiving, and batch B2B domain ad-spend signals in milliseconds via Go RPC + Standby /mcp. Independent tool, not affiliated with Google.",
    "version": "1.4",
    "x-build-id": "5yS2CSnqkjtAMSWvB"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/spiky_closet~google-ads-transparency-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-spiky_closet-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/spiky_closet~google-ads-transparency-scraper/runs": {
      "post": {
        "operationId": "runs-sync-spiky_closet-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/spiky_closet~google-ads-transparency-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-spiky_closet-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": {
          "query": {
            "title": "Target Query (Domain, Email, Brand, AR-ID, or URL)",
            "type": "string",
            "description": "Single target to extract: e.g. 'stripe.com', 'ceo@stripe.com', 'Stripe', '삼성전자', 'AR16951989901585285121', or a full Google Ads Transparency URL."
          },
          "queries": {
            "title": "Multiple Queries / Domains (Batch List)",
            "type": "array",
            "description": "Optional list of domains, brand names, Advertiser IDs, or Transparency URLs to process in a single run.",
            "items": {
              "type": "string"
            }
          },
          "urlsFromFile": {
            "title": "Bulk Domains / URLs Text (Newline or CSV)",
            "type": "string",
            "description": "Optional multiline, comma-separated, or tab-separated list of company domains, brand names, Advertiser IDs, or Transparency URLs."
          },
          "creativeIds": {
            "title": "Specific Creative IDs (Optional)",
            "type": "array",
            "description": "Optional CR... Creative IDs (pair with an AR... Advertiser ID in Target Query) or AR.../CR... shorthand pairs to fetch exact creatives.",
            "items": {
              "type": "string"
            }
          },
          "region": {
            "title": "Country / Region Filter (240+ GeoTargets + EU/EEA)",
            "type": "string",
            "description": "Real upstream Google GeoTarget filter: ISO-3166-1 alpha-2 code ('US', 'GB', 'DE', 'FR', 'KR', 'JP', 'SD'), regional macro ('EU', 'EEA'), English country name ('Germany', 'United States'), comma-separated list, or 'ANYWHERE' for worldwide.",
            "default": "ANYWHERE"
          },
          "format": {
            "title": "Ad Creative Format",
            "enum": [
              "ALL",
              "TEXT",
              "IMAGE",
              "VIDEO"
            ],
            "type": "string",
            "description": "Filter by exact Google Ads creative format enum.",
            "default": "ALL"
          },
          "platforms": {
            "title": "Google Platforms / Surfaces",
            "type": "array",
            "description": "Optional server-side Google surface filter. Leave empty for all surfaces.",
            "items": {
              "type": "string",
              "enum": [
                "SEARCH",
                "YOUTUBE",
                "SHOPPING",
                "MAPS",
                "PLAY"
              ],
              "enumTitles": [
                "Google Search",
                "YouTube",
                "Shopping",
                "Maps",
                "Play"
              ]
            }
          },
          "dateRangePreset": {
            "title": "Date Range Preset",
            "enum": [
              "ANYTIME",
              "TODAY",
              "YESTERDAY",
              "LAST_7_DAYS",
              "LAST_14_DAYS",
              "LAST_30_DAYS",
              "LAST_90_DAYS",
              "LAST_365_DAYS",
              "THIS_MONTH",
              "THIS_YEAR"
            ],
            "type": "string",
            "description": "Convenient rolling date window for manual runs or scheduled cron monitors. Ignored when custom Start/End Dates are set.",
            "default": "ANYTIME"
          },
          "startDate": {
            "title": "Shown On or After (Start Date)",
            "type": "string",
            "description": "Optional inclusive start date filter in YYYY-MM-DD format (e.g. '2026-01-01'). Overrides Date Range Preset when set."
          },
          "endDate": {
            "title": "Shown On or Before (End Date)",
            "type": "string",
            "description": "Optional inclusive end date filter in YYYY-MM-DD format (e.g. '2026-12-31'). Overrides Date Range Preset when set."
          },
          "sortBy": {
            "title": "Sort Order",
            "enum": [
              "DEFAULT",
              "LAST_ACTIVITY_DATE",
              "IMPRESSIONS",
              "REVENUE"
            ],
            "type": "string",
            "description": "Server-side creative sort order. Use IMPRESSIONS in EU/EEA to surface highest-reach ads first, or LAST_ACTIVITY_DATE for newest creatives.",
            "default": "DEFAULT"
          },
          "adTextKeyword": {
            "title": "Ad Copy Keyword Filter",
            "type": "string",
            "description": "Optional server-side keyword matched against ad copy text."
          },
          "politicalAds": {
            "title": "Political & Election Ads Archive",
            "type": "boolean",
            "description": "When true, queries Google's 7-year Political & Election Ads archive (populating spendMin/spendMax/spendCurrency and explicit age/gender/geo targeting).",
            "default": false
          },
          "maxResults": {
            "title": "Max Results (Hard Global Cap)",
            "minimum": 0,
            "type": "integer",
            "description": "Strict global cap across all queries (0 = unlimited for paying users). Guaranteed zero over-delivery.",
            "default": 100
          },
          "maxAdsPerSearch": {
            "title": "Max Ads Per Query / Domain",
            "minimum": 0,
            "type": "integer",
            "description": "Optional per-target creative cap when extracting multiple domains or queries in one batch (0 = governed by global maxResults)."
          },
          "maxAdvertisersPerQuery": {
            "title": "Max Regional Entities Per Brand Keyword",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "When searching a brand name (e.g. 'Samsung', 'Nike'), expand up to N verified regional legal entities (1-20).",
            "default": 5
          },
          "screeningMode": {
            "title": "Fast Batch Domain Ad-Check Mode",
            "type": "boolean",
            "description": "When true, emits 1 summary row per domain/query with active ad status, approximate ad count range (approxAdCountLow/High), primary verified legal entity, advertisersObserved, country, and latest ad date.",
            "default": false
          },
          "includeDetails": {
            "title": "Include Variations, EU DSA Reach/Audience & Intelligence Flags",
            "type": "boolean",
            "description": "Fetches A/B variations, per-country dates, EU DSA & US impression bounds, audience & demographic targeting, adCategory, agency end-payer (fundedBy), AI synthetic-media disclosure (containsSyntheticMedia), and Google Ad Grants status.",
            "default": false
          },
          "includeAdText": {
            "title": "Extract Structured Ad Copy & Destination URLs",
            "type": "boolean",
            "description": "Extracts structured adHeadline, adDescription, adDisplayUrl, adBusinessName, adTextLines, YouTube video IDs, and unwrapped click URLs from dynamic preview scripts (with variation fallback). Billed via ad-text PPE only when copy is actually extracted.",
            "default": false
          },
          "downloadAssets": {
            "title": "Archive Creative Images to Key-Value Store",
            "type": "boolean",
            "description": "Downloads static ad image assets to your default Apify Key-Value Store (signed storedImageUrl) so assets remain accessible even if upstream links expire.",
            "default": false
          },
          "maxAssetSizeKb": {
            "title": "Max Archived Asset Size (KB)",
            "minimum": 64,
            "maximum": 51200,
            "type": "integer",
            "description": "Maximum per-asset size in KB when Archiving is enabled (default 10,240 KB = 10 MB; larger assets are safely skipped).",
            "default": 10240
          },
          "onlyNewAds": {
            "title": "Monitor Mode: Emit Only Newly Launched Ads",
            "type": "boolean",
            "description": "Remembers seen creativeIds in a named Key-Value Store across scheduled runs (defaulting sortBy to LAST_ACTIVITY_DATE) so daily/weekly alerts only emit and bill genuinely new creatives.",
            "default": false
          },
          "monitorStoreName": {
            "title": "Monitor Key-Value Store Name",
            "type": "string",
            "description": "Named Apify Key-Value Store used when onlyNewAds is enabled (use separate names per monitored competitor).",
            "default": "ads-transparency-monitor"
          },
          "concurrency": {
            "title": "Worker Concurrency",
            "minimum": 1,
            "maximum": 32,
            "type": "integer",
            "description": "Parallel worker goroutines for batch screening and detail enrichment (1-32).",
            "default": 8
          },
          "requestDelayMs": {
            "title": "Request Pacing Delay (ms)",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Optional minimum delay in milliseconds between upstream requests (0 = automatic adaptive pacing; higher values can reduce rate limits on very large batches).",
            "default": 0
          },
          "maxRetries": {
            "title": "Max Upstream Retries",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Retry attempts on transient HTTP 429 or 5xx responses (1-10).",
            "default": 3
          },
          "proxyConfiguration": {
            "title": "Proxy Configuration",
            "type": "object",
            "description": "Optional Apify Proxy or custom HTTP/HTTPS proxy rotation for high-volume extraction."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}