{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Ads Transparency Scraper",
    "description": "Scrape every Google ad of any brand, website or advertiser from the Google Ads Transparency Center: ad text, images, YouTube videos, first/last shown dates, countries, impressions and political spend. Fast JSON API, no browser, no login.",
    "version": "1.0",
    "x-build-id": "1IzzLWyny3hEakkGs"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/worshipful_knife~google-ads-transparency/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-worshipful_knife-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/worshipful_knife~google-ads-transparency/runs": {
      "post": {
        "operationId": "runs-sync-worshipful_knife-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/worshipful_knife~google-ads-transparency/run-sync": {
      "post": {
        "operationId": "run-sync-worshipful_knife-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",
        "properties": {
          "domains": {
            "title": "Websites (domains)",
            "type": "array",
            "description": "Advertiser websites to look up, e.g. nike.com. Returns every ad Google links to that domain (all advertisers that run ads for it). You can paste full URLs; the domain is extracted.",
            "items": {
              "type": "string"
            }
          },
          "advertiserNames": {
            "title": "Advertiser / brand names",
            "type": "array",
            "description": "Brand or company names, e.g. \"Nike\" or \"HubSpot\". Each name is matched to the largest Google advertiser account with that name (see \"Advertisers per name\").",
            "items": {
              "type": "string"
            }
          },
          "advertiserIds": {
            "title": "Advertiser IDs",
            "type": "array",
            "description": "Google advertiser IDs (start with AR, e.g. AR16735076323512287233). Find them in the Transparency Center URL: adstransparency.google.com/advertiser/AR...",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "Transparency Center URLs",
            "type": "array",
            "description": "Paste links from adstransparency.google.com: advertiser pages, single ad (creative) pages or domain searches. Filters in the link (region, format, platform, dates) are applied to that link.",
            "items": {
              "type": "string"
            }
          },
          "maxAdvertisersPerName": {
            "title": "Advertisers per name",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How many matching advertiser accounts to scrape for each advertiser name (largest first). Big brands often have several accounts (per country or agency).",
            "default": 1
          },
          "region": {
            "title": "Region",
            "type": "string",
            "description": "Two-letter country code where the ads were shown (US, GB, FR, DE, MA...), or \"anywhere\" for all countries. Impression counts are only published for ads shown in the EU/Türkiye and for political ads.",
            "default": "anywhere"
          },
          "startDate": {
            "title": "Shown from",
            "type": "string",
            "description": "Only ads shown on or after this date (YYYY-MM-DD). Google keeps about the last 12 months of dates for non-political ads."
          },
          "endDate": {
            "title": "Shown until",
            "type": "string",
            "description": "Only ads shown on or before this date (YYYY-MM-DD)."
          },
          "adFormat": {
            "title": "Ad format",
            "enum": [
              "ALL",
              "TEXT",
              "IMAGE",
              "VIDEO"
            ],
            "type": "string",
            "description": "Only return ads of this format.",
            "default": "ALL"
          },
          "platform": {
            "title": "Google platform",
            "enum": [
              "ALL",
              "SEARCH",
              "YOUTUBE",
              "SHOPPING",
              "MAPS",
              "PLAY"
            ],
            "type": "string",
            "description": "Only ads shown on this Google platform. Google applies this filter only to ads shown since September 2023.",
            "default": "ALL"
          },
          "politicalAdsOnly": {
            "title": "Political ads only",
            "type": "boolean",
            "description": "Search the political ads library instead: adds spend range and impressions range for each ad. Leave websites/advertisers empty to list all political ads of the region.",
            "default": false
          },
          "maxResults": {
            "title": "Max ads per website / advertiser",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum number of ads to return for each domain, advertiser or URL. 0 = no limit (big brands can have tens of thousands of ads). You only pay for ads returned.",
            "default": 100
          },
          "includeAdContent": {
            "title": "Include ad text and media",
            "type": "boolean",
            "description": "Read each ad's preview to get the headline, description and display URL (text ads), YouTube video ID and URL (video ads), product title (Shopping ads) and image URLs. Included in the price; turn off only for maximum speed.",
            "default": true
          },
          "includeDetails": {
            "title": "Include regions and reach",
            "type": "boolean",
            "description": "Fetch each ad's details: all countries where it ran with first/last shown dates, impressions ranges per country and platform (EU/Türkiye and political ads), and all ad variations. Included in the price; turn off for faster runs.",
            "default": true
          },
          "includeAdvertiserSummary": {
            "title": "Add advertiser summary rows",
            "type": "boolean",
            "description": "Also add one row per advertiser found (type = \"advertiser\"): verified status, legal name, country, number of ads scraped, formats and domains. Each summary row counts as one result.",
            "default": false
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Parallel requests. Google rate-limits each IP, so higher values need a proxy (each parallel slot uses its own proxy IP).",
            "default": 5
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Google blocks an IP after a burst of requests; the scraper rotates proxy IPs automatically when that happens. Without a proxy, runs are paced slowly.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}