{
  "openapi": "3.0.1",
  "info": {
    "title": "AdScout – Google & Meta Ad Library Scraper + AI Hooks",
    "description": "Public ads from Google Ads Transparency (+ Meta Ad Library beta, free) in one schema. Archive media before links expire; AI hooks & briefs. $1.50/1k Google ads.",
    "version": "0.1",
    "x-build-id": "IzanP2i51DNj0ZAwA"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/kuttura_special~adscout/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-kuttura_special-adscout",
        "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/kuttura_special~adscout/runs": {
      "post": {
        "operationId": "runs-sync-kuttura_special-adscout",
        "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/kuttura_special~adscout/run-sync": {
      "post": {
        "operationId": "run-sync-kuttura_special-adscout",
        "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": {
          "keywords": {
            "title": "Keywords / brands",
            "type": "array",
            "description": "Brand or product names. Google: matched to advertisers via the Transparency Center search. Meta: Ad Library search terms.",
            "items": {
              "type": "string"
            }
          },
          "advertisers": {
            "title": "Advertisers",
            "type": "array",
            "description": "Google advertiser IDs (AR…), advertiser domains (e.g. nike.com), or Meta Page IDs.",
            "items": {
              "type": "string"
            }
          },
          "countries": {
            "title": "Countries (ISO-2)",
            "type": "array",
            "description": "e.g. US, DE. Meta non-political ads are only available for EU/UK countries (defaults to DE,FR).",
            "items": {
              "type": "string"
            }
          },
          "dateFrom": {
            "title": "Shown from",
            "type": "string",
            "description": "YYYY-MM-DD"
          },
          "dateTo": {
            "title": "Shown until",
            "type": "string",
            "description": "YYYY-MM-DD"
          },
          "maxAds": {
            "title": "Max ads per platform",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Hard cap per platform.",
            "default": 20
          },
          "enableGoogle": {
            "title": "Google Ads Transparency Center",
            "type": "boolean",
            "description": "On/off switch.",
            "default": true
          },
          "googleFormat": {
            "title": "Google ad format",
            "enum": [
              "all",
              "text",
              "image",
              "video"
            ],
            "type": "string",
            "description": "Only return this Google ad format.",
            "default": "all"
          },
          "enableMeta": {
            "title": "Meta Ad Library — Beta: bring your own token",
            "type": "boolean",
            "description": "BETA, off by default. Uses Meta's official Ad Library API with YOUR OWN access token. Meta ads are free (only AI add-ons are billed). Coverage: non-political ads delivered in the EU/UK. If the token is missing or invalid, Meta is skipped with a clear error and nothing is charged for Meta.",
            "default": false
          },
          "metaAccessToken": {
            "title": "Meta access token (Beta, bring your own)",
            "type": "string",
            "description": "Your own Ad Library API token (developers.facebook.com, identity-verified). Stored as a secret; never logged."
          },
          "enableTiktok": {
            "title": "TikTok EU Ad Library",
            "type": "boolean",
            "description": "Not available in v1: TikTok's robots.txt and Terms forbid automated collection. TikTok's official Commercial Content API may be added in a future version.",
            "default": false
          },
          "saveMedia": {
            "title": "Archive ad media",
            "type": "boolean",
            "description": "Save each ad's image/thumbnail to the run's key-value store (source links expire). Billed per saved file.",
            "default": false
          },
          "analyzeHooks": {
            "title": "AI hook analysis",
            "type": "boolean",
            "description": "Hook text and hook type per ad (from ad copy or the video transcript).",
            "default": false
          },
          "transcribeVideos": {
            "title": "Transcribe video ads",
            "type": "boolean",
            "description": "With hook analysis: AI transcription of Google video ads (YouTube-hosted). Billed per started minute.",
            "default": true
          },
          "maxVideoMinutes": {
            "title": "Max video length (min)",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Longer videos are not transcribed.",
            "default": 3
          },
          "generateBrief": {
            "title": "Pattern brief",
            "type": "boolean",
            "description": "One AI brief across all analyzed ads (requires hook analysis).",
            "default": false
          },
          "allowResidential": {
            "title": "Allow residential proxy",
            "type": "boolean",
            "description": "Use residential proxy only when Google rate-limits the direct connection and for YouTube media, capped below.",
            "default": false
          },
          "residentialCapMb": {
            "title": "Residential cap (MB)",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Maximum residential traffic per run.",
            "default": 20
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}