{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Ads Transparency Center Scraper",
    "description": "Scrape the Google Ads Transparency Center: headlines, descriptions, images, videos, landing pages and dates of any company's Search, YouTube and Display ads. Track new ads from competitors on a schedule, or bulk-check which domains run ads.",
    "version": "1.0",
    "x-build-id": "w3AQ1BHaLgYTfd7cc"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/northloop-labs~google-ads-transparency-library/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-northloop-labs-google-ads-transparency-library",
        "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/northloop-labs~google-ads-transparency-library/runs": {
      "post": {
        "operationId": "runs-sync-northloop-labs-google-ads-transparency-library",
        "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/northloop-labs~google-ads-transparency-library/run-sync": {
      "post": {
        "operationId": "run-sync-northloop-labs-google-ads-transparency-library",
        "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": [
          "targets"
        ],
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "ads",
              "check"
            ],
            "type": "string",
            "description": "<b>Ads</b>: scrape the ads (copy, images, videos, dates) of each target. <b>Check</b>: bulk-check which targets run Google ads, with ad counts and advertiser names (one row per target; targets with no ads are free).",
            "default": "ads"
          },
          "targets": {
            "title": "Domains, advertisers or URLs",
            "type": "array",
            "description": "One per line. A website domain (nike.com), an advertiser name (HubSpot), an advertiser ID (AR13611357312189988865) or a Google Ads Transparency Center URL.",
            "default": [
              "hubspot.com"
            ],
            "items": {
              "type": "string"
            }
          },
          "region": {
            "title": "Country",
            "type": "string",
            "description": "Only ads shown in this country. Use a 2-letter code (US, GB, DE, FR, RO...) or \"anywhere\".",
            "default": "anywhere"
          },
          "adFormat": {
            "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 in this period (YYYY-MM-DD). Leave empty for all time."
          },
          "dateTo": {
            "title": "Shown on or before",
            "type": "string",
            "description": "End of the period (YYYY-MM-DD). Defaults to today when \"Shown on or after\" is set."
          },
          "maxResults": {
            "title": "Max ads (total)",
            "minimum": 1,
            "maximum": 50000,
            "type": "integer",
            "description": "The run stops after this many ads in total. You are charged only for ads saved, never more than this.",
            "default": 50
          },
          "maxAdsPerTarget": {
            "title": "Max ads per target",
            "minimum": 0,
            "type": "integer",
            "description": "Optional cap per domain/advertiser. 0 = share \"Max ads\" evenly between targets, then fill any leftover.",
            "default": 0
          },
          "includeAdText": {
            "title": "Extract ad text",
            "type": "boolean",
            "description": "Read the headline, description, call to action and landing page of every ad (from Google's ad preview, OCR of text-ad screenshots, and YouTube titles for video ads). Turn off for faster runs with metadata and creative URLs only.",
            "default": true
          },
          "ocrImageAds": {
            "title": "OCR image ads too",
            "type": "boolean",
            "description": "Also read the text printed inside image (display) ads. Slower; text ads are always read.",
            "default": false
          },
          "ocrLanguage": {
            "title": "OCR language",
            "enum": [
              "auto",
              "eng",
              "deu+eng",
              "fra+eng",
              "spa+eng",
              "ita+eng",
              "por+eng",
              "nld+eng",
              "ron+eng",
              "pol+eng"
            ],
            "type": "string",
            "description": "Language for reading text-ad screenshots. Auto = English plus the main language of the chosen country.",
            "default": "auto"
          },
          "includeRegions": {
            "title": "Include countries per ad",
            "type": "boolean",
            "description": "Add the list of countries each ad ran in, with first and last shown dates per country (one extra request per ad).",
            "default": false
          },
          "monitorChanges": {
            "title": "Monitor changes (track new ads)",
            "type": "boolean",
            "description": "Output only the changes since the previous run with the same targets: <b>new</b> ads (changeType \"new\"), ads that <b>stopped</b> showing (changeType \"stopped\") and a free summary row per target. The first run sets the baseline. Works in Ads mode; schedule it daily or weekly.",
            "default": false
          },
          "monitorStoreName": {
            "title": "Monitor state store",
            "type": "string",
            "description": "Name of the key-value store in your Apify account that remembers which ads were already seen (one record per target, country and format). Use a different name to keep separate watchlists.",
            "default": "google-ads-monitor"
          },
          "reportStopped": {
            "title": "Report stopped ads",
            "type": "boolean",
            "description": "Also output ads that were running at the last check and are no longer shown (changeType \"stopped\"). Charged like any ad row.",
            "default": true
          },
          "stoppedAfterDays": {
            "title": "Count as stopped after (days)",
            "minimum": 1,
            "maximum": 60,
            "type": "integer",
            "description": "An ad counts as active while Google shows it within this many days, and as stopped after that. Google updates \"last shown\" with about a day of delay, so keep at least 2.",
            "default": 3
          },
          "baselineOutput": {
            "title": "First run (baseline) output",
            "enum": [
              "all",
              "summary"
            ],
            "type": "string",
            "description": "<b>All</b>: the first run outputs the currently running ads as \"new\" (up to Max ads). <b>Summary only</b>: the first run just records the baseline and outputs the free summary rows.",
            "default": "all"
          },
          "monitorMaxAdsScanned": {
            "title": "Max ads scanned per target",
            "minimum": 100,
            "maximum": 20000,
            "type": "integer",
            "description": "How many of the most recently shown ads to check per target in each monitor run. Scanning is cheap (no ad text) and free; only output rows are charged.",
            "default": 3000
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}