{
  "openapi": "3.0.1",
  "info": {
    "title": "Cross-Platform Ad Intelligence - Meta + Google + TikTok",
    "description": "Competitor ad creatives, formats, run-dates, and active-vs-stopped signal across Meta Ad Library + Google Ads Transparency + TikTok, in one schema keyed by advertiser/brand/domain. Creative hook/offer tagging, competitor-set rollups, new-creative monitor mode. For marketers, DTC, agencies.",
    "version": "0.1",
    "x-build-id": "1XOD7zQKyUDcMI34J"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/seibs.co~ad-library-intel/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-seibs.co-ad-library-intel",
        "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/seibs.co~ad-library-intel/runs": {
      "post": {
        "operationId": "runs-sync-seibs.co-ad-library-intel",
        "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/seibs.co~ad-library-intel/run-sync": {
      "post": {
        "operationId": "run-sync-seibs.co-ad-library-intel",
        "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": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "advertiser_ads",
              "keyword_search",
              "competitor_set"
            ],
            "type": "string",
            "description": "advertiser_ads = pull creatives for the given advertisers/brands/domains across the selected platforms. keyword_search = search the archives by keyword/term (creative discovery). competitor_set = advertiser_ads plus a cross-advertiser competitor comparison (active footprint, format lean, shared/unique angles).",
            "default": "advertiser_ads"
          },
          "advertisers": {
            "title": "Advertisers / brands / domains",
            "maxItems": 50,
            "type": "array",
            "description": "Brand, Facebook page, or domain names to pull ads for, e.g. ['Nike', 'Allbirds', 'glossier.com']. Used in advertiser_ads / competitor_set modes. Hard cap of 50.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "keywords": {
            "title": "Keywords (keyword_search mode)",
            "maxItems": 25,
            "type": "array",
            "description": "Search terms to discover ads by, e.g. ['free shipping', 'running shoes']. Used in keyword_search mode. Hard cap of 25.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "platforms": {
            "title": "Platforms",
            "maxItems": 3,
            "uniqueItems": true,
            "type": "array",
            "description": "Which ad-transparency archives to query: meta (Meta Ad Library / Facebook + Instagram), google (Google Ads Transparency Center), tiktok (TikTok Commercial Content Library / Creative Center). Aliases like 'facebook', 'instagram', 'youtube' are accepted. Leave empty for all three. Pass ['all'] for all.",
            "items": {
              "type": "string",
              "enum": [
                "meta",
                "google",
                "tiktok"
              ]
            },
            "default": [
              "meta",
              "google",
              "tiktok"
            ]
          },
          "all_platforms": {
            "title": "Query all platforms",
            "type": "boolean",
            "description": "Shortcut to query Meta + Google + TikTok (overrides the platforms list).",
            "default": false
          },
          "country": {
            "title": "Country / region",
            "type": "string",
            "description": "Two-letter region code scoping the archive query (e.g. US, GB, DE). Meta and Google scope by audience country; TikTok's Commercial Content Library is strongest for EU regions. Default US.",
            "default": "US"
          },
          "active_status": {
            "title": "Active status filter",
            "enum": [
              "all",
              "active",
              "inactive"
            ],
            "type": "string",
            "description": "all = active + stopped creatives (best for the active-vs-stopped signal). active = only currently-running. inactive = only stopped. Applies to Meta; the other archives return what they expose.",
            "default": "all"
          },
          "include_creative_analysis": {
            "title": "Creative analysis (hook / offer / format tagging)",
            "type": "boolean",
            "description": "Tag each creative's hook (question / social-proof / urgency / curiosity / ...), offer (% discount / free shipping / BOGO / lead magnet / ...), themes, and CTA. Adds a creative_analysis PPE charge per tagged ad. This is the 'what's working now' signal.",
            "default": true
          },
          "include_advertiser_tracking": {
            "title": "Advertiser tracking + competitor rollups",
            "type": "boolean",
            "description": "Build a per-advertiser footprint rollup (active vs stopped counts, format mix, spend-band mix, top hooks/offers, longest-running creative). Adds an advertiser_tracking PPE charge per advertiser rollup. Defaults on for competitor_set mode.",
            "default": false
          },
          "max_results_per_platform": {
            "title": "Max ads per platform per query",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Hard cap on ads returned per platform per advertiser/keyword. Default 30.",
            "default": 30
          },
          "monitor_webhook_url": {
            "title": "Monitor webhook URL (Slack / email, optional)",
            "type": "string",
            "description": "When this actor runs under an Apify Schedule (monitor mode), post the change digest (new creatives, newly-stopped creatives) to this Slack-compatible webhook URL.",
            "default": ""
          },
          "use_apify_proxy": {
            "title": "Use Apify Proxy",
            "type": "boolean",
            "description": "Route archive requests through Apify Proxy. DATACENTER handles the first (httpx) pass; a RESIDENTIAL tier is provisioned for the anti-bot escalation legs (the archives fingerprint datacenter IPs).",
            "default": true
          },
          "use_browser_fallback": {
            "title": "Anti-bot escalation (curl_cffi + browser)",
            "type": "boolean",
            "description": "When an archive serves an anti-bot / token / login challenge (Meta's Ad Library is token-locked; Google's RPC fingerprints TLS), automatically escalate: switch to the RESIDENTIAL proxy and retry with curl_cffi Chrome TLS impersonation, then a headless browser that captures the archive's own search XHR. Turn off to use plain httpx only (Meta then returns a documented platform_pending note).",
            "default": true
          },
          "browser_cdp_url": {
            "title": "Warm browser CDP endpoint (for token-locked surfaces)",
            "type": "string",
            "description": "Optional. CDP/WebSocket endpoint of an already-running, anti-detect (UC-mode / real Chrome) browser. When set, the browser tier connects to it (inheriting its session + fingerprint) so it clears Meta's edge + Google's challenge reliably. Without it a plain headless Chromium is launched (works on the apify/actor-python-playwright image; weaker against managed challenges). Can also be set as the BROWSER_CDP_URL env var.",
            "default": ""
          },
          "apify_proxy_groups": {
            "title": "Proxy groups (optional override)",
            "type": "array",
            "description": "Override the auto-selected proxy group. Leave empty to let the actor pick DATACENTER for the first pass and RESIDENTIAL for escalation.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "concurrency": {
            "title": "Max concurrent requests",
            "minimum": 1,
            "maximum": 8,
            "type": "integer",
            "description": "Parallel archive fetches. The archives are rate-sensitive; default 4.",
            "default": 4
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}