{
  "openapi": "3.0.1",
  "info": {
    "title": "Multi-Channel Ad Intelligence: Meta, Google, LinkedIn, TikTok",
    "description": "Search competitor ads across Meta Ad Library, Google Ads Transparency Center, LinkedIn Ad Library, and TikTok Commercial Content Library in one run, with a single normalized output schema across all platforms. If one platform fails or has no coverage for a query, the rest still return results.",
    "version": "2.0",
    "x-build-id": "UMjSflrG9CBsBxP36"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/capable_cauldron~multi-channel-ad-intelligence/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-capable_cauldron-multi-channel-ad-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/capable_cauldron~multi-channel-ad-intelligence/runs": {
      "post": {
        "operationId": "runs-sync-capable_cauldron-multi-channel-ad-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/capable_cauldron~multi-channel-ad-intelligence/run-sync": {
      "post": {
        "operationId": "run-sync-capable_cauldron-multi-channel-ad-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",
        "required": [
          "queries"
        ],
        "properties": {
          "queries": {
            "title": "Search queries",
            "minItems": 1,
            "type": "array",
            "description": "Advertiser names or keywords to search for (e.g. a competitor brand). Each query is searched on every selected platform.",
            "items": {
              "type": "string"
            }
          },
          "platforms": {
            "title": "Platforms",
            "type": "array",
            "description": "Which ad libraries to search. Results from all platforms share one normalized schema. If a platform fails or is unsupported for a given query, the others still run and are returned — see runSummary for per-platform status.",
            "items": {
              "type": "string",
              "enum": [
                "meta",
                "google",
                "linkedin",
                "tiktok"
              ],
              "enumTitles": [
                "Meta (Facebook + Instagram) Ad Library",
                "Google Ads Transparency Center",
                "LinkedIn Ad Library (B2B)",
                "TikTok Commercial Content Library"
              ]
            },
            "default": [
              "meta",
              "google",
              "linkedin",
              "tiktok"
            ]
          },
          "country": {
            "title": "Country",
            "type": "string",
            "description": "ISO-2 country code to filter ads by (e.g. US, GB, IN), or ALL for worldwide. TikTok's Commercial Content Library only covers the EEA, UK, and CH (e.g. DE, FR, GB) — other countries return zero TikTok ads by design, not an error. LinkedIn and Meta cover ads worldwide but only show reach/targeting detail for EU-served ads.",
            "default": "ALL"
          },
          "maxAdsPerQuery": {
            "title": "Max ads per query (per platform)",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Upper limit of ads fetched for each query on each platform.",
            "default": 50
          },
          "activeStatus": {
            "title": "Ad status",
            "enum": [
              "ACTIVE",
              "INACTIVE",
              "ALL"
            ],
            "type": "string",
            "description": "Filter by whether ads are currently running. Applies to Meta; Google, LinkedIn, and TikTok have no status filter and list whatever creatives their library currently shows.",
            "default": "ACTIVE"
          },
          "includeRawData": {
            "title": "Include raw platform data",
            "type": "boolean",
            "description": "Attach the unprocessed platform response for each ad under the `raw` field. Increases dataset size.",
            "default": false
          },
          "metaOptions": {
            "title": "Meta-specific options",
            "type": "object",
            "description": "Optional overrides for the Meta adapter, e.g. {\"publisherPlatforms\": [\"instagram\"], \"mediaType\": \"VIDEO\"}."
          },
          "googleOptions": {
            "title": "Google-specific options",
            "type": "object",
            "description": "Optional overrides for the Google adapter (reserved for future use)."
          },
          "linkedinOptions": {
            "title": "LinkedIn-specific options",
            "type": "object",
            "description": "Optional overrides for the LinkedIn adapter (reserved for future use)."
          },
          "tiktokOptions": {
            "title": "TikTok-specific options",
            "type": "object",
            "description": "Optional overrides for the TikTok adapter, e.g. {\"region\": \"FR\"} to pick a specific Commercial Content Library country when `country` is ALL or unset."
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Proxy to route scraping traffic through. Residential is required for reliable Meta results.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}