{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Ads Transparency Scraper",
    "description": "Scrape Google Ads Transparency Center: every Search, YouTube, Maps, Play and Shopping ad of a brand, domain or advertiser, with dates, formats, images, per-country stats, EU impressions and new-ad monitoring. Fast, no browser.",
    "version": "0.0",
    "x-build-id": "5xYnynORlf7wgchMo"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/rakish_bobby_gwr~google-ads-transparency-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-rakish_bobby_gwr-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/rakish_bobby_gwr~google-ads-transparency-scraper/runs": {
      "post": {
        "operationId": "runs-sync-rakish_bobby_gwr-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/rakish_bobby_gwr~google-ads-transparency-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-rakish_bobby_gwr-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",
        "required": [
          "queries"
        ],
        "properties": {
          "queries": {
            "title": "Brands, domains or advertiser IDs",
            "type": "array",
            "description": "One per line. A brand name (\"HelloFresh\") is matched to the advertiser accounts with that name. A domain (\"nike.com\") returns every ad that points to that website, from any advertiser. An advertiser ID (\"AR17410177287600472065\") or a Transparency Center URL returns that advertiser's ads.",
            "items": {
              "type": "string"
            }
          },
          "resultType": {
            "title": "What to return",
            "enum": [
              "ads",
              "advertisers"
            ],
            "type": "string",
            "description": "\"Ads\" returns one row per ad creative. \"Advertisers\" returns advertiser accounts instead of ads: for a brand name the matching accounts with their country and approximate number of ads, for a domain the accounts that run ads pointing to it (from up to \"Max ads per query\" recent ads).",
            "default": "ads"
          },
          "region": {
            "title": "Region",
            "type": "string",
            "description": "Only ads shown in this country. \"Anywhere\" returns ads from all countries.",
            "default": "anywhere"
          },
          "platform": {
            "title": "Platform",
            "enum": [
              "",
              "SEARCH",
              "YOUTUBE",
              "MAPS",
              "PLAY",
              "SHOPPING"
            ],
            "type": "string",
            "description": "Only ads shown on this Google surface.",
            "default": ""
          },
          "adFormat": {
            "title": "Ad format",
            "enum": [
              "",
              "TEXT",
              "IMAGE",
              "VIDEO"
            ],
            "type": "string",
            "description": "Only ads of this format.",
            "default": ""
          },
          "startDate": {
            "title": "Shown on or after",
            "pattern": "^(\\d{4}-\\d{2}-\\d{2}|\\d+ ?days?)?$",
            "type": "string",
            "description": "Only ads shown on or after this date. Use YYYY-MM-DD or a relative value such as \"30 days\"."
          },
          "endDate": {
            "title": "Shown on or before",
            "pattern": "^(\\d{4}-\\d{2}-\\d{2}|\\d+ ?days?)?$",
            "type": "string",
            "description": "Only ads shown on or before this date (YYYY-MM-DD). Leave empty for today."
          },
          "maxAdsPerQuery": {
            "title": "Max ads per query",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after this many ads for each brand, domain or advertiser. 0 means all ads (large advertisers have tens of thousands).",
            "default": 100
          },
          "maxAdvertisersPerQuery": {
            "title": "Max advertiser accounts per brand name",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "A brand name can match several advertiser accounts (for example one per country). The best matches are used, up to this number.",
            "default": 3
          },
          "includeDetails": {
            "title": "Add per-country details",
            "type": "boolean",
            "description": "One extra request per ad adds every country the ad ran in with its first and last shown date, the impression ranges Google publishes for EU countries, per-platform impressions and all creative variations. Charged as an extra event per ad.",
            "default": false
          },
          "includeAdContent": {
            "title": "Add ad copy and video link",
            "type": "boolean",
            "description": "Adds the YouTube video link of video ads and the text shown in text ads (headline, description, display URL, sitelinks) on a best-effort basis. Image ads already include the image URL. Charged as an extra event per ad.",
            "default": false
          },
          "onlyNewAds": {
            "title": "Only new ads (monitoring)",
            "type": "boolean",
            "description": "The first run returns ads as usual and starts monitoring. Later runs check the most recently shown ads (up to \"Max ads per query\") and return only those first shown after monitoring started and not returned before. Each query and filter combination is tracked separately.",
            "default": false
          },
          "monitorStoreName": {
            "title": "Monitoring storage name",
            "type": "string",
            "description": "Name of the key-value store that remembers which ads were already returned. Use different names to keep independent monitors.",
            "default": "ads-transparency-monitor"
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many queries are processed in parallel.",
            "default": 3
          },
          "maxRequestRetries": {
            "title": "Max retries per request",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "How many times a request is retried from a new IP address when Google rate-limits it.",
            "default": 6
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Google rate-limits the Transparency Center per IP address. Residential proxies are recommended.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}