{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Ads Transparency Scraper & New Ads Monitor",
    "description": "Track competitors' Google ads from the Google Ads Transparency Center. Monitor domains, advertiser IDs or names by country, get ONLY NEW ads since the last run, plus a summary per advertiser. Text, image & video ads, first/last shown dates, regions, video IDs and ad copy.",
    "version": "1.0",
    "x-build-id": "krhHPVAfdkQQiDk2v"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/ivan-petrus-g~google-ads-transparency-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-ivan-petrus-g-google-ads-transparency-monitor",
        "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/ivan-petrus-g~google-ads-transparency-monitor/runs": {
      "post": {
        "operationId": "runs-sync-ivan-petrus-g-google-ads-transparency-monitor",
        "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/ivan-petrus-g~google-ads-transparency-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-ivan-petrus-g-google-ads-transparency-monitor",
        "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": "Competitor domains",
            "type": "array",
            "description": "Websites whose Google ads you want to track, e.g. nike.com. URLs are accepted and cleaned automatically.",
            "items": {
              "type": "string"
            }
          },
          "advertiserIds": {
            "title": "Advertiser IDs",
            "type": "array",
            "description": "Google Ads Transparency advertiser IDs (start with AR...), copied from the advertiser page URL.",
            "items": {
              "type": "string"
            }
          },
          "advertiserNames": {
            "title": "Advertiser names",
            "type": "array",
            "description": "Legal advertiser names, e.g. 'Nike, Inc.'. Resolved to advertiser IDs automatically (exact match preferred).",
            "items": {
              "type": "string"
            }
          },
          "advertiserNameMatch": {
            "title": "Advertiser name matching",
            "enum": [
              "best",
              "allSimilar"
            ],
            "type": "string",
            "description": "best = exact match or the top suggestion. allSimilar = up to 5 advertisers whose name contains the text.",
            "default": "best"
          },
          "regions": {
            "title": "Regions (countries)",
            "type": "array",
            "description": "2-letter country codes where the ads were shown (US, GB, DE, UA...). Use 'anywhere' for all regions. Each target is checked once per region.",
            "items": {
              "type": "string"
            }
          },
          "formats": {
            "title": "Ad formats",
            "type": "array",
            "description": "Only these formats (empty = all).",
            "items": {
              "type": "string",
              "enum": [
                "text",
                "image",
                "video"
              ],
              "enumTitles": [
                "Text",
                "Image",
                "Video"
              ]
            }
          },
          "lastDays": {
            "title": "Shown in the last N days",
            "minimum": 1,
            "maximum": 3650,
            "type": "integer",
            "description": "Only ads shown within the last N days. Overrides dateFrom/dateTo."
          },
          "dateFrom": {
            "title": "Date from",
            "type": "string",
            "description": "YYYY-MM-DD. Ads shown on or after this date."
          },
          "dateTo": {
            "title": "Date to",
            "type": "string",
            "description": "YYYY-MM-DD. Defaults to today when dateFrom is set."
          },
          "onlyNewAds": {
            "title": "Only new ads since last run",
            "type": "boolean",
            "description": "Remember which ads were already seen (in a named key-value store) and output only new ones. Perfect for daily schedules.",
            "default": true
          },
          "firstRunBehavior": {
            "title": "First run",
            "enum": [
              "outputAll",
              "baselineOnly"
            ],
            "type": "string",
            "description": "outputAll = the first run returns all current ads (up to the limit). baselineOnly = the first run only records current ads; later runs return what's new (cheaper).",
            "default": "outputAll"
          },
          "stateStoreName": {
            "title": "Monitor state store name",
            "type": "string",
            "description": "Named key-value store that keeps seen ad IDs. Use different names for independent monitors.",
            "default": "ads-monitor-state"
          },
          "maxAdsPerTarget": {
            "title": "Max ads per target and region",
            "minimum": 0,
            "type": "integer",
            "description": "Newest ads first. 0 = all ads (can be thousands for big brands).",
            "default": 200
          },
          "enrichDetails": {
            "title": "Enrich with ad details",
            "type": "boolean",
            "description": "One extra request per ad: regions where it ran (with first/last shown dates and impression ranges), number of variations, all variation images.",
            "default": false
          },
          "extractAdContent": {
            "title": "Extract video ID and ad text",
            "type": "boolean",
            "description": "One extra request per text/video ad: YouTube video ID + URL, and text ad headline/description when Google exposes them (best effort; some text ads are only available as images).",
            "default": false
          },
          "includeSummary": {
            "title": "Summary row per advertiser/domain",
            "type": "boolean",
            "description": "Adds one free summary row per target and region: estimated total ads, new ads, formats, advertisers, newest ad date.",
            "default": true
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Parallel checks.",
            "default": 3
          },
          "maxRetries": {
            "title": "Max retries per request",
            "minimum": 0,
            "maximum": 20,
            "type": "integer",
            "description": "Retries with backoff and proxy rotation on 429/5xx/network errors.",
            "default": 6
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Apify Proxy (datacenter) is enough in our tests and keeps runs fast.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}