SERP API
Bing search
The same /v1/search endpoint with engine=bing returns Bing's results as JSON: web results, images, news, videos and shopping.
Send the API key in the X-API-Key header, or as the api_key query parameter, exactly like Google searches (Authentication). Bing searches can also run as async tasks with pingback_url.
Parameters
| Field | Type | Description |
|---|---|---|
engine | string | required Set it to bing. Without it the search goes to Google.Values:bing |
q | string | required The search query, up to 2,048 characters.Example: best laptop 2026 |
type | string | optional Leave it out (or send search) for web results; images, news, videos or shopping for those lists. Any other value answers 400 invalid_type.Values:searchimagesnewsvideosshoppingDefault: search |
gl | string | optional Country, as a two-letter code. us, in, gb, de, es, it, jp, kr and br search from their own region with their own market. Any other country is searched as the US: the answer then says gl: "us" and keeps what you sent in gl_requested.Default: usExample: in |
hl | string | optional Language of the results page, as a code.Default: enExample: de |
location | string | optional A city or region in any words. Bing searches the query in that place ("plumber" with Austin, Texas searches "plumber in Austin, Texas"), while gl and hl still pick the market and the language. It is passed on as written; Google's place names are not needed.Example: Austin, Texas |
device | string | optional Search as a desktop or a phone.Values:desktopmobileDefault: desktop |
page | integer | optional Web results only: the first results page to get, starting at 1. Images, news, videos and shopping ignore it and always return their first page (search_parameters.page then says 1).Default: 1 |
num_pages | integer | optional Web results only: how many results pages to get, from 1 to 10; each page costs a credit. Images, news, videos and shopping ignore it: one page, one credit.Default: 1 |
response_type | string | optional json for the parsed results, html for Bing's own page, or both. One page comes back as html (a string), several pages as html_pages: a list of { page, html }.Values:jsonhtmlbothDefault: json |
pingback_url | string | optional Queue the search and get the answer later; see Async tasks. |
What comes back
| Field | Type | Description |
|---|---|---|
search_metadata | object | About this request. |
id | string | A unique id for the search. |
status | string | Success when Bing's page came back. |
created_at | string | When the search ran, in ISO 8601 (UTC). |
pages | integer | How many results pages came back. |
credits_charged | integer | Credits this request cost: one per page that came back. |
task_id | string | Only for async tasks: the task the result belongs to. |
search_parameters | object | What the search used. |
engine | string | bing |
q | string | The query. |
location | string | The location you sent, or null. |
gl | string | The country searched. |
gl_requested | string | Only when your country was searched as the US: the country you sent. |
hl | string | The language. |
page, num_pages | integer | The first page and the number of pages that came back. |
device | string | desktop or mobile. |
type | string | search, images, news, videos or shopping. |
response_type | string | json, html or both. |
search_information | object | About the results. |
query_displayed | string | The query. |
total_results | integer | Web results only: how many results Bing counts. |
organic_results | array | Web results. |
position | integer | Its place in the list, counting on across pages. |
page | integer | The results page it came from. |
title, link | string | The title and the real address (not Bing's click-tracking link). |
displayed_link, source | string | The address as Bing shows it, and the site's name. |
snippet, date | string | The text under the title, and its date when Bing shows one. |
ads | array | Web: text ads with title, displayed_link, snippet, and link when Bing gives the real address. Shopping: sponsored products with title, price, extracted_price, old_price, seller, image and offer_id, and no link (their only links are paid ad clicks). Ad redirect links are never included, so reading them never counts as a click. |
related_searches | array | Web: query and link of each search Bing suggests. |
images_results | array | type=images. |
position | integer | Its place in the list, counting on across pages. |
page | integer | The results page it came from. |
title, link, source | string | The title, the page the image is on and its site. |
thumbnail, original | string | Bing's thumbnail and the original file. |
news_results | array | type=news. |
position | integer | Its place in the list, counting on across pages. |
page | integer | The results page it came from. |
title, link, source | string | The headline, the article and its publisher. |
snippet | string | The text under the headline, only when Bing shows one: specific queries ("india cricket") usually have it, broad ones ("technology") often do not. |
date, thumbnail | string | How long ago it was published, and the picture, when Bing shows them. |
video_results | array | type=videos. |
position | integer | Its place in the list, counting on across pages. |
page | integer | The results page it came from. |
title, link | string | The title and the video page. |
platform, channel, views, date, duration, thumbnail | string | Where it is, who posted it, views, when, length and the picture. |
shopping_results | array | type=shopping. |
position | integer | Its place in the list, counting on across pages. |
page | integer | The results page it came from. |
title | string | The full product name. |
link | string | Bing's product page, which lists the stores and their prices. Bing's results page has no direct store address, so none is given (most shopping APIs work this way). Only shopping_results have a link; ads do not. |
price, extracted_price, old_price | string / number | The price as shown, as a number, and the price before a sale when there is one. |
seller | string | The store, when Bing names one. |
rating, reviews | number / string | The star rating and the number of reviews, only on products where Bing shows them; many searches have none. |
image, offer_id | string | The product picture and Bing's offer id. |
Examples
The rest of the answer has the same search_metadata, search_parameters and search_information as the web example.
type=images
"images_results": [
{
"position": 1,
"page": 1,
"title": "Eiffel Tower at sunset",
"link": "https://www.example.com/paris/eiffel-tower",
"source": "example.com",
"thumbnail": "https://ts2.mm.bing.net/th?id=OIF.example&pid=15.1",
"original": "https://www.example.com/images/eiffel-tower.jpg"
}
]type=news
"news_results": [
{
"position": 1,
"page": 1,
"title": "Stock market today: Nasdaq, S&P 500 pare losses",
"link": "https://www.msn.com/en-us/money/general/stock-market-today/ar-AA2icWxW",
"source": "Investopedia on MSN",
"snippet": "Major indexes are mixed in afternoon trading...",
"date": "10 hours ago",
"thumbnail": "https://www.bing.com/th?id=ONUT.example&pid=News"
}
]type=videos
"video_results": [
{
"position": 1,
"page": 1,
"title": "Python Full Course | Python Tutorial For Beginners",
"link": "https://www.youtube.com/watch?v=o1fjWjReodE",
"platform": "YouTube",
"channel": "Simplilearn",
"views": "11.8K views",
"date": "5 months ago",
"duration": "22:45:50",
"thumbnail": "https://ts2.mm.bing.net/th?id=OVP.example&pid=15.1"
}
]type=shopping
"shopping_results": [
{
"position": 1,
"page": 1,
"title": "ASICS Women's GEL-Nimbus 27 Road-Running Shoes Cream/Edo Purple 6.5",
"link": "https://www.bing.com/shop/entitydetails?q=running+shoes&...",
"price": "$89.95",
"extracted_price": 89.95,
"seller": "Amazon.com",
"rating": 4.6,
"reviews": "10K+",
"image": "https://th.bing.com/th/id/OPHS.example?w=220&h=220",
"offer_id": "427740188071"
}
],
"ads": [
{
"title": "Under Armour Mens Charged Gemini Men's Running Shoes - White, 13",
"price": "$83.97",
"extracted_price": 83.97,
"old_price": "$110.00",
"seller": "Under Armour",
"image": "https://th.bing.com/th?id=OPHS.example&w=180&h=180",
"offer_id": "485180602969"
}
]Response headers
| Field | Type | Description |
|---|---|---|
X-Credits-Charged | integer | Credits this request cost. |
X-Credits-Used | integer | Credits used this period, this request included. |
X-Credits-Limit | integer | Your plan's credits for the period (only when the plan has a cap). |
X-Credits-Left | integer | Credits left this period (only when the plan has a cap). |
X-Plan | string | Your plan's id. |
Errors
Errors never cost credits. Every error code is on the Errors page; these are the ones a Bing search meets most:
| Field | Type | Description |
|---|---|---|
invalid_engine | 400 | engine is not google, bing, google_maps, zumper, realtor, redfin, squareyards, nobroker, commonfloor, forsalebyowner or rsvpre. |
invalid_type | 400 | With engine=bing, type is not search, images, news, videos or shopping. |
missing_query, query_too_long | 400 | q is missing or longer than 2,048 characters. |
invalid_response_type, invalid_pingback_url | 400 | response_type or pingback_url has a value it cannot take. |
quota_exceeded, concurrency_limit_reached | 429 | Not enough credits, or too many searches at once for your plan. Retry after Retry-After seconds. |
upstream_error, upstream_unavailable, upstream_timeout | 502 / 503 / 504 | Bing could not be reached in time. Retry in a few seconds. |
api_paused | 503 | Bing Search is paused for maintenance. Retry after Retry-After seconds. |
400 Bad Request
{
"error": {
"code": "invalid_type",
"message": "With engine=bing the type parameter must be search, images, news, videos or shopping."
},
"charged": false
}Credits
Each results page costs one credit, the same as Google; images, news, videos and shopping are one page each. Failed searches are free.