{
  "openapi": "3.0.1",
  "info": {
    "title": "Google & Meta Ad Intelligence Tracker with Watchlists",
    "description": "Scrape public Google Ads Transparency Center and Meta Ads Library (Facebook) data. Track competitor ads with watchlists, filter by country, format, and date, add optional creative and delivery details, deduplicate results, and export JSON, CSV, or Excel.",
    "version": "0.5",
    "x-build-id": "5uxho48WvTWCOn39A"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/sebultura~ad-intelligence-tracker/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-sebultura-ad-intelligence-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/sebultura~ad-intelligence-tracker/runs": {
      "post": {
        "operationId": "runs-sync-sebultura-ad-intelligence-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/sebultura~ad-intelligence-tracker/run-sync": {
      "post": {
        "operationId": "run-sync-sebultura-ad-intelligence-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": [
          "searchQueries",
          "platforms"
        ],
        "properties": {
          "searchQueries": {
            "title": "Brands, domains, or advertiser IDs",
            "minItems": 1,
            "maxItems": 20,
            "type": "array",
            "description": "One to twenty values. Google interprets these using googleQueryMode. Meta accepts keywords or public facebook.com/ads/library URLs.",
            "default": [
              "nike"
            ],
            "items": {
              "type": "string"
            }
          },
          "platforms": {
            "title": "Platforms",
            "type": "array",
            "description": "Select Google, Meta, or both. Google-specific filters do not change Meta searches.",
            "items": {
              "type": "string",
              "enum": [
                "google",
                "meta"
              ]
            },
            "default": [
              "google"
            ]
          },
          "googleQueryMode": {
            "title": "Google query mode",
            "enum": [
              "advertiserName",
              "domain",
              "advertiserId"
            ],
            "type": "string",
            "description": "Search Google by advertiser name, exact domain, or advertiser ID. Domain and ID modes skip advertiser-name lookup.",
            "default": "advertiserName"
          },
          "country": {
            "title": "Country code",
            "pattern": "^[A-Za-z]{2}$",
            "type": "string",
            "description": "Two-letter source region code. Google supports its published region mapping; availability and result counts vary by region.",
            "default": "US"
          },
          "adStatus": {
            "title": "Ad status",
            "enum": [
              "active",
              "all"
            ],
            "type": "string",
            "description": "Google active means last shown since the start of the run's UTC day. Use all for Google history and custom dates. Meta uses its native active/all filter.",
            "default": "active"
          },
          "googleAdFormat": {
            "title": "Google ad format",
            "enum": [
              "all",
              "text",
              "image",
              "video"
            ],
            "type": "string",
            "description": "Optionally restrict Google results to one source-provided creative format.",
            "default": "all"
          },
          "googleSurfaces": {
            "title": "Google surfaces",
            "type": "array",
            "description": "Optional Google placement filters. Leave empty to include all supported surfaces.",
            "items": {
              "type": "string",
              "enum": [
                "play",
                "maps",
                "search",
                "shopping",
                "youtube"
              ]
            },
            "default": []
          },
          "googleStartDate": {
            "title": "Google served after",
            "pattern": "^$|^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Optional YYYY-MM-DD lower bound for ads served during a date range. Requires adStatus=all."
          },
          "googleEndDate": {
            "title": "Google served before",
            "pattern": "^$|^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Optional YYYY-MM-DD upper bound for ads served during a date range. Requires adStatus=all."
          },
          "maxAdsPerQuery": {
            "title": "Maximum ads per query",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Upper bound per platform/query combination, not a promise that the source has that many matching ads.",
            "default": 20
          },
          "googlePageSize": {
            "title": "Google results per request",
            "minimum": 10,
            "maximum": 100,
            "type": "integer",
            "description": "Advanced pagination setting from 10 to 100. The Actor reduces it automatically for small result limits.",
            "default": 40
          },
          "googleMaxPages": {
            "title": "Google page limit",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Optional hard cap from 1 to 50. Leave empty for an automatic limit based on maxAdsPerQuery and page size."
          },
          "includeCreatives": {
            "title": "Include creative URLs",
            "type": "boolean",
            "description": "Include public preview and media URLs when available. Media files are not permanently mirrored.",
            "default": true
          },
          "maxCreativeDetails": {
            "title": "Creative detail limit",
            "minimum": 0,
            "maximum": 50,
            "type": "integer",
            "description": "Total Google previews to enrich across this run, from 0 to 50. Zero disables extra preview requests. Duplicates and known watchlist ads are not enriched.",
            "default": 0
          },
          "maxDeliveryDetails": {
            "title": "Delivery detail limit",
            "minimum": 0,
            "maximum": 50,
            "type": "integer",
            "description": "Total Google ads to enrich with source-provided delivery details across this run, from 0 to 50. Zero disables extra delivery requests. Duplicates and known watchlist ads are not enriched.",
            "default": 0
          },
          "watchlist": {
            "title": "Enable watchlist diff",
            "type": "boolean",
            "description": "Compare this run with the previous run in the same named watchlist.",
            "default": false
          },
          "watchlistName": {
            "title": "Watchlist name",
            "pattern": "^[a-zA-Z0-9_-]{1,64}$",
            "type": "string",
            "description": "One to 64 letters, numbers, underscores or hyphens; use a distinct name for each monitoring setup.",
            "default": "default"
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Disabled by default to avoid unnecessary network cost. Enable only when required by your network; never use proxies to bypass rate limits.",
            "default": {
              "useApifyProxy": false
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}