{
  "openapi": "3.0.1",
  "info": {
    "title": "Competitor Ad Tracker - New & Stopped Ads on 7 Ad Libraries",
    "description": "Monitor competitor ads on Google, Meta, LinkedIn, TikTok, Microsoft/Bing, Snapchat & Pinterest on a schedule. Get a feed of newly launched and stopped ads, optional AI summaries of messaging shifts, and Slack/Zapier/Make/n8n webhook alerts.",
    "version": "0.1",
    "x-build-id": "NnUtDdQdyw4t7BFyH"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/adintel-labs~competitor-ad-tracker/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-adintel-labs-competitor-ad-tracker",
        "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/adintel-labs~competitor-ad-tracker/runs": {
      "post": {
        "operationId": "runs-sync-adintel-labs-competitor-ad-tracker",
        "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/adintel-labs~competitor-ad-tracker/run-sync": {
      "post": {
        "operationId": "run-sync-adintel-labs-competitor-ad-tracker",
        "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": [
          "competitors"
        ],
        "properties": {
          "competitors": {
            "title": "Competitors",
            "type": "array",
            "description": "One object per competitor: {name, googleDomain?, googleAdvertiserId?, metaPage?, metaKeyword?, linkedinCompany?, tiktokKeyword?, microsoftAdvertiser?, snapchatAdvertiser?, pinterestAdvertiser?}. Missing platform fields fall back to `name` (TikTok is only checked when tiktokKeyword is set)."
          },
          "platforms": {
            "title": "Platforms",
            "type": "array",
            "description": "Which ad libraries to check. Empty = google, meta, linkedin, tiktok (the EU-only Microsoft, Snapchat and Pinterest libraries are opt-in).",
            "items": {
              "type": "string",
              "enum": [
                "google",
                "meta",
                "linkedin",
                "tiktok",
                "microsoft",
                "snapchat",
                "pinterest"
              ],
              "enumTitles": [
                "Google Ads Transparency",
                "Meta (Facebook & Instagram)",
                "LinkedIn",
                "TikTok",
                "Microsoft / Bing (EU)",
                "Snapchat (EU)",
                "Pinterest (EU)"
              ]
            }
          },
          "country": {
            "title": "Country",
            "type": "string",
            "description": "2-letter ISO country code used for all platforms.",
            "default": "US"
          },
          "euCountry": {
            "title": "EU country (Microsoft / Snapchat / Pinterest)",
            "type": "string",
            "description": "2-letter code used for the EU-only libraries (Snapchat: EU + TR, Pinterest: EU + NO, BR, TR; Microsoft covers the whole EU/EEA). Empty = use Country if it is covered, otherwise DE."
          },
          "maxAdsPerPlatform": {
            "title": "Max ads per competitor per platform",
            "minimum": 1,
            "maximum": 2000,
            "type": "integer",
            "description": "Cap per child scraper run.",
            "default": 100
          },
          "webhookUrl": {
            "title": "Webhook URL (Slack / Zapier / Make / n8n)",
            "type": "string",
            "description": "Receives a JSON summary when ads are launched or stopped."
          },
          "stateStoreName": {
            "title": "State store name",
            "type": "string",
            "description": "Named key-value store that keeps the previous snapshot (use different names for separate watchlists).",
            "default": "competitor-ad-tracker-state"
          },
          "actorIds": {
            "title": "Scraper Actor IDs (advanced)",
            "type": "object",
            "description": "Override child Actor IDs, e.g. {\"google\": \"username/google-ads-transparency-scraper\", \"snapchat\": \"username/snapchat-ad-library-scraper\"}."
          },
          "childMemoryMbytes": {
            "title": "Child run memory (MB)",
            "minimum": 256,
            "maximum": 8192,
            "type": "integer",
            "description": "Memory for each child scraper run (default 512 MB for Google, Microsoft, Snapchat and Pinterest; 2048 MB for the Meta, LinkedIn and TikTok browser scrapers)."
          },
          "dryRun": {
            "title": "Dry run",
            "type": "boolean",
            "description": "Log the planned child calls without running them.",
            "default": false
          },
          "includeAiAnalysis": {
            "title": "AI ad-angle analysis (extra event)",
            "type": "boolean",
            "description": "Adds aiAnalysis (angle, hook, offer, audience, emotional triggers, funnel stage) to each ad. Charged per successfully analysed ad only.",
            "default": false
          },
          "llmApiKey": {
            "title": "LLM API key (optional)",
            "type": "string",
            "description": "OpenAI-compatible API key. Leave empty to use the Actor's built-in key (if configured)."
          },
          "llmModel": {
            "title": "LLM model",
            "type": "string",
            "description": "Model name for the OpenAI-compatible endpoint.",
            "default": "gpt-4o-mini"
          },
          "llmBaseUrl": {
            "title": "LLM base URL",
            "type": "string",
            "description": "OpenAI-compatible base URL (OpenAI, OpenRouter, Groq, xAI...).",
            "default": "https://api.openai.com/v1"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}