{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Ads Transparency Scraper",
    "description": "Every Google ad of a brand, domain or advertiser: dates, formats, regions, impressions, headlines, Shopping products and YouTube IDs. Fast, no login.",
    "version": "0.1",
    "x-build-id": "VjzHl33rQus1CXLMM"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/magic-scraper~google-ads-transparency-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-magic-scraper-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/magic-scraper~google-ads-transparency-scraper/runs": {
      "post": {
        "operationId": "runs-sync-magic-scraper-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/magic-scraper~google-ads-transparency-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-magic-scraper-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": {
          "queries": {
            "title": "🔍 Brand or advertiser names",
            "type": "array",
            "description": "Advertiser names such as 'Nike' or 'HubSpot'. The best-matching advertiser accounts are looked up and their ads collected. Use Domains or Advertiser IDs for an exact match.",
            "items": {
              "type": "string"
            }
          },
          "domains": {
            "title": "🌐 Domains",
            "type": "array",
            "description": "Websites the ads point to, e.g. nike.com. Finds ads from every advertiser that sends traffic to this domain.",
            "items": {
              "type": "string"
            }
          },
          "advertiserIds": {
            "title": "🆔 Advertiser IDs",
            "type": "array",
            "description": "Google advertiser IDs (AR followed by 20 digits), e.g. AR16735076323512287233. Shown in the Transparency Center URL of an advertiser.",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "🔗 Transparency Center URLs",
            "type": "array",
            "description": "Advertiser, domain-search or single-ad URLs from adstransparency.google.com. Filters in the URL (region, format, platform, dates) are applied.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "maxAdsPerTarget": {
            "title": "💯 Max ads per target",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Stop after this many ads for each query, domain, advertiser or URL. You pay per saved ad.",
            "default": 50
          },
          "maxAdvertisersPerQuery": {
            "title": "🏢 Advertisers per name query",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How many matching advertiser accounts to collect for each brand name (companies often have several accounts).",
            "default": 1
          },
          "region": {
            "title": "🌍 Country where ads were shown",
            "type": "string",
            "description": "Two-letter country code (US, DE, GB, FR, ...) or ANYWHERE. Empty means anywhere."
          },
          "adFormat": {
            "title": "🎞 Ad format",
            "enum": [
              "ALL",
              "TEXT",
              "IMAGE",
              "VIDEO"
            ],
            "type": "string",
            "description": "Collect only this format. Search text ads are mostly archived as screenshots; ads with a rendered preview also return headline and description.",
            "default": "ALL"
          },
          "platforms": {
            "title": "📺 Platforms",
            "type": "array",
            "description": "Only ads shown on these Google surfaces. Leave empty for all.",
            "items": {
              "type": "string",
              "enum": [
                "SEARCH",
                "YOUTUBE",
                "SHOPPING",
                "MAPS",
                "PLAY"
              ],
              "enumTitles": [
                "Google Search",
                "YouTube",
                "Google Shopping",
                "Google Maps",
                "Google Play"
              ]
            }
          },
          "startDate": {
            "title": "📅 Shown on or after",
            "type": "string",
            "description": "Date in YYYY-MM-DD format."
          },
          "endDate": {
            "title": "📅 Shown on or before",
            "type": "string",
            "description": "Date in YYYY-MM-DD format."
          },
          "includeDetails": {
            "title": "🔬 Include details",
            "type": "boolean",
            "description": "Adds per-country first/last shown dates and impression ranges, per-surface stats and all creative variations, plus what Google's ad preview contains: headline, description and display URL (search and local ads), product title, price and merchant (Shopping ads), business address (Maps ads), YouTube video ID and thumbnail (video ads). Slower: about 3-4 ads per second.",
            "default": false
          },
          "onlyNewAds": {
            "title": "🆕 Only new ads (monitoring)",
            "type": "boolean",
            "description": "Return only ads not seen in earlier runs with the same search. Schedule the actor to watch a competitor. Seen ads are remembered in a named storage in your account.",
            "default": false
          },
          "maxConcurrency": {
            "title": "⚙ Parallel requests",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "Detail lookups run in parallel up to this number.",
            "default": 10
          },
          "maxRequestsPerSecond": {
            "title": "⏱ Requests per second",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Starting request rate to Google in details mode. The actor slows down automatically when Google signals a rate limit and speeds back up afterwards.",
            "default": 6
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Leave as is. Ad search works from any IP without a proxy. Ad details are limited by Google to about 100 per IP, so with Include details on the actor rotates residential IPs automatically (included in the price). Set your own proxy only if you need to; Apify datacenter IPs are already rate-limited by Google.",
            "default": {
              "useApifyProxy": false
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}