Documentation Index
Fetch the complete documentation index at: https://docs.brightdata.com/llms.txt
Use this file to discover all available pages before exploring further.
Migration benefits
- Drop-in replacement with minimal code changes
- 1:1 compatible JSON response schema
- Enhanced request flexibility supporting both query-based and URL-based requests
Quick start migration (5 Minutes)
Update your endpoint
Replace api.bing.microsoft.com with api.brightdata.com/request
Add parameters in body & test your first request
curl -X POST 'https://api.brightdata.com/request' \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"search_engine": "bing",
"query": "test search",
"data_format": "parsed_bing_api",
"format": "json",
"zone": "your_zone_name_"
}'
Step-by-step migration guide
Step 1: Account setup
1.1 Create Bright Data account
1.2 Configure Authentication
Before (Bing API):curl -X GET "https://api.bing.microsoft.com/v7.0/search?q=openai" \
-H "Ocp-Apim-Subscription-Key: YOUR_BING_KEY"
After (Bright Data):curl -X POST "https://api.brightdata.com/request" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"search_engine": "bing",
"query": "openai",
"data_format": "parsed_bing_api",
"format": "json",
"zone": "your_zone_name"
}'
Before (Bing API):import requests
headers = {
'Ocp-Apim-Subscription-Key': 'YOUR_BING_KEY'
}
response = requests.get(
'https://api.bing.microsoft.com/v7.0/search',
headers=headers,
params={'q': 'openai'}
)
After (Bright Data):import requests
headers = {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
}
payload = {
'search_engine': 'bing',
'query': 'openai',
'data_format': 'parsed_bing_api',
'format': 'json',
'zone': 'your_zone_name'
}
response = requests.post(
'https://api.brightdata.com/request',
headers=headers,
json=payload
)
Before (Bing API):const axios = require('axios');
const response = await axios.get(
'https://api.bing.microsoft.com/v7.0/search',
{
headers: {
'Ocp-Apim-Subscription-Key': 'YOUR_BING_KEY'
},
params: { q: 'openai' }
}
);
After (Bright Data):const axios = require('axios');
const response = await axios.post(
'https://api.brightdata.com/request',
{
search_engine: 'bing',
query: 'openai',
data_format: 'parsed_bing_api',
format: 'json',
zone: 'your_zone_name'
},
{
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
}
}
);
The response format remains identical to Bing’s API when using data_format: "parsed_bing_api":
{
"_type": "SearchResponse",
"queryContext": {
"originalQuery": "openai"
},
"webPages": {
"totalEstimatedMatches": 12300000,
"value": [
{
"name": "OpenAI",
"url": "https://openai.com/",
"displayUrl": "openai.com",
"snippet": "OpenAI is an AI research and deployment company..."
}
]
},
"images": { "value": [...] },
"videos": { "value": [...] },
"relatedSearches": { "value": [...] }
}