{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Ads Transparency Scraper + Competitor Ad Report",
    "description": "Every Google ad a competitor runs, by domain, advertiser name or ID: text, image and video ads with first/last shown dates, plus a per-advertiser report by format, platform and country, longest-running ads, changes since the last run and competitor comparison.",
    "version": "0.1",
    "x-build-id": "LFpTBrve5zE6LZiOX"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/zerahdata~google-ads-intelligence/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-zerahdata-google-ads-intelligence",
        "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/zerahdata~google-ads-intelligence/runs": {
      "post": {
        "operationId": "runs-sync-zerahdata-google-ads-intelligence",
        "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/zerahdata~google-ads-intelligence/run-sync": {
      "post": {
        "operationId": "run-sync-zerahdata-google-ads-intelligence",
        "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": "Domains, advertiser names or advertiser IDs",
            "type": "array",
            "description": "One per line. A website domain (nike.com), an advertiser name as Google shows it (Decathlon) or an advertiser ID from the Transparency Center (AR18378488041124659201). Two or more queries add a side-by-side comparison row.",
            "items": {
              "type": "string"
            }
          },
          "countries": {
            "title": "Countries",
            "type": "array",
            "description": "Only ads shown in these countries. 2-letter codes (US, DE, JP, BR, AE) or English names. Empty = all countries.",
            "items": {
              "type": "string"
            }
          },
          "format": {
            "title": "Ad format",
            "enum": [
              "ALL",
              "TEXT",
              "IMAGE",
              "VIDEO"
            ],
            "type": "string",
            "description": "Only ads of this format.",
            "default": "ALL"
          },
          "platforms": {
            "title": "Google platforms",
            "type": "array",
            "description": "Only ads shown on these Google platforms. Empty = all platforms.",
            "items": {
              "type": "string",
              "enum": [
                "GOOGLE_SEARCH",
                "YOUTUBE",
                "GOOGLE_SHOPPING",
                "GOOGLE_MAPS",
                "GOOGLE_PLAY"
              ],
              "enumTitles": [
                "Google Search",
                "YouTube",
                "Google Shopping",
                "Google Maps",
                "Google Play"
              ]
            }
          },
          "shownWithinDays": {
            "title": "Shown in the last N days",
            "minimum": 0,
            "maximum": 3650,
            "type": "integer",
            "description": "Only ads shown within this many days. 0 = any time (Google keeps several years of history). Ignored when a date range is set.",
            "default": 0
          },
          "dateFrom": {
            "title": "Shown from (date)",
            "type": "string",
            "description": "Optional start of the date range (YYYY-MM-DD)."
          },
          "dateTo": {
            "title": "Shown until (date)",
            "type": "string",
            "description": "Optional end of the date range (YYYY-MM-DD). Defaults to today when a start date is set."
          },
          "onlyActive": {
            "title": "Only ads running now",
            "type": "boolean",
            "description": "Keep only ads shown in the last 2 days.",
            "default": false
          },
          "maxAdsPerQuery": {
            "title": "Max ads per query",
            "minimum": 0,
            "maximum": 5000,
            "type": "integer",
            "description": "How many ad rows to return per domain/advertiser. 0 = report only (no ad rows). Big brands have tens of thousands of ads; Google returns the most recently shown first.",
            "default": 20
          },
          "includeAdDetails": {
            "title": "Add ad details (countries, platforms, EU reach, topic, payer)",
            "type": "boolean",
            "description": "One extra lookup per ad: every country where the ad ran with first/last dates, the Google platforms it ran on, impression ranges where Google discloses them (EU/EEA), topic category, 'paid for by' name, number of variations and extra text copy. Charged as an extra event per ad.",
            "default": false
          },
          "maxDetailedAdsPerQuery": {
            "title": "Max ads with details per query",
            "minimum": 0,
            "maximum": 5000,
            "type": "integer",
            "description": "Cap on detail lookups per query (only when ad details are on).",
            "default": 50
          },
          "reportDepth": {
            "title": "Advertiser report",
            "enum": [
              "full",
              "standard",
              "basic",
              "none"
            ],
            "type": "string",
            "description": "The report row per query: total ads, split by format, platform and country (Google's own counts), ads running now, new ads, longest-running ads, first/last seen and plain-English insights.",
            "default": "full"
          },
          "reportCountries": {
            "title": "Countries to compare in the report",
            "type": "array",
            "description": "Countries counted in the full report. Default: US, GB, DE, FR, IN, BR, JP, AU, CA, ES. When you filter by two or more countries, those are used.",
            "items": {
              "type": "string"
            }
          },
          "maxAdvertisersPerName": {
            "title": "Advertiser accounts per name",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "A name like 'Decathlon' matches several country accounts. This many (largest first) are included; the others are listed in the run warnings with their IDs.",
            "default": 3
          },
          "trackChanges": {
            "title": "Track changes between runs",
            "type": "boolean",
            "description": "Remember the ads of each query and add a 'change' row: new ads, ads that stopped, restarted ads and the change in total ads since the previous run. Schedule the run daily or weekly to monitor competitors.",
            "default": false
          },
          "monitorName": {
            "title": "Monitor name",
            "type": "string",
            "description": "Keeps separate change history for different watch lists. Use the same name on every scheduled run.",
            "default": "default"
          },
          "outputMode": {
            "title": "Output",
            "enum": [
              "all",
              "adsOnly",
              "reportsOnly"
            ],
            "type": "string",
            "description": "Which rows to write to the dataset.",
            "default": "all"
          },
          "maxRunSeconds": {
            "title": "Time limit (seconds)",
            "minimum": 30,
            "maximum": 3600,
            "type": "integer",
            "description": "The run stops cleanly after this many seconds and returns everything found so far, with a TIME_LIMIT row for anything skipped. Google slows down large runs, so raise this for many queries or thousands of ads.",
            "default": 300
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Google throttles one IP after about 60-80 requests. Apify datacenter proxy is enough; the actor rotates IPs automatically.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}