{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Ads Transparency Scraper: Ads and Creatives",
    "description": "Scrape ads from the Google Ads Transparency Center by website domain, advertiser ID or advertiser name, with the ad content itself (headline, text, images, video links, display URL), ISO dates, exact limits and a monitoring mode for new creatives.",
    "version": "0.1",
    "x-build-id": "RdJO8k2cB2Sqf8g1u"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/garje~google-ads-transparency-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-garje-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/garje~google-ads-transparency-scraper/runs": {
      "post": {
        "operationId": "runs-sync-garje-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/garje~google-ads-transparency-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-garje-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": {
          "domains": {
            "title": "Website domains",
            "type": "array",
            "description": "Look up every advertiser running ads for these domains, in bulk (for example nike.com).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "advertiserIds": {
            "title": "Advertiser IDs",
            "type": "array",
            "description": "Transparency Center advertiser IDs, for example AR16735076323512287233 (shown in the advertiser's page URL).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "searchTerms": {
            "title": "Advertiser names",
            "type": "array",
            "description": "Advertiser names to search, for example nike. Google suggests several advertisers per name; every candidate is scored (1 means the name matches exactly once legal forms such as Inc. or GmbH are ignored) and saved in the SEARCH_MATCHES record. Only candidates scoring at least Minimum match score are scraped, and each row says which term and score found it.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "minMatchScore": {
            "title": "Minimum match score",
            "minimum": 0,
            "maximum": 1,
            "type": "number",
            "description": "Advertiser names need at least this score to be scraped: 1 means exact name matches only, 0.8 also accepts close spellings. Use advertiserIds when you know the exact advertiser.",
            "default": 1
          },
          "maxAdvertisersPerTerm": {
            "title": "Max advertisers per name",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "At most this many matching advertisers are scraped per name, best score first, then the one with the most ads.",
            "default": 3
          },
          "region": {
            "title": "Region",
            "type": "string",
            "description": "Two-letter ISO 3166 country code where the ads were shown, for example US or DE, or \"anywhere\". firstShown, lastShown and daysShown come back for every region.",
            "default": "anywhere"
          },
          "dateFrom": {
            "title": "Shown from",
            "type": "string",
            "description": "Only ads shown on or after this date. Defaults to 30 days before Shown until."
          },
          "dateTo": {
            "title": "Shown until",
            "type": "string",
            "description": "Only ads shown on or before this date. Defaults to today."
          },
          "formats": {
            "title": "Formats",
            "type": "array",
            "description": "Ad formats to include. Each row carries the format the Transparency Center reports.",
            "items": {
              "type": "string",
              "enum": [
                "text",
                "image",
                "video"
              ],
              "enumTitles": [
                "Text",
                "Image",
                "Video"
              ]
            },
            "default": [
              "text",
              "image",
              "video"
            ]
          },
          "platforms": {
            "title": "Platforms",
            "type": "array",
            "description": "Where the ads were shown, using the Transparency Center's own platform filter. Leave all selected for every platform. When some are selected, each row says which platform filter found it.",
            "items": {
              "type": "string",
              "enum": [
                "search",
                "youtube",
                "shopping",
                "maps",
                "play"
              ],
              "enumTitles": [
                "Google Search",
                "YouTube",
                "Google Shopping",
                "Google Maps",
                "Google Play"
              ]
            },
            "default": [
              "search",
              "youtube",
              "shopping",
              "maps",
              "play"
            ]
          },
          "includeCreativeContent": {
            "title": "Include creative content",
            "type": "boolean",
            "description": "Headline, text, image and video URLs and display URL for each ad. Most text ads are published as a single rendered image, which is returned as imageUrls. <a href=\"https://garje-data-notes.laude--pify.workers.dev/articles/text-ads-come-back-as-images.html\" target=\"_blank\">Read an example</a>.",
            "default": true
          },
          "downloadAssets": {
            "title": "Download images",
            "type": "boolean",
            "description": "Saves up to 3 images per ad to the run's key-value store. Each saved image is a separate paid event. Videos are YouTube links and are not downloaded.",
            "default": false
          },
          "maxAdsPerAdvertiser": {
            "title": "Max ads per advertiser",
            "minimum": 0,
            "type": "integer",
            "description": "Enforced exactly per advertiser. Set 0 for no limit.",
            "default": 100
          },
          "maxAdsPerDomain": {
            "title": "Max ads per domain",
            "minimum": 0,
            "type": "integer",
            "description": "Enforced exactly per domain in Website domains, across all its advertisers. Big brands have hundreds of resellers advertising their domain, so this keeps cost predictable. Set 0 for no limit.",
            "default": 200
          },
          "onlyNewSince": {
            "title": "Only ads first shown since",
            "type": "string",
            "description": "Monitoring mode: ISO date or date-time. Returns only ads first shown after it, so a scheduled run gives you just the new creatives. <a href=\"https://garje-data-notes.laude--pify.workers.dev/articles/new-google-ads-in-one-week.html\" target=\"_blank\">Read an example</a>."
          },
          "canary": {
            "title": "Drift canary (advanced)",
            "type": "object",
            "description": "For scheduled monitoring runs. Example: {\"baselineStore\": \"canary-baseline\", \"thresholdPoints\": 5}. The first run saves the null rate of key fields (and the mix of a status field) to that named key-value store; later runs compare and fail with an alert if any value moves by more than thresholdPoints percentage points. Leave empty for normal runs."
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Apify Proxy. Google throttles repeated requests from one IP, so a rotating proxy is needed.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}