{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Ads Transparency Center Scraper & Competitor Monitor",
    "description": "Fast HTTP-only Google Ads Transparency Center scraper. Bulk extract ads by domain, advertiser ID, or URL with region, format (Text/Image/Video), date filters, EU DSA details, and incremental new-ads competitor monitoring.",
    "version": "1.0",
    "x-build-id": "sLirfrJXZoHeuW1bi"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/clearstack-data~google-ads-transparency-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-clearstack-data-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/clearstack-data~google-ads-transparency-scraper/runs": {
      "post": {
        "operationId": "runs-sync-clearstack-data-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/clearstack-data~google-ads-transparency-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-clearstack-data-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": [
          "targets"
        ],
        "properties": {
          "targets": {
            "title": "Competitor Domains, Advertiser IDs, Names, or GATC URLs",
            "minItems": 1,
            "type": "array",
            "description": "List of competitor domains (e.g. 'stripe.com', 'shopify.com'), Google Advertiser IDs ('AR16951989901585285121'), Google Ads Transparency URLs, or advertiser names.",
            "items": {
              "type": "string"
            }
          },
          "region": {
            "title": "Region / Country Filter (ISO-2 or ALL)",
            "type": "string",
            "description": "Optional country filter (e.g. 'ALL', 'US', 'GB', 'FR', 'DE', 'CA', 'AU', 'ES', 'IT', 'NL', 'BE', 'CH', 'SE', 'PL', 'BR', 'IN', 'JP'). Defaults to 'ALL' (worldwide).",
            "default": "ALL"
          },
          "format": {
            "title": "Ad Format Filter",
            "enum": [
              "ALL",
              "TEXT",
              "IMAGE",
              "VIDEO"
            ],
            "type": "string",
            "description": "Filter ads by format: ALL, TEXT, IMAGE, or VIDEO.",
            "default": "ALL"
          },
          "dateRangeDays": {
            "title": "Shown Within Last N Days (0 = All Time)",
            "minimum": 0,
            "maximum": 1095,
            "type": "integer",
            "description": "Restrict results to ads shown in the last N days (e.g. 7, 30, 90). Set 0 for all available history.",
            "default": 30
          },
          "maxAdsPerTarget": {
            "title": "Max Ads per Target",
            "minimum": 1,
            "maximum": 2000,
            "type": "integer",
            "description": "Maximum number of ad creatives to extract per domain/advertiser.",
            "default": 40
          },
          "includeDetails": {
            "title": "Fetch Full Ad Details & EU DSA Transparency Data",
            "type": "boolean",
            "description": "When enabled, calls GetCreativeById for each ad to extract all creative variations, per-region delivery dates, and EU DSA targeting breakdowns.",
            "default": false
          },
          "onlyNewSinceLastRun": {
            "title": "Competitor Monitor Mode (Only New Ads Since Last Run)",
            "type": "boolean",
            "description": "When enabled, remembers previously seen creative IDs in a named Apify Key-Value Store and outputs/charges ONLY for brand-new ads launched since the previous run.",
            "default": false
          },
          "monitorStateName": {
            "title": "Monitor State Name (for Competitor Monitor Mode)",
            "type": "string",
            "description": "Identifier for the persistent Key-Value Store used when 'onlyNewSinceLastRun' is enabled (letters, numbers, hyphens).",
            "default": "default"
          },
          "concurrency": {
            "title": "Concurrency",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "Number of targets processed in parallel. Keep at 1 to avoid Google Transparency Center per-IP burst limits.",
            "default": 1
          },
          "requestDelayMs": {
            "title": "Delay Between Requests (ms)",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Polite delay between consecutive Google Ads Transparency RPC requests in milliseconds.",
            "default": 800
          },
          "timeoutMs": {
            "title": "Request Timeout (ms)",
            "minimum": 3000,
            "maximum": 30000,
            "type": "integer",
            "description": "Maximum wait time per upstream HTTP request in milliseconds.",
            "default": 15000
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}