{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Ads Scraper",
    "description": "Extract up to 400 ads per minute along with text, image and video ads from Google Ads, scraped from the ad library provided by the Google Ads Transparency Center. Gain access to ad details, ad copy, locations and more for a faster competitive edge.",
    "version": "5.0",
    "x-build-id": "xDNsZ7neEBy6ZizT1"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/silva95gustavo~google-ads-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-silva95gustavo-google-ads-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/silva95gustavo~google-ads-scraper/runs": {
      "post": {
        "operationId": "runs-sync-silva95gustavo-google-ads-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/silva95gustavo~google-ads-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-silva95gustavo-google-ads-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 names or search terms",
            "type": "array",
            "description": "Search advertiser names (Nike) or domains (nike.com).",
            "items": {
              "type": "string"
            }
          },
          "domains": {
            "title": "Domains (exact)",
            "type": "array",
            "description": "Find ads for websites, such as nike.com or https://nike.com.",
            "items": {
              "type": "string"
            }
          },
          "advertiserIds": {
            "title": "Advertiser IDs",
            "type": "array",
            "description": "Google advertiser IDs, such as AR16735076323512287233.",
            "items": {
              "type": "string"
            }
          },
          "resultsLimit": {
            "title": "Results limit",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum ads per query, shared across its matches. Applies separately to each explicit domain, advertiser ID or search URL. Empty or null means unlimited."
          },
          "maxAdvertisersPerQuery": {
            "title": "Maximum advertisers per query",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Maximum advertiser accounts per query (1–20). Empty or null uses 5. Domain suggestions are separate.",
            "default": 5
          },
          "region": {
            "title": "Country where ads were shown",
            "type": "string",
            "description": "Where ads were shown: a country code such as US or DE, or ANYWHERE for all countries. Leave empty to search anywhere."
          },
          "startDate": {
            "title": "Shown on or after",
            "type": "string",
            "description": "Include ads shown on or after this date (YYYY-MM-DD)."
          },
          "endDate": {
            "title": "Shown on or before",
            "type": "string",
            "description": "Include ads shown on or before this date (YYYY-MM-DD)."
          },
          "adFormat": {
            "title": "Ad format",
            "type": "string",
            "description": "Ad format to collect. Defaults to ALL. Applies to queries, domains and advertiserIds; URLs use their own filters."
          },
          "platforms": {
            "title": "Platforms",
            "type": "array",
            "description": "Collect ads shown on any selected platform. Leave empty for all platforms. Applies to queries, domains and advertiserIds; URLs use their own filters.",
            "items": {
              "type": "string",
              "enumTitles": [
                "Google Search",
                "YouTube",
                "Shopping",
                "Maps",
                "Google Play"
              ],
              "enumSuggestedValues": [
                "SEARCH",
                "YOUTUBE",
                "SHOPPING",
                "MAPS",
                "PLAY"
              ]
            }
          },
          "topic": {
            "title": "Ad topic",
            "type": "string",
            "description": "ALL (default) or POLITICAL. Political name searches discover political advertisers; their ads are also restricted to political ads. Applies to queries, domains and advertiserIds; URLs use their own filters."
          },
          "skipDetails": {
            "title": "Skip details ⚡ (~4x faster)",
            "type": "boolean",
            "description": "If true, the actor will not open the details page for each individual ad. Instead, it will only scroll through the list of ads. All ads will be included, but the information for each ad may be less complete. Enabling this option results in much faster scraping.",
            "default": false
          },
          "shouldDownloadAssets": {
            "title": "Should download assets?",
            "type": "boolean",
            "description": "Defines if the scraper should download creative assets (such as video ads) when the original URLs scraped have short expiry dates. This allows for more permanent storage of the files. Disclaimer: use this option with caution to avoid downloading excessive data from Google, which could be considered abusive. This option is ignored if \"Skip details\" is enabled.",
            "default": false
          },
          "shouldDownloadPreviews": {
            "title": "Should download previews?",
            "type": "boolean",
            "description": "Defines if the scraper should download creative previews as an HTML file, ensuring that the output field `previewUrl` is always populated. Enabling this option may slightly increase costs due to writes to a key-value store.",
            "default": false
          },
          "ocr": {
            "title": "Use OCR for text ads",
            "type": "boolean",
            "description": "Enables OCR (Optical Character Recognition) using AI for text ads, allowing the scraper to extract text from images in text ads. This is useful for ads that do not have text content directly available as copyable text. Note: Enabling OCR will significantly slow down the scraping speed. OCR is not perfect and may miss or misread some text. This option is ignored if \"Skip details\" is enabled.",
            "default": false
          },
          "startUrls": {
            "title": "Google Ads Transparency Center URLs",
            "type": "array",
            "description": "Paste advertiser, domain-search or individual-ad URLs. Each URL uses its own filters.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}