{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Ads Transparency Scraper: Competitor Ads & Videos",
    "description": "Every Google ad an advertiser or domain runs: text, image and YouTube video ads with first and last shown dates, days running, preview images, YouTube links and countries. Search by brand, advertiser ID or domain. Fast HTTP, no browser.",
    "version": "1.0",
    "x-build-id": "sGNyGkVfI4esE32VS"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/ksvan~google-ads-transparency-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-ksvan-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/ksvan~google-ads-transparency-scraper/runs": {
      "post": {
        "operationId": "runs-sync-ksvan-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/ksvan~google-ads-transparency-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-ksvan-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": {
          "searchTerms": {
            "title": "Advertisers or domains",
            "type": "array",
            "description": "One per line: an advertiser name (e.g. Nike), an advertiser ID from the Ads Transparency Center (AR...), or a website domain (e.g. canva.com). Domains return every advertiser that runs ads for that site.",
            "items": {
              "type": "string"
            }
          },
          "region": {
            "title": "Country",
            "enum": [
              "anywhere",
              "AE",
              "AR",
              "AT",
              "AU",
              "BD",
              "BE",
              "BG",
              "BR",
              "CA",
              "CH",
              "CL",
              "CO",
              "CZ",
              "DE",
              "DK",
              "DZ",
              "EE",
              "EG",
              "ES",
              "FI",
              "FR",
              "GB",
              "GR",
              "HK",
              "HR",
              "HU",
              "ID",
              "IE",
              "IL",
              "IN",
              "IT",
              "JP",
              "KE",
              "KR",
              "KZ",
              "LT",
              "LV",
              "MA",
              "MX",
              "MY",
              "NG",
              "NL",
              "NO",
              "NZ",
              "PE",
              "PH",
              "PK",
              "PL",
              "PT",
              "RO",
              "RS",
              "SA",
              "SE",
              "SG",
              "SI",
              "SK",
              "TH",
              "TR",
              "TW",
              "UA",
              "US",
              "VN",
              "ZA"
            ],
            "type": "string",
            "description": "Where the ads were shown. Choose 'anywhere' for all countries.",
            "default": "US"
          },
          "maxAdsPerSearch": {
            "title": "Max ads per advertiser or domain",
            "minimum": 0,
            "type": "integer",
            "description": "0 = no limit (large advertisers can have 10,000+ ads). When you pick ad formats, the limit applies to each format.",
            "default": 100
          },
          "formats": {
            "title": "Ad formats",
            "type": "array",
            "description": "Leave empty for all formats. Filtering happens on Google's side, so a video-only search is fast even for advertisers with thousands of text ads.",
            "items": {
              "type": "string",
              "enum": [
                "TEXT",
                "IMAGE",
                "VIDEO"
              ],
              "enumTitles": [
                "Text",
                "Image",
                "Video"
              ]
            },
            "default": []
          },
          "lastShownAfter": {
            "title": "Shown after (date)",
            "type": "string",
            "description": "Keep only ads last shown on or after this date (YYYY-MM-DD).",
            "default": ""
          },
          "extractVideoIds": {
            "title": "YouTube links for video ads",
            "type": "boolean",
            "description": "Find the YouTube video ID and URL of every video ad.",
            "default": true
          },
          "includeDetails": {
            "title": "Ad details (variations and countries)",
            "type": "boolean",
            "description": "Also collect every creative variation and the list of countries where the ad ran. One extra request per ad, billed as an ad with details.",
            "default": false
          },
          "allMatchingAdvertisers": {
            "title": "All advertisers matching a name",
            "type": "boolean",
            "description": "For names, scrape every matching advertiser instead of only the largest one.",
            "default": false
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Parallel requests.",
            "default": 5
          },
          "maxRetries": {
            "title": "Retries per request",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Attempts per request, each on a new proxy IP.",
            "default": 5
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Apify Proxy is used by default; the Actor switches to residential IPs automatically if Google starts blocking.",
            "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
                  },
                  "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}