{
  "openapi": "3.0.1",
  "info": {
    "title": "Bing Copilot Search Answer & Citation Tracker",
    "description": "Run questions through Bing Copilot Search and get the streamed AI answer, tables, inline citations, cited sources, follow-up questions, organic results and brand visibility for AI search monitoring.",
    "version": "1.0",
    "x-build-id": "PHeUnXDaOrp1RLewy"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/xyrelith-data~bing-copilot-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-xyrelith-data-bing-copilot-scraper",
        "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/xyrelith-data~bing-copilot-scraper/runs": {
      "post": {
        "operationId": "runs-sync-xyrelith-data-bing-copilot-scraper",
        "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/xyrelith-data~bing-copilot-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-xyrelith-data-bing-copilot-scraper",
        "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",
          "queries"
        ],
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "queries",
              "markets"
            ],
            "type": "string",
            "description": "`queries` asks every query once in one market. `markets` asks every query in every selected market and returns one row per query-market pair.",
            "default": "queries"
          },
          "queries": {
            "title": "Queries",
            "type": "array",
            "description": "Questions or keywords to send to Copilot Search. One row is produced per query (or per query-market pair in markets mode).",
            "items": {
              "type": "string"
            }
          },
          "market": {
            "title": "Market (mode=queries, or markets fallback)",
            "enum": [
              "en-US",
              "en-GB",
              "en-CA",
              "en-AU",
              "en-NZ",
              "en-IE",
              "en-IN",
              "en-SG",
              "en-MY",
              "en-PH",
              "en-ZA",
              "en-HK",
              "en-PK",
              "es-ES",
              "es-MX",
              "es-AR",
              "es-CL",
              "es-CO",
              "es-PE",
              "pt-BR",
              "pt-PT",
              "fr-FR",
              "fr-CA",
              "fr-BE",
              "fr-CH",
              "de-DE",
              "de-AT",
              "de-CH",
              "it-IT",
              "nl-NL",
              "nl-BE",
              "sv-SE",
              "nb-NO",
              "da-DK",
              "fi-FI",
              "pl-PL",
              "cs-CZ",
              "sk-SK",
              "hu-HU",
              "ro-RO",
              "bg-BG",
              "el-GR",
              "tr-TR",
              "ru-RU",
              "uk-UA",
              "ar-SA",
              "ar-AE",
              "ar-EG",
              "he-IL",
              "hi-IN",
              "bn-IN",
              "ta-IN",
              "te-IN",
              "ur-PK",
              "id-ID",
              "ms-MY",
              "th-TH",
              "vi-VN",
              "ja-JP",
              "ko-KR",
              "zh-CN",
              "zh-HK",
              "zh-TW"
            ],
            "type": "string",
            "description": "Bing market used for the Copilot answer and organic results. The market controls the country, language and local sources. Ignored in markets mode when `markets` is set.",
            "default": "en-US"
          },
          "markets": {
            "title": "Markets (mode=markets)",
            "type": "array",
            "description": "Bing market codes to run for every query, e.g. `en-US`, `en-GB`, `de-DE`, `ja-JP`. Falls back to `market` when empty. One row is emitted per query-market pair.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "language": {
            "title": "Answer language",
            "enum": [
              "auto",
              "ar",
              "bg",
              "bn",
              "cs",
              "da",
              "de",
              "el",
              "en",
              "es",
              "fi",
              "fr",
              "he",
              "hi",
              "hu",
              "id",
              "it",
              "ja",
              "ko",
              "ms",
              "nb",
              "nl",
              "pl",
              "pt",
              "ro",
              "ru",
              "sk",
              "sv",
              "ta",
              "te",
              "th",
              "tr",
              "uk",
              "ur",
              "vi",
              "zh"
            ],
            "type": "string",
            "description": "Language sent to Bing (`setlang`). `Market default` uses the language part of each market (en-US -> English, de-DE -> German).",
            "default": "auto"
          },
          "trackBrands": {
            "title": "Brands or domains to track",
            "type": "array",
            "description": "Brand names such as `Canberra` or domains such as `wikipedia.org`. Each row reports whether the brand appears in the answer, how early, the surrounding sentence, a simple sentiment, and whether its domain is cited. `Name | domain.com` is also accepted.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "includeOrganic": {
            "title": "Include organic Bing results",
            "type": "boolean",
            "description": "Add the ordinary Bing web results for the same query: position, title, URL, domain, snippet and date. They also provide the organic-only fallback when the Copilot answer is unavailable.",
            "default": true
          },
          "includeCachedFallback": {
            "title": "Use Bing cached Copilot answers",
            "type": "boolean",
            "description": "When the live Copilot stream is unavailable, try Bing's cached answer for the query. The row reports `status=CACHED` and `answerSource=cached_answer`; it never pretends a cached answer is live.",
            "default": true
          },
          "includeAnswerHtml": {
            "title": "Include raw answer HTML",
            "type": "boolean",
            "description": "Add the reconstructed answer HTML in `answerHtml` for auditing. Markdown and text are always included.",
            "default": false
          },
          "stripTracking": {
            "title": "Remove tracking parameters",
            "type": "boolean",
            "description": "Remove UTM and click-id parameters from citation and organic URLs.",
            "default": true
          },
          "maxItems": {
            "title": "Maximum records",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Hard cap on emitted rows. In markets mode this caps query-market pairs.",
            "default": 50
          },
          "retries": {
            "title": "Retries per query",
            "minimum": 0,
            "maximum": 5,
            "type": "integer",
            "description": "Extra attempts when the conversation or answer stream fails. Each attempt mints a fresh anonymous MUID and conversation.",
            "default": 2
          },
          "maxMuidTries": {
            "title": "Maximum MUID attempts",
            "minimum": 1,
            "maximum": 40,
            "type": "integer",
            "description": "How many anonymous MUID values to try before concluding the AI Mode bucket is unavailable. Bing normally accepts one within 1-15 tries.",
            "default": 30
          },
          "responseTimeoutSecs": {
            "title": "Answer timeout (seconds)",
            "minimum": 30,
            "maximum": 300,
            "type": "integer",
            "description": "How long to wait for the answer stream before trying the next attempt or fallback.",
            "default": 120
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional. The actor works without a proxy and uses its own browser TLS fingerprint. Provide a proxy only if you want to route requests yourself."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}