Bing Search
curl --request GET \
--url https://api.example.com/bing/searchimport requests
url = "https://api.example.com/bing/search"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/bing/search', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/bing/search",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/bing/search"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/bing/search")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/bing/search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_bodySearch Engines
Bing Search
Execute a Bing search and retrieve parsed results with web pages, images, videos, and news
GET
/
bing
/
search
Bing Search
curl --request GET \
--url https://api.example.com/bing/searchimport requests
url = "https://api.example.com/bing/search"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/bing/search', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/bing/search",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/bing/search"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/bing/search")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/bing/search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_bodyOverview
The/bing/search endpoint executes a Bing search query and returns structured, parsed results. This API handles anti-bot measures and provides clean data extraction from Bing’s search results.
Parameters
Query Parameters
string
required
The search query
string
default:"en-US"
Market code in language-country format (e.g.,
en-US, en-GB, de-DE, fr-FR)string
Country code to limit results (e.g.,
US, GB, DE)string
default:"en"
UI language code (e.g.,
en, es, fr, de)number
default:"10"
Number of results to return (1-50)
number
default:"0"
Offset for pagination (e.g.,
0 for first page, 10 for second)string
default:"desktop"
Device type to emulate. Options:
desktop, mobile, tabletstring
Location for geo-targeted results (e.g.,
New York, USA)string
default:"Moderate"
Safe search mode. Options:
Off, Moderate, Strictstring
Time filter for results. Options:
Day, Week, Monthstring
Filter response type. Options:
Webpages, Images, Videos, Newsboolean
default:"false"
Add bold markers around search terms in snippets
string
default:"Raw"
Text format for snippets. Options:
Raw, HTMLboolean
default:"false"
Return raw HTML instead of parsed results
boolean
default:"false"
Async mode - returns job ID immediately for later retrieval
Example Requests
Basic Search
curl -X GET "https://api.scrapengine.io/api/v1/bing/search?q=artificial%20intelligence&count=10" \
-H "Authorization: Bearer YOUR_API_KEY"
const params = new URLSearchParams({
q: "artificial intelligence",
count: "10",
});
const response = await fetch(
`https://api.scrapengine.io/api/v1/bing/search?${params}`,
{
headers: {
Authorization: "Bearer YOUR_API_KEY",
},
}
);
const data = await response.json();
console.log(data);
import requests
url = "https://api.scrapengine.io/api/v1/bing/search"
headers = {"Authorization": "Bearer YOUR_API_KEY"}
params = {
"q": "artificial intelligence",
"count": 10
}
response = requests.get(url, headers=headers, params=params)
print(response.json())
News Search with Freshness Filter
curl -X GET "https://api.scrapengine.io/api/v1/bing/search?q=technology&responseFilter=News&freshness=Day" \
-H "Authorization: Bearer YOUR_API_KEY"
const params = new URLSearchParams({
q: "technology",
responseFilter: "News",
freshness: "Day",
});
const response = await fetch(
`https://api.scrapengine.io/api/v1/bing/search?${params}`,
{
headers: {
Authorization: "Bearer YOUR_API_KEY",
},
}
);
const data = await response.json();
console.log(data);
import requests
url = "https://api.scrapengine.io/api/v1/bing/search"
headers = {"Authorization": "Bearer YOUR_API_KEY"}
params = {
"q": "technology",
"responseFilter": "News",
"freshness": "Day"
}
response = requests.get(url, headers=headers, params=params)
print(response.json())
Localized Search
curl -X GET "https://api.scrapengine.io/api/v1/bing/search?q=restaurants&mkt=de-DE&cc=DE&location=Berlin" \
-H "Authorization: Bearer YOUR_API_KEY"
const params = new URLSearchParams({
q: "restaurants",
mkt: "de-DE",
cc: "DE",
location: "Berlin",
});
const response = await fetch(
`https://api.scrapengine.io/api/v1/bing/search?${params}`,
{
headers: {
Authorization: "Bearer YOUR_API_KEY",
},
}
);
const data = await response.json();
console.log(data);
import requests
url = "https://api.scrapengine.io/api/v1/bing/search"
headers = {"Authorization": "Bearer YOUR_API_KEY"}
params = {
"q": "restaurants",
"mkt": "de-DE",
"cc": "DE",
"location": "Berlin"
}
response = requests.get(url, headers=headers, params=params)
print(response.json())
Response
Success Response (200)
Returns parsed search results:{
"searchInformation": {
"totalEstimatedMatches": 25400000,
"searchTime": 0.32
},
"webPages": [
{
"position": 1,
"title": "What is Artificial Intelligence (AI)? | IBM",
"url": "https://www.ibm.com/topics/artificial-intelligence",
"displayUrl": "www.ibm.com › topics › artificial-intelligence",
"snippet": "Artificial intelligence (AI) is technology that enables computers and machines to simulate human intelligence...",
"datePublished": "2024-01-15"
},
{
"position": 2,
"title": "Artificial Intelligence - MIT Technology Review",
"url": "https://www.technologyreview.com/artificial-intelligence/",
"displayUrl": "www.technologyreview.com › artificial-intelligence",
"snippet": "Coverage of artificial intelligence and machine learning from MIT Technology Review..."
}
],
"relatedSearches": [
{
"text": "artificial intelligence examples",
"displayText": "AI examples"
},
{
"text": "artificial intelligence jobs",
"displayText": "AI jobs"
}
],
"pagination": {
"currentOffset": 0,
"nextOffset": 10,
"totalEstimatedMatches": 25400000
}
}
Response Headers
| Header | Description |
|---|---|
x-remaining-credits | Number of API credits remaining |
x-trace-id | Unique identifier for the request |
Error Responses
| Status | Description |
|---|---|
400 | Bad Request - Invalid query parameters |
401 | Unauthorized - Invalid or missing API key |
500 | Internal Server Error |
Use Cases
- Alternative search data: Get search results from Bing as an alternative to Google
- SEO research: Compare rankings across different search engines
- Market research: Analyze search trends on Bing’s platform
- News aggregation: Collect news articles from Bing News
- Image search: Find images using Bing’s image search
- Video discovery: Search for videos across the web
Was this page helpful?