Bing Search Engine Results API
/search?engine=bing
API endpoint allows you to scrape the results from the Bing search engine via our SerpApi service. Head to the playground for a live and interactive demo.
API Parameters
Geographic Location
location
Optional
Parameter defines from where you want the search to originate. If several locations match the location requested, we'll pick the most popular one. Head to the /locations.json API if you need a more precise control.
mkt
Optional
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 <language code>-<country code>. For example, en-US. The string is case insensitive. For a list of possible market values, see Market Codes.
NOTE: If known, you are encouraged to always specify the market. Specifying the market helps Bing route the request and return an appropriate and optimal response. If you specify a market that is not listed in Market Codes, Bing uses a best fit market code based on an internal mapping that is subject to change.
This parameter and the cc query parameter are mutually exclusive—do not specify both.
Localization
cc
Optional
Parameter defines the country to search from. It follows the 2-character ISO_3166-1 format. (e.g., us
for United States, de
for Germany, gb
for United Kingdom, etc.).
Pagination
Advanced Filters
safeSearch
Optional
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
Optional
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
device
Optional
Parameter defines the device to use to get the results. It can be set to desktop
(default) to use a regular browser, tablet
to use a tablet browser (currently using iPads), or mobile
to use a mobile browser (currently using iPhones).
no_cache
Optional
Parameter will force SerpApi to fetch the Bing 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. It can be set to false
(default) to allow results from the cache, or true
to disallow results from the cache. no_cache and async parameters should not be used together.
async
Optional
Parameter defines the way you want to submit your search to SerpApi. It can be set to false
(default) to open an HTTP connection and keep it open until you got your search results, or true
to just submit your search to SerpApi and retrieve them later. In this case, you'll need to use our Searches Archive API to retrieve your results. async and no_cache parameters should not be used together. async should not be used on accounts with Ludicrous Speed enabled.
API Results
JSON Results
JSON output includes structured data for organic results, ad results, and more.
A search status is accessible through search_metadata.status
. It flows this way: Processing
-> Success
|| Error
. If a search has failed, error
will contain an error message. search_metadata.id
is the search ID inside SerpApi.
HTML Results
HTML output is useful to debug JSON results or support features not supported yet by SerpApi.
HTML output gives you the raw HTML results from Bing.
API Examples
Example results for q: Coffee

{
"search_metadata": {
"id": "5da9bd9c260ca91f7afddd94",
"status": "Success",
"json_endpoint": "https://serpapi.com/searches/04167d92c31cec9c/5da9bd9c260ca91f7afddd94.json",
"created_at": "2019-10-18 13:26:52 UTC",
"processed_at": "2019-10-18 13:26:52 UTC",
"bing_url": "https://www.bing.com/search?form=QBRE&q=coffee",
"raw_html_file": "https://serpapi.com/searches/04167d92c31cec9c/5da9bd9c260ca91f7afddd94.html",
"total_time_taken": 4.7
},
"search_parameters": {
"q": "Coffee",
"device": "desktop",
"engine": "bing"
},
"organic_results": [
{
"position": 1,
"title": "Coffee - Wikipedia",
"link": "https://en.wikipedia.org/wiki/Coffee",
"displayed_link": "https://en.wikipedia.org/wiki/Coffee",
"snippet": "Coffee is a brewed drink prepared from roasted coffee beans, the seeds of berries from certain Coffea species. The genus Coffea is native to tropical Africa (specifically having its origin in Ethiopia and Sudan) and Madagascar, the Comoros, Mauritius, and Réunion in the Indian Ocean. Coffee plants are now cultivated in over 70 countries, primarily in the equatorial regions of the Americas ..."
},
...
],
"ads": [
{
"position": 1,
"block_position": "bottom",
"tracking_link": "...",
"displayed_link": "http://www.activebeat.com",
"description": "Want to Know More About Coffee? Learn All You Need to Know Here!"
}
]
}
Example with optional parameters
{
"search_metadata": {
"id": "5ce77e9e5f59e47e5d8d7f49",
"status": "Cached",
"created_at": "2019-05-24 05:18:22 UTC",
"processed_at": "2019-05-24 05:18:22 UTC",
"bing_url": "https://www.bing.com/search?form=QBRE&q=Fresh+Bagels&first=20&count=30&safeSearch=Strict",
"total_time_taken": 3.0
},
"search_parameters": {
"q": "Fresh Bagels",
"device": "desktop",
"first": "20",
"count": "30",
"safe_search": "Strict"
},
"organic_results": [
{
"position": 1,
"title": "Fresh Bagels & Wraps for Dine In, Take Out & Catering in ...",
"link": "http://bageljays.com/",
"displayed_link": "bageljays.com",
"snippet": "Bagel Jay’s started the fresh bagel tradition in Buffalo, NY in 1976. Perfect for a quick bite to meet family, friends or business associates. Breakfast or Lunch. Specializing in homemade cream cheese …"
},
...
],
"ads": [
{
"position": 1,
"block_position": "top",
"tracking_link": "...",
"displayed_link": "https://www.ezcater.com/Catering/Menu",
"sitelinks": {
"inline": [
{
"title": "Enterprise solutions",
"tracking_link": "..."
},
{
"title": "Our team",
"tracking_link": "..."
},
...
]
},
"thumbnail": "<URL to image>",
"description": "Place your catering order. Free & easy online ordering. On time delivery."
},
{
"position": 2,
"block_position": "bottom",
"tracking_link": "...",
"displayed_link": "http://www.Amazon.com/Grocery",
"description": "Free Shipping on Qualified Orders. Buy Groceries at Amazon & Save."
},
...
]
}