/search?engine=bing API endpoint allows you to scrape the results from the Bing search engine via our SerpApi service.
Api Details
EndpointGET https://serpapi.abcproxy.com/search
Description
A user may query the following: https://serpapi.abcproxy.com/search?engine=bing utilizing a GET request. Head to the for a live and interactive demo.
using System;
using System.Net.Http;
class Program
{
static async Task Main()
{
var client = new HttpClient();
var query = System.Web.HttpUtility.ParseQueryString(string.Empty);
query["engine"] = "bing";
query["q"] = "Coffee";
query["no_cache"] = "false";
query["api_key"] = "YOUR_API_KEY";
var response = await client.GetAsync(
$"https://serpapi.abcproxy.com/search?{query}"
);
Console.WriteLine(await response.Content.ReadAsStringAsync());
}
}
import java.net.*;
import java.io.*;
public class Main {
public static void main(String[] args) throws Exception {
String url = "https://serpapi.abcproxy.com/search" +
"?engine=bing" +
"&q=Coffee" +
"&no_cache=false" +
"&api_key=YOUR_API_KEY";
HttpURLConnection conn = (HttpURLConnection) new URL(url).openConnection();
conn.setRequestMethod("GET");
BufferedReader in = new BufferedReader(
new InputStreamReader(conn.getInputStream())
);
String response = in.lines().collect(Collectors.joining());
System.out.println(response);
}
}
Parameters
Search Query
Name
Type
Required
Description
Example
q
string
Yes
Parameter defines the search query. You can use anything that you would use in a regular Bing search.
coffee
Geographic Location
Name
Type
Required
Description
Example
location
string
No
Parameter defines from where you want the search to originate. If several locations match the location requested, we'll pick the most popular one.
Japan-Tokyo
lat
string
No
Defines a GPS latitude for the search origin
37.26741027832031
lon
string
No
Defines a GPS longitude for the search origin
-121.83389282226562
mkt
string
No
The market where the results come from (e.g. en-US). Typically, mkt is the country where the user is making the request from. However, it could be a different country if the user is not located in a country where Bing delivers results. The market must be in the form -. For example, en-US. The string is case insensitive. For a list of possible market values.
en-US
Localization
Name
Type
Required
Description
Example
cc
string
No
us, de, gb
Pagination
Name
Type
Required
Description
Example
first
int
No
Parameter controls the offset of the organic results. This parameter defaults to 1.
10
count
int
No
Parameter controls the number of results per page.
Minimum: 1
Maximum: 50
Advanced Filters
Name
Type
Required
Description
Example
safeSearch
string
No
Parameter defines the level of filtering for adult content. It can be set to:
Off to return webpages with adult text, images, or videos.
Moderate to return webpages with adult text, but not adult images or videos.
Strict to not return webpages with adult text, images, or videos.
-
filters
string
No
Parameter allows usage of a more complex filtering options such as filtering by date range ex1:"ez5_18169_18230" or using a specific display filters such as ufn:"Wunderman+Thompson"+sid:"5bede9a2-1bda-9887-e6eb-30b1b8b6b513"+catguid:"5bede9a2-1bda-9887-e6eb-30b1b8b6b513_cfb02057"+segment:"generic.carousel"+entitysegment:"Organization". Exact values can be constructed by using Bing search and copying filters query parameter.
-
Serpapi Parameters
Name
Type
Required
Description
Example
engine
string
Yes
Set parameter to bing to use the Bing API engine.
google_patents
no_cache
boolean
No
Parameter will force SerpApi to fetch the Google Patents results even if a cached version is already present. A cache is served only if the query and all parameters are exactly the same. Cache expires after 1h. Cached searches are free, and are not counted towards your searches per month.