{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Ads Transparency API: Competitor Ads by Domain or Brand",
    "description": "Every ad a competitor runs on Google Search, YouTube, Display, Maps and Play, from Google's Ads Transparency Center. Search by website domain, brand name or advertiser ID. Get format, first and last shown dates, image links, YouTube video links and optional per-country reach. $1 per 1,000 ads.",
    "version": "0.1",
    "x-build-id": "nGyNA7lUsz4iWwzTR"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/sauliusautomatesit~google-ads-transparency-api/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-sauliusautomatesit-google-ads-transparency-api",
        "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/sauliusautomatesit~google-ads-transparency-api/runs": {
      "post": {
        "operationId": "runs-sync-sauliusautomatesit-google-ads-transparency-api",
        "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/sauliusautomatesit~google-ads-transparency-api/run-sync": {
      "post": {
        "operationId": "run-sync-sauliusautomatesit-google-ads-transparency-api",
        "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": "Domains, brands, advertiser IDs or Transparency Center URLs",
            "type": "array",
            "description": "One per line. A website domain (`nike.com`) returns every advertiser that runs ads pointing to it, which is the most complete option. A brand name (`HubSpot`) is matched to Google's verified advertiser names. An advertiser ID (`AR16735076323512287233`) or a Transparency Center URL (advertiser, creative or domain page) is used as is.",
            "items": {
              "type": "string"
            }
          },
          "mode": {
            "title": "What to get",
            "enum": [
              "ads",
              "advertisers"
            ],
            "type": "string",
            "description": "`ads` = the ad creatives. `advertisers` = look up advertiser names and IDs only (verified name, country, number of ads), for example to find the right ID before a large run.",
            "default": "ads"
          },
          "region": {
            "title": "Country",
            "type": "string",
            "description": "Two-letter country code (`US`, `GB`, `DE`, `IN` ...) to get only ads shown in that country, or `anywhere` for all countries.",
            "default": "anywhere"
          },
          "format": {
            "title": "Ad format",
            "enum": [
              "all",
              "text",
              "image",
              "video"
            ],
            "type": "string",
            "description": "Only ads of this format.",
            "default": "all"
          },
          "dateFrom": {
            "title": "Shown on or after",
            "type": "string",
            "description": "Only ads shown on or after this date (YYYY-MM-DD). Leave empty for all time."
          },
          "dateTo": {
            "title": "Shown on or before",
            "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": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Stop after this many ads for each line in `queries`. Newest ads come first. Big brands run tens of thousands of ads; set a cap to control cost.",
            "default": 100
          },
          "includeDetails": {
            "title": "Add per-country reach and all variations",
            "type": "boolean",
            "description": "Fetch each ad's detail page: every country it ran in with first and last shown dates, impression ranges where Google publishes them (EU countries), and all creative variations. Charged as a separate `ad-details` event.",
            "default": false
          },
          "includeVideoIds": {
            "title": "Add YouTube links for video ads",
            "type": "boolean",
            "description": "For video ads, read the ad preview to get the YouTube video ID and URL. Free.",
            "default": true
          },
          "maxAdvertisersPerName": {
            "title": "Advertisers per brand name",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "A brand name can match several verified advertisers (for example one per country). Scrape up to this many, those with the most ads first. Ignored for domains and IDs.",
            "default": 1
          },
          "concurrency": {
            "title": "Parallel queries",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many queries run at the same time.",
            "default": 4
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Apify datacenter proxy is enough. Each request uses a fresh IP to stay clear of Google's rate limit.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}