{
  "openapi": "3.0.1",
  "info": {
    "title": "Competitor Ad Intel — All Platforms Ad Library (Google + Bing)",
    "description": "One advertiser or domain in — every ad it runs on Google AND Microsoft/Bing back, in ONE normalized schema. Cross-platform competitor ad research / ad intelligence API: creative, format, first/last-shown, region. Filter by region & date, toggle platforms. Clean JSON/CSV, company-level only.",
    "version": "1.0",
    "x-build-id": "ZilciwvhBahpzFAUj"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/mochiboo~competitor-ad-intel-all-platforms/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-mochiboo-competitor-ad-intel-all-platforms",
        "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/mochiboo~competitor-ad-intel-all-platforms/runs": {
      "post": {
        "operationId": "runs-sync-mochiboo-competitor-ad-intel-all-platforms",
        "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/mochiboo~competitor-ad-intel-all-platforms/run-sync": {
      "post": {
        "operationId": "run-sync-mochiboo-competitor-ad-intel-all-platforms",
        "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": {
          "queries": {
            "title": "Advertisers to research",
            "type": "array",
            "description": "One advertiser per line — a brand name or domain (e.g. \"nike.com\", \"Bosch\"). The actor searches BOTH Google and Bing for each and returns every ad it finds, in one unified schema. For an exact-ID lookup instead, set Search mode to 'advertiserId' and paste platform IDs (Google AR..., Bing numeric).",
            "default": [
              "nike.com"
            ],
            "items": {
              "type": "string"
            }
          },
          "searchMode": {
            "title": "Search mode",
            "enum": [
              "auto",
              "keyword",
              "advertiserId"
            ],
            "type": "string",
            "description": "How to read each query. 'auto' (default) = brand/domain search on both platforms — the usual choice. 'keyword' = find ads whose copy or advertiser matches the term. 'advertiserId' = exact platform advertiser IDs (Google AR..., Bing numeric); mixed IDs are routed to the right platform automatically.",
            "default": "auto"
          },
          "platforms": {
            "title": "Platforms",
            "type": "array",
            "description": "Which ad libraries to query. Default = both. Turn one off to run a single platform. If one platform errors, the run still returns the other's results plus a warning (never a whole-run failure).",
            "items": {
              "type": "string",
              "enum": [
                "google",
                "bing"
              ],
              "enumTitles": [
                "Google Ads Transparency (global)",
                "Bing / Microsoft Ads Library (EEA only)"
              ]
            },
            "default": [
              "google",
              "bing"
            ]
          },
          "region": {
            "title": "Region / country",
            "type": "string",
            "description": "Restrict ads to where they were shown. Country name/code (e.g. \"US\", \"United Kingdom\", \"DE\") or \"anywhere\". Applied per platform: Google is global; Bing covers the EEA only, so a non-EEA region returns Google-only results. Unknown values fall back to anywhere (never a wrong-country leak).",
            "default": "anywhere"
          },
          "dateFrom": {
            "title": "Active from (date)",
            "type": "string",
            "description": "Only ads whose active period overlaps on/after this date. Format YYYY-MM-DD. Leave blank for no lower bound."
          },
          "dateTo": {
            "title": "Active to (date)",
            "type": "string",
            "description": "Only ads whose active period overlaps on/before this date. Format YYYY-MM-DD. Leave blank for no upper bound."
          },
          "includeBingAdDetails": {
            "title": "Include Bing ad details (slower)",
            "type": "boolean",
            "description": "Bing only: fetch per-ad impressions range, impressions-by-country and targeting (one extra request per Bing ad, slower). Off by default. Google's public Center does not expose these.",
            "default": false
          },
          "maxResultsPerPlatform": {
            "title": "Max results per platform",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after this many ads PER platform (so a 2-platform run returns up to 2x this). Kept low (20) for a fast, cheap preview; raise for full pulls. 0 = no limit.",
            "default": 20
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}