{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Ads Transparency Scraper - Competitor Ads + OCR",
    "description": "Scrape the Google Ads Transparency Center by domain or advertiser ID to see competitor ads: text, image and video creatives, optional image-to-text OCR, country filters and observed-change tracking.",
    "version": "0.0",
    "x-build-id": "V9Vgi21lKrjApZWcH"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/leadproof~google-ads-transparency/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-leadproof-google-ads-transparency",
        "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/leadproof~google-ads-transparency/runs": {
      "post": {
        "operationId": "runs-sync-leadproof-google-ads-transparency",
        "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/leadproof~google-ads-transparency/run-sync": {
      "post": {
        "operationId": "run-sync-leadproof-google-ads-transparency",
        "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": "Domains or advertiser IDs",
            "minItems": 1,
            "maxItems": 50,
            "type": "array",
            "description": "Bare domains, AR advertiser IDs, or exact advertiser URLs without query strings. Domain results can include resellers and other advertisers. Company-name resolution is not supported in this prototype.",
            "items": {
              "type": "string"
            }
          },
          "region": {
            "title": "Region",
            "enum": [
              "ANYWHERE",
              "US",
              "GB",
              "DE",
              "FR",
              "IL",
              "CA",
              "AU",
              "NL",
              "BE",
              "ES",
              "IT"
            ],
            "type": "string",
            "description": "Source-side country filter. Regional detail is only returned when Google publishes it.",
            "default": "ANYWHERE"
          },
          "maxAds": {
            "title": "Maximum total ads",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Global output cap, after deduplication and date filtering.",
            "default": 20
          },
          "maxAdsPerTarget": {
            "title": "Maximum ads per target",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Maximum new unique rows returned for each target.",
            "default": 10
          },
          "maxPagesPerTarget": {
            "title": "Maximum pages per target",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Bounds collection even when all rows are duplicates or outside the date window.",
            "default": 3
          },
          "maxRequests": {
            "title": "Maximum HTTP requests",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Includes detail calls, preview requests, and retries. Partial coverage is reported.",
            "default": 100
          },
          "maxRunSeconds": {
            "title": "Collection time limit",
            "minimum": 10,
            "maximum": 900,
            "type": "integer",
            "description": "Bounds HTTP collection; output storage may add overhead.",
            "default": 180
          },
          "includeDetails": {
            "title": "Fetch creative details",
            "type": "boolean",
            "description": "One extra request per ad for variants and available regions. Failures retain the base record with an explicit status.",
            "default": true
          },
          "decodePreviews": {
            "title": "Read public creative renderers",
            "type": "boolean",
            "description": "Read at most two public Google preview scripts per ad to extract named text fields and video IDs. Scripts are parsed as text, never executed. More requests; not all formats are supported.",
            "default": false
          },
          "startDate": {
            "title": "First date of overlap window",
            "type": "string",
            "description": "Optional YYYY-MM-DD. Applied after collection using Google's first/last shown dates; does not prove continuous activity."
          },
          "endDate": {
            "title": "Last date of overlap window",
            "type": "string",
            "description": "Optional YYYY-MM-DD. Local overlap filter, not a source-side date filter. Page limits can leave incomplete coverage."
          },
          "monitorStoreName": {
            "title": "Optional monitor store",
            "type": "string",
            "description": "3-63 letters/digits/hyphens. Reuse with identical targets/filters and run only one job at a time per store. Labels observed changes; never reports removed ads or stopped campaigns."
          },
          "extractImageText": {
            "title": "Read text from preview images (OCR)",
            "type": "boolean",
            "description": "Local Tesseract OCR of at most two static Google archive images per ad. Returns separate ocrText and confidence fields, never guessed headlines. Adds image downloads and CPU time; best with 512 MB or more memory.",
            "default": false
          },
          "ocrLanguages": {
            "title": "OCR languages",
            "minItems": 1,
            "maxItems": 3,
            "type": "array",
            "description": "Choose 1-3 language models matching your ads: English, Turkish, Hebrew, French, German, Spanish, Italian, Portuguese, Dutch. No automatic language detection.",
            "items": {
              "type": "string"
            },
            "default": [
              "eng"
            ]
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}