Bing Search

Bing Search API allows you to scrape the results from the Bing search engine.
Engine: bing

API Parameters

General Parameters

Parameter
Required
Details
engine
Required
The engine of the API. Needs to be set to bing for this request.

Request Parameters

Parameter
Required
Details
api_key
Required
Your API Key
device
Optional
The device used for your search. Can be set to desktop, mobile or tablet.

Search Query

Parameter
Required
Details
q
Required
The citation that you are searching for (the query).

Localization

Parameter
Required
Details
cc
Optional
The country code from where you want to perform the search.
setLang
Optional
The user interface language

Pagination

Parameter
Required
Details
offset
Optional
The offset of the bing search results. Represents the number of results that you want to skip.

Geographic Location

Parameter
Required
Details
mkt
Optional
The market where the results come from. You can find a list with all the available markets here
location
Optional
Defines where you want the search to originate from. A list of all the geotargeting locations can be found here

Advanced Filters

Parameter
Required
Details
safeSearch
Optional
It's used to filter adult content. Can be set to off, moderate or strict

Bing Search examples

Results For q: "laptops"
GET https://serp.shifter.io/v1?engine=bing&api_key=YOUR_API_KEY&q=laptops
Input
cURL
NodeJS
Python
PHP
Golang
Java
.NET
Ruby
curl --request GET --url "https://serp.shifter.io/v1?engine=bing&api_key=YOUR_API_KEY&q=laptops"
const http = require("https");
const options = {
"method": "GET",
"hostname": "serp.shifter.io",
"port": null,
"path": "/v1?engine=bing&api_key=YOUR_API_KEY&q=laptops",
"headers": {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
import http.client
conn = http.client.HTTPSConnection("serp.shifter.io")
conn.request("GET", "/v1?engine=bing&api_key=YOUR_API_KEY&q=laptops")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://serp.shifter.io/v1?engine=bing&api_key=YOUR_API_KEY&q=laptops",
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/ioutil"
)
func main() {
url := "https://serp.shifter.io/v1?engine=bing&api_key=YOUR_API_KEY&q=laptops"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
HttpResponse<String> response = Unirest.get("https://serp.shifter.io/v1?engine=bing&api_key=YOUR_API_KEY&q=laptops")
.asString();
var client = new RestClient("https://serp.shifter.io/v1?engine=bing&api_key=YOUR_API_KEY&q=laptops");
var request = new RestRequest(Method.GET);
IRestResponse response = client.Execute(request);
require 'uri'
require 'net/http'
require 'openssl'
url = URI("https://serp.shifter.io/v1?engine=bing&api_key=YOUR_API_KEY&q=laptops")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
Output
// code