{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Ads Library Scraper",
    "description": "Scrapes ads from the Google Ads Transparency Center. Returns creative content, advertiser info, ad format, dates, and asset URLs.",
    "version": "0.0",
    "x-build-id": "g9yYp7Ht4UnsUs84H"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/practicaltools~google-ad-library-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-practicaltools-google-ad-library-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/practicaltools~google-ad-library-scraper/runs": {
      "post": {
        "operationId": "runs-sync-practicaltools-google-ad-library-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/practicaltools~google-ad-library-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-practicaltools-google-ad-library-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": [
          "query"
        ],
        "properties": {
          "query": {
            "title": "Search Query",
            "type": "string",
            "description": "Website or advertiser to look up ads for — e.g. 'nike.com' (website) or 'Nike' (advertiser name). Required: Google's Transparency Center has no browse-everything mode, every search must be scoped to a website or an advertiser.",
            "default": ""
          },
          "queryType": {
            "title": "Query Type",
            "enum": [
              "auto",
              "domain",
              "advertiser"
            ],
            "type": "string",
            "description": "How to interpret the query. 'Auto' treats domain-shaped queries (nike.com) as websites and everything else as an advertiser name, falling back to the other if the first finds nothing.",
            "default": "auto"
          },
          "maxAdvertisers": {
            "title": "Max Advertisers",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "For advertiser-name queries: how many matching advertisers to pull ads from. Names are ranked by exact match, then Google's verified flag, then ad volume. Raise it for broad terms like 'insurance', lower it to 1 to stay on a single brand.",
            "default": 10
          },
          "region": {
            "title": "Region",
            "enum": [
              "anywhere",
              "US",
              "GB",
              "CA",
              "DE",
              "FR",
              "JP",
              "AU",
              "BR",
              "IN",
              "AT",
              "BE",
              "BG",
              "HR",
              "CY",
              "CZ",
              "DK",
              "EE",
              "FI",
              "GR",
              "HU",
              "IS",
              "IE",
              "IT",
              "LV",
              "LI",
              "LT",
              "LU",
              "MT",
              "NL",
              "NO",
              "PL",
              "PT",
              "RO",
              "SK",
              "SI",
              "ES",
              "SE",
              "CH",
              "TR",
              "MX",
              "KR",
              "SG",
              "NZ",
              "ZA",
              "AE",
              "SA",
              "IL",
              "TH",
              "VN",
              "PH",
              "MY",
              "ID",
              "CL",
              "CO",
              "AR",
              "PE",
              "NG",
              "KE",
              "EG",
              "MA",
              "UA",
              "PK",
              "BD",
              "TW",
              "HK"
            ],
            "type": "string",
            "description": "Country to filter ads by. Google's Ad Transparency Center covers most countries worldwide.",
            "default": "anywhere"
          },
          "platform": {
            "title": "Platform",
            "enum": [
              "all",
              "search",
              "youtube",
              "play",
              "maps",
              "shopping"
            ],
            "type": "string",
            "description": "Filter by Google platform where the ad appeared.",
            "default": "all"
          },
          "creativeFormat": {
            "title": "Ad Format",
            "enum": [
              "all",
              "text",
              "image",
              "video"
            ],
            "type": "string",
            "description": "Filter by creative format.",
            "default": "all"
          },
          "dateStart": {
            "title": "Start Date",
            "type": "string",
            "description": "Start date in YYYY-MM-DD format (optional). Leave empty to use timeframe.",
            "default": ""
          },
          "dateEnd": {
            "title": "End Date",
            "type": "string",
            "description": "End date in YYYY-MM-DD format (optional). Leave empty to use timeframe.",
            "default": ""
          },
          "timeframe": {
            "title": "Timeframe",
            "enum": [
              "7d",
              "30d",
              "90d",
              "180d",
              "365d",
              "730d"
            ],
            "type": "string",
            "description": "Date range to search within, relative to today. Only used when Start/End Date are not set.",
            "default": "365d"
          },
          "limit": {
            "title": "Max Ads",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Maximum number of ads to collect. Google returns up to 100 per page.",
            "default": 20
          },
          "scrapeAdDetails": {
            "title": "Scrape Ad Details",
            "type": "boolean",
            "description": "Fetch full creative detail for each ad. Recommended: the search response alone returns only a sparse subset of assets, while this yields roughly 2.5x as many downloadable images. Costs one extra request per ad (a 20-ad run makes 21 requests instead of 1), so turn it off for fast listings or if Google is rate limiting you. Note: landingPage and regions are not yet populated either way.",
            "default": true
          },
          "proxyConfiguration": {
            "title": "Proxy Configuration",
            "type": "object",
            "description": "Optional proxy settings. On the Apify platform, Apify proxy is used automatically. Override here to use residential proxies if needed.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": []
            }
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}