Bing Copilot API Documentation
The Bing Copilot API provides access to Bing Copilot Search's AI-generated answers. This API returns structured data including text blocks, markdown formatting, and reference links that power Bing's Copilot Search experience.
API Parameters
Search Query
-
- Name
-
q - Required
- Required
- Description
-
Parameter defines the Bing Copilot search query.
Engine
-
- Name
-
engine - Required
- Required
- Description
-
Parameter defines an engine that will be used to retrieve real-time data. It must be set to
bing_copilot.
API key
-
- Name
-
api_key - Required
- Required
- Description
-
The
api_keyauthenticates your requests. Use it as a query parameter (https://www.searchapi.io/api/v1/search?api_key=YOUR_API_KEY) or in the Authorization header (Bearer YOUR_API_KEY).
Zero Data Retention
-
- Name
-
zero_retention - Enterprise Only
- Enterprise Only
- Required
- Optional
- Description
-
Set this parameter to
trueto disable all logging and persistent storage. No request parameters, HTML, or JSON responses are stored or logged. Suitable for high-compliance use cases. Debugging and support may be limited while enabled.
API Examples
Copilot Answer Response
The Bing Copilot API returns structured data that mirrors Bing Copilot Search's AI-generated answers. The response includes:
- text_blocks - Array of structured content blocks including paragraphs, headers, and lists
- markdown - Complete markdown-formatted version of the Copilot answer
- reference_links - Array of source links with metadata
Each text block can contain different types of content (paragraphs, headers, ordered and unordered lists) and may include reference indexes that link to the reference_links array.
https://www.searchapi.io/api/v1/search?engine=bing_copilot&q=what+is+blockchain
- Python
- Node
- Ruby
- Java
- Go
- PHP
- Bash
- R
- Kotlin
- Swift
- C#
- C
- C++
- requests
import requests
url = "https://www.searchapi.io/api/v1/search"
params = {
"engine": "bing_copilot",
"q": "what is blockchain"
}
response = requests.get(url, params=params)
print(response.text)
{
"text_blocks": [
{
"type": "header",
"answer": "Blockchain is a decentralized, distributed ledger technology that records digital transactions securely and transparently without a central authority."
},
{
"type": "paragraph",
"answer": "A blockchain is essentially a chain of blocks, where each block contains a list of transactions. These blocks are linked together using cryptography, meaning each block includes a cryptographic hash of the previous block, a timestamp, and transaction data. This linkage ensures that once a block is added, it is extremely difficult to alter past information without detection."
},
{
"type": "unordered_list",
"items": [
{
"type": "paragraph",
"answer": "Decentralization: Unlike conventional databases controlled by a central authority, a blockchain operates on a network of computers (nodes), each maintaining a copy of the ledger. This makes it resilient to single points of failure and more transparent."
},
...
]
},
...
],
"markdown": "## Blockchain is a decentralized, distributed ledger technology that records digital transactions securely and transparently without a central authority.\n\n## Definition and Structure\n\nA blockchain is essentially a chain of blocks, where each block contains a list of transactions. These blocks are linked together using cryptography, meaning each block includes a cryptographic hash of the previous block, a timestamp, and transaction data. ...",
"reference_links": [
{
"index": 0,
"title": "Blockchain - Wikipedia",
"link": "https://en.wikipedia.org/wiki/Blockchain",
"displayed_link": "https://en.wikipedia.org › wiki › Blockchain",
"snippet": "Blockchains are typically managed by a peer-to-peer (P2P) computer network for use as a public distributed ledger, where nodes collectively adhere to a consensus algorithm protocol…",
"source": "Wikipedia"
},
...
]
}