{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Ads Transparency Scraper",
    "description": "Export the ads any advertiser runs on Google (Search, YouTube, Display, Shopping, Maps) from the Ads Transparency Center by name, domain or ID, with region, date and format filters, ad details, and a monitor mode that returns only new ads on scheduled runs.",
    "version": "0.1",
    "x-build-id": "cfYTyQlRcxP6TQyuh"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/atkvn~google-ads-transparency-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-atkvn-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/atkvn~google-ads-transparency-scraper/runs": {
      "post": {
        "operationId": "runs-sync-atkvn-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/atkvn~google-ads-transparency-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-atkvn-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": "Advertisers to look up",
            "type": "array",
            "description": "One per line. Each entry can be a domain (nike.com), an advertiser name (Shopify), an advertiser ID (AR16735076323512287233) or a Transparency Center URL (advertiser page, single ad page, or a ?domain= search). A domain returns ads from every advertiser that points ads at that domain. A name is resolved to the best-matching advertiser - use the domain or the ID when you need to be exact.",
            "items": {
              "type": "string"
            }
          },
          "region": {
            "title": "Region",
            "type": "string",
            "description": "Two-letter ISO country code (US, GB, DE, VN ...) to return only ads shown in that country, or \"anywhere\" for all regions.",
            "default": "anywhere"
          },
          "dateFrom": {
            "title": "Shown from",
            "type": "string",
            "description": "Only ads shown on or after this date (YYYY-MM-DD). Leave empty for no lower bound."
          },
          "dateTo": {
            "title": "Shown until",
            "type": "string",
            "description": "Only ads shown on or before this date (YYYY-MM-DD). Leave empty for no upper bound."
          },
          "format": {
            "title": "Ad format",
            "enum": [
              "all",
              "text",
              "image",
              "video"
            ],
            "type": "string",
            "description": "Return only text, image or video ads, or all formats.",
            "default": "all"
          },
          "platform": {
            "title": "Platform",
            "enum": [
              "all",
              "search",
              "youtube",
              "maps",
              "play",
              "shopping"
            ],
            "type": "string",
            "description": "Return only ads shown on one Google platform (same filter as the Transparency Center's Platform menu), or all platforms. Google only applies this filter to ads shown since 4 Sep 2023.",
            "default": "all"
          },
          "maxAdsPerQuery": {
            "title": "Max ads per query",
            "minimum": 0,
            "type": "integer",
            "description": "Stop each query after this many ads. 0 means no limit (large advertisers have tens of thousands of ads - set a limit or a maximum charge).",
            "default": 100
          },
          "includeDetails": {
            "title": "Include ad details",
            "type": "boolean",
            "description": "For every ad, also open its detail record: all regions it was shown in with first/last dates, EU impression ranges where Google publishes them, every creative variation's asset URL, the YouTube link for video ads, ad copy for the minority of text ads Google serves as HTML, and the advertiser's legal name, country and verification status. Charged as one extra \"ad-detail\" event per ad. Much slower than listing: one request per ad at a deliberately low pace.",
            "default": false
          },
          "onlyNewAds": {
            "title": "Monitor mode: only new ads",
            "type": "boolean",
            "description": "Return (and charge) only ads this monitor has not returned before and that Google first showed since its previous run (2-day margin). The first run returns the current ads as the baseline; schedule the same task daily or weekly to get just the creatives a competitor launched in between. Skipped ads are never charged.",
            "default": false
          },
          "monitorName": {
            "title": "Monitor name",
            "type": "string",
            "description": "Separate monitors keep separate memories (e.g. \"brand-a-us\", \"competitors-de\"). Stored in your named key-value store \"google-ads-transparency-monitor\"; delete its record to start over. Letters, digits, - _ . only.",
            "default": "default"
          },
          "maxAdvertisersPerName": {
            "title": "Advertisers per name query",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "When a query is a name, several advertisers can match (for example regional legal entities). 1 takes only the best match; raise it to include the next matches too.",
            "default": 1
          },
          "maxRequestsPerSecond": {
            "title": "Max requests per second",
            "type": "string",
            "description": "Request pace towards Google, between 0.1 and 2. Leave empty for the default: 1 per second when only listing ads (one request returns up to 100 ads) and 0.25 per second (one request every 4 seconds) when includeDetails is on, because details need one request per ad and Google rate limits an IP address that sends many of them quickly."
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Listing ads works without a proxy. With plain Apify Proxy (the default) the Actor connects directly first and switches to the proxy only if Google refuses the direct connection. Choose a proxy group or your own proxy URLs to always use the proxy.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}