Skip to main content
GET
Ask Copilot
Ask Microsoft Copilot (Copilot Search in Bing), Microsoft’s public Copilot answer engine at bing.com/copilotsearch, a question anonymously and get the answer back as JSON, plus every source Copilot retrieved, which of those it cited, and the searches it ran. Accepts GET (query params) or POST (JSON body) with identical fields. Credits: 20
A fresh answer usually takes 15–25 s, and retries across exits can add more, so raise your client timeout well above the 5–10 s default (the examples use 120 s). When Copilot serves its own recent cached answer for the same prompt, the call returns in under 1 s with cached: true.

Authorization

string
required
Your ScrapeBadger API key.

Query Parameters

string
required
The question to ask. Maximum 2,000 characters. Each request is standalone, so include all the context you need here.
string
ISO-3166 alpha-2 country, e.g. US, DE, JP. The ask egresses from that country and, unless you set market, is answered in that country’s Bing market (e.g. JP: ja-JP).The egress is best-effort: when no exit in that country answers, the last retry may egress from the US and the response country says so. Set strict_country to forbid that.
string
Bing market code in language-COUNTRY form, e.g. ja-JP, en-GB. Defaults to the market of country, otherwise en-US. See List Markets for the curated list; any well-formed language-COUNTRY code is also accepted.
boolean
default:"false"
Answer only from an exit in country, never another one. When no exit there answers the call fails with 503 and detail.code = "country_unavailable". It is not billed (only 2xx responses are). Requires country — 400 otherwise. A JSON boolean on POST.

Response

string
Echo of the prompt you sent.
string
The answer text. Citation offsets index into this string.
string | null
The answer with its Markdown formatting.
Citation[]
Claim-level citations. Each one anchors a span of answer (by character offsets) to the source that supports it, identified by ref_index.
SearchResult[]
Everything Copilot retrieved: url, title, snippet, domain, site_name, ref_index, plus cited (boolean, true when the answer cites it). When cached is true, this lists only the cited sources.
string[]
Distinct hostnames across the sources.
string[]
The searches Copilot ran to ground the answer.
boolean
Whether Copilot searched the web for this answer.
boolean
Always false.
boolean
true when Copilot served its own recent cached answer for the same prompt.
string | null
Copilot’s id for this one-shot exchange.
string
The Bing market that answered, e.g. ja-JP.
string
The country the ask egressed from. Without strict_country it can differ from the country you asked for.
integer
Length of answer in characters.
integer
Number of entries in citations.
integer
End-to-end time in milliseconds.
number | null
Answer creation time as a Unix timestamp.
string | null
Answer creation time as an ISO-8601 UTC string.

Errors

Only 2xx responses are billed.

Example

The answer comes back in Japanese from the ja-JP market, names products such as freee会計, マネーフォワード クラウド会計 and 弥生会計 Next, and cites sources such as it-trend.jp. An abridged response:
200 Response (abridged)

Strict country

By default country is best-effort, so a country that is short of exits still gets an answer, possibly from a US exit on the last retry. Check the response country to see where the ask egressed. When the country matters more than the answer (local rankings, per-country visibility tracking), set strict_country=true. If no exit there answers you get a 503, which is not billed. Retry later rather than dropping strict_country:
503 Response
Copilot is non-deterministic. The same prompt can return different wording and different sources on each call, and a cached: true answer reflects whatever Copilot cached recently. For tracking, sample on a schedule and aggregate.