{
  "openapi": "3.0.1",
  "info": {
    "title": "Competitor Ads Intelligence Monitor",
    "description": "Monitor public competitor ads across Google Ads Transparency Center and LinkedIn Ads Library. Extract normalized ad records, detect new ads with stateful deduplication, enrich landing pages, classify offers, and send webhook summaries.",
    "version": "1.0",
    "x-build-id": "qvdzlGyUSxh9rdbFh"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scraping_scrap~competitor-ads-intelligence-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scraping_scrap-competitor-ads-intelligence-monitor",
        "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/scraping_scrap~competitor-ads-intelligence-monitor/runs": {
      "post": {
        "operationId": "runs-sync-scraping_scrap-competitor-ads-intelligence-monitor",
        "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/scraping_scrap~competitor-ads-intelligence-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-scraping_scrap-competitor-ads-intelligence-monitor",
        "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": {
          "brands": {
            "title": "Brands",
            "maxItems": 200,
            "type": "array",
            "description": "Competitor or monitored brand names. Replace the example brands with your competitors. Provide at least one brand, domain, or query.",
            "default": [
              "Nike",
              "HubSpot",
              "Microsoft"
            ],
            "items": {
              "type": "string"
            }
          },
          "domains": {
            "title": "Domains",
            "maxItems": 200,
            "type": "array",
            "description": "Competitor or monitored domains. Provide at least one brand, domain, or query.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "queries": {
            "title": "Queries",
            "maxItems": 200,
            "type": "array",
            "description": "Search queries or ad-library queries to monitor. Provide at least one brand, domain, or query.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "platforms": {
            "title": "Platforms",
            "type": "array",
            "description": "Production V1 advertising platforms to monitor.",
            "items": {
              "type": "string",
              "enum": [
                "google_ads",
                "linkedin"
              ],
              "enumTitles": [
                "Google Ads",
                "LinkedIn"
              ]
            },
            "default": [
              "google_ads",
              "linkedin"
            ]
          },
          "countries": {
            "title": "Countries",
            "maxItems": 100,
            "type": "array",
            "description": "Country codes to monitor.",
            "items": {
              "type": "string",
              "pattern": "^[A-Za-z]{2}$"
            },
            "default": [
              "US"
            ]
          },
          "maxResultsPerQuery": {
            "title": "Max results per query",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum number of results to collect per query.",
            "default": 5
          },
          "onlyNewSinceLastRun": {
            "title": "Only new since last run",
            "type": "boolean",
            "description": "Only emit records that were not seen in previous runs.",
            "default": false
          },
          "stateKey": {
            "title": "State key",
            "maxLength": 128,
            "type": "string",
            "description": "Key for persisted run state.",
            "default": "default"
          },
          "includeLandingPage": {
            "title": "Include landing page",
            "type": "boolean",
            "description": "Fetch landing page title, description, H1, and CTA text for ad landing URLs.",
            "default": false
          },
          "includeCreativeAssets": {
            "title": "Include creative assets",
            "type": "boolean",
            "description": "Include creative asset metadata and URLs when available.",
            "default": true
          },
          "webhookUrl": {
            "title": "Webhook URL",
            "type": "string",
            "description": "Optional webhook endpoint for sampled run results.",
            "default": ""
          },
          "webhookSampleSize": {
            "title": "Webhook sample size",
            "minimum": 0,
            "maximum": 50,
            "type": "integer",
            "description": "Maximum number of records to include in webhook samples.",
            "default": 10
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Maximum crawler concurrency.",
            "default": 5
          },
          "maxSourceCalls": {
            "title": "Max source calls",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Maximum platform/target/country source calls allowed for a run. The Actor rejects inputs whose estimated source calls exceed this value.",
            "default": 1000
          },
          "maxTotalAds": {
            "title": "Max total ads",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum normalized ad candidates to process and push across the whole run.",
            "default": 10000
          },
          "emitChangedAds": {
            "title": "Emit changed ads",
            "type": "boolean",
            "description": "Preview flag for future changed-ad detection. Current runs emit a design-only warning instead of changed records.",
            "default": false
          },
          "debugSourceFetch": {
            "title": "Debug source fetch",
            "type": "boolean",
            "description": "Include a short sanitized source response snippet in sourceHealth diagnostics. Never stores full HTML, credentials, cookies, or headers.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Apify proxy configuration.",
            "default": {
              "useApifyProxy": true
            }
          },
          "requestTimeoutSecs": {
            "title": "Request timeout seconds",
            "minimum": 10,
            "maximum": 180,
            "type": "integer",
            "description": "Per-request timeout in seconds.",
            "default": 45
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}