Bing Images API
Find image results and their source pages.
What is this API?
Serqo’s Bing Images API returns image results shown for a Bing query as structured JSON. Use engine: "bing" and type: "images"; result entries expose the fields documented in the response tables.
Common use cases
- Compare image-result visibility in Bing across queries and markets.
- Collect image-result metadata and source-page details for research.
- Build repeatable snapshots for visual search monitoring.
Request example
POST https://api.serqo.io/v1/search
| Field | Value |
|---|---|
| engine | bing |
| type | images |
Request headers
Create an API key and store it on your server. Send the API key in the x-api-key header.
| Header | Value | Description |
|---|---|---|
| Content-Type | application/json | JSON request body. |
| x-api-key | YOUR_API_KEY | API key used to authenticate the request. |
export SERP_API_KEY='YOUR_API_KEY'
curl https://api.serqo.io/v1/search \
-H "x-api-key: $SERP_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"q": "vintage bicycle",
"engine": "bing",
"type": "images",
"gl": "us",
"hl": "en"
}' Code examples
Use the same API key with a standard HTTP client. These examples require Node.js 22 or later, or Python 3.
const response = await fetch('https://api.serqo.io/v1/search', {
method: 'POST',
headers: { 'x-api-key': process.env.SERP_API_KEY, 'Content-Type': 'application/json' },
body: JSON.stringify({"q": "vintage bicycle","engine":"bing","type":"images"}),
});
const result = await response.json();
if (!response.ok) throw new Error(`${response.status}: ${result.error?.message ?? 'Search failed'}`);
console.log(result.data);import json
import os
from urllib.request import Request, urlopen
payload = {"q": "vintage bicycle","engine":"bing","type":"images"}
request = Request(
'https://api.serqo.io/v1/search',
data=json.dumps(payload).encode(),
headers={
'x-api-key': os.environ['SERP_API_KEY'],
'Content-Type': 'application/json',
},
)
with urlopen(request) as response:
result = json.load(response)
print(result['data'])Parameters
The number of results returned per request depends on the search engine and may vary.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| q | string | Yes | — | Non-empty search query. |
| engine | string | No | Use bing for this API. | |
| type | string | No | web | Use images for this API. |
| gl | string | No | — | Two-letter lowercase country code, for example us. |
| hl | string | No | — | Interface language code, for example en. |
| start | integer | No | — | Offset from 0 to 1000000. Use nextStart from the response. |
| safe | off | active | No | — | Explicit-content filter: off disables it, active enables it. |
| tbs | string | No | — | Not supported by Bing; omit it to avoid INVALID_PARAM. |
Only q is required by the API, but keep engine and type as shown for this search. A dash means the API does not assign a default. Unknown parameters return 422 INVALID_PARAM.
Response
HTTP 200. A real API response, trimmed to the first three results for readability. Field availability and result groups vary by the returned page; values can be null.
{
"success": true,
"requestId": "req_9ffc3996-ba11-40a0-9201-1d4179a3d763",
"data": {
"engine": "bing",
"type": "images",
"query": {
"q": "vintage bicycle",
"gl": "us",
"hl": "en"
},
"searchInformation": {
"totalResults": null,
"timeTakenMs": null,
"displayed": null
},
"results": [
{
"position": 1,
"type": "image",
"title": "Dave’s Vintage Bicycles – A Classic Bicycle Photo Archive - Dave's ...",
"url": "https://www.nostalgic.net/",
"displayedUrl": null,
"domain": "nostalgic.net",
"source": null,
"date": null,
"snippet": "Dave’s Vintage Bicycles – A Classic Bicycle Photo Archive - Dave's ...",
"thumbnail": "https://ts2.mm.bing.net/th?id=OIP.wX8FCvAL8epu0hK77ki35QHaE8&pid=15.1",
"favicon": null,
"duration": null,
"price": null,
"rating": null,
"sitelinks": [],
"extensions": {
"mediaUrl": "http://www.nostalgic.net/wp-content/uploads/2015/04/Nate-Pense-Streamliner-1.jpg",
"pageUrl": "https://www.nostalgic.net/",
"width": "303",
"height": "202",
"detailUrl": "https://www.bing.com/images/search?view=detailV2&ccid=wX8FCvAL&id=DE08CAED1051F5969078BF55D28A4F15D81CA91F&thid=OIP.wX8FCvAL8epu0hK77ki35QHaE8&mediaurl=https%3a%2f%2fth.bing.com%2fth%2fid%2fR.c17f050af00bf1ea6ed212bbee48b7e5%3frik%3dH6kc2BVPitJVvw%26riu%3dhttp%253a%252f%252fwww.nostalgic.net%252fwp-content%252fuploads%252f2015%252f04%252fNate-Pense-Streamliner-1.jpg%26ehk%3dmIel%252fpXGu25KyXtah0V42RO1jj2sVUJuKFH%252bfOMGVMs%253d%26risl%3d%26pid%3dImgRaw%26r%3d0&exph=854&expw=1280&q=vintage+bicycle&FORM=IRPRST&ck=8083F09FA7B068815E53D82B1D0A8F4D&selectedIndex=0&itb=0",
"mid": "DE08CAED1051F5969078BF55D28A4F15D81CA91F",
"cid": "wX8FCvAL"
}
},
{
"position": 2,
"type": "image",
"title": "Classic Vintage Schwinn Bikes Rare 50th Anniversary Schwinn Cruiser",
"url": "https://fity.club/lists/suggestions/Classic-Vintage-Schwinn-Bikes/",
"displayedUrl": null,
"domain": "fity.club",
"source": null,
"date": null,
"snippet": "Classic Vintage Schwinn Bikes Rare 50th Anniversary Schwinn Cruiser",
"thumbnail": "https://ts4.mm.bing.net/th?id=OIP.5f9p97o0sIVnGfqxob7xhgHaE6&pid=15.1",
"favicon": null,
"duration": null,
"price": null,
"rating": null,
"sitelinks": [],
"extensions": {
"mediaUrl": "https://simplicityvintagecycles.com/wp-content/uploads/2023/09/1978_schwinn_suburban_01.jpg",
"pageUrl": "https://fity.club/lists/suggestions/Classic-Vintage-Schwinn-Bikes/",
"width": "306",
"height": "202",
"detailUrl": "https://www.bing.com/images/search?view=detailV2&ccid=5f9p97o0&id=55F94B24B1FF1E2E8EAB1813D15B9E6C2651AABD&thid=OIP.5f9p97o0sIVnGfqxob7xhgHaE6&mediaurl=https%3a%2f%2fsimplicityvintagecycles.com%2fwp-content%2fuploads%2f2023%2f09%2f1978_schwinn_suburban_01.jpg&cdnurl=https%3a%2f%2fth.bing.com%2fth%2fid%2fR.e5ff69f7ba34b0856719fab1a1bef186%3frik%3dvapRJmyeW9ETGA%26pid%3dImgRaw%26r%3d0&exph=1024&expw=1545&q=vintage+bicycle&FORM=IRPRST&ck=0FB9F4E49359F33E83C966F40C69FD62&selectedIndex=1&itb=0",
"mid": "55F94B24B1FF1E2E8EAB1813D15B9E6C2651AABD",
"cid": "5f9p97o0"
}
},
{
"position": 3,
"type": "image",
"title": "Classic Bicycle Brand at Tammy Jackson blog",
"url": "https://storage.googleapis.com/dxjjcwidboiuge/classic-bicycle-brand.html",
"displayedUrl": null,
"domain": "storage.googleapis.com",
"source": null,
"date": null,
"snippet": "Classic Bicycle Brand at Tammy Jackson blog",
"thumbnail": "https://ts1.mm.bing.net/th?id=OIP.cfy36S7JJfnqSzOrC3Z9MwHaE9&pid=15.1",
"favicon": null,
"duration": null,
"price": null,
"rating": null,
"sitelinks": [],
"extensions": {
"mediaUrl": "http://www.nostalgic.net/wp-content/uploads/2014/10/DSC_0008-Copy.jpg",
"pageUrl": "https://storage.googleapis.com/dxjjcwidboiuge/classic-bicycle-brand.html",
"width": "302",
"height": "202",
"detailUrl": "https://www.bing.com/images/search?view=detailV2&ccid=cfy36S7J&id=BBB7B1F9692C834CC545C4705CEA13BE5EDB2CBA&thid=OIP.cfy36S7JJfnqSzOrC3Z9MwHaE9&mediaurl=https%3a%2f%2fth.bing.com%2fth%2fid%2fR.71fcb7e92ec925f9ea4b33ab0b767d33%3frik%3duizbXr4T6lxwxA%26riu%3dhttp%253a%252f%252fwww.nostalgic.net%252fwp-content%252fuploads%252f2014%252f10%252fDSC_0008-Copy.jpg%26ehk%3dFyFwvF8Z4Ep%252ft8lLXCbsGeFFkHOrebj1SlRiqjzPwDI%253d%26risl%3d%26pid%3dImgRaw%26r%3d0&exph=685&expw=1024&q=vintage+bicycle&FORM=IRPRST&ck=091E893F4ED4A60658A1FCAC5B95C931&selectedIndex=2&itb=0",
"mid": "BBB7B1F9692C834CC545C4705CEA13BE5EDB2CBA",
"cid": "cfy36S7J"
}
}
],
"features": {
"relatedSearches": [
{
"query": "All",
"url": "https://www.bing.com/search?q=vintage+bicycle&FORM=HDRSC1"
},
{
"query": "Web",
"url": "https://www.bing.com/search?q=vintage+bicycle&webscp=1&FORM=HDRWSC"
},
{
"query": "AI Mode",
"url": "https://www.bing.com/copilotsearch?q=vintage+bicycle&FORM=CSSCOP"
},
{
"query": "Videos",
"url": "https://www.bing.com/videos/search?q=vintage+bicycle&FORM=HDRSC4"
},
{
"query": "Maps",
"url": "https://www.bing.com/maps?q=vintage+bicycle&FORM=HDRSC6"
},
{
"query": "News",
"url": "https://www.bing.com/news/search?q=vintage+bicycle&FORM=HDRSC7"
},
{
"query": "Shopping",
"url": "https://www.bing.com/shop/topics?q=vintage+bicycle&FORM=SHOPTB"
},
{
"query": "Flights",
"url": "https://www.bing.com/travel/search?q=vintage+bicycle&m=flights&FORM=FBSCOP"
},
{
"query": "Art",
"url": "https://www.bing.com/images/search?q=Vintage+Bicycle+Art&FORM=IRMHRS"
},
{
"query": "Old",
"url": "https://www.bing.com/images/search?q=Old+Vintage+Bicycles&FORM=IRMHRS"
},
{
"query": "Rare",
"url": "https://www.bing.com/images/search?q=Rare+Vintage+Bicycle&FORM=IRMHRS"
},
{
"query": "Motor",
"url": "https://www.bing.com/images/search?q=Vintage+Motor+Bicycle&FORM=IRMHRS"
}
]
},
"pagination": {
"pageSize": 35,
"page": 1,
"start": 0,
"hasNext": true,
"nextStart": 35
},
"meta": {
"elapsedMs": 2142
}
},
"meta": {
"cache": "miss"
}
}
Response fields
| Field | Type | Description |
|---|---|---|
| data.query | object | Search query passed to the engine. |
| data.searchInformation | object | Reported result count and search timing, when provided. |
| success | boolean | Whether the request succeeded. True in this example. |
| requestId | string | Request identifier to include when troubleshooting. |
| data.type | string | Search type used for this response. |
| data.engine | string | Engine that returned the results. |
| data.results | array | Main result list. Check feature groups as well when present. |
| data.features | object | Additional result groups; groups not returned by the engine may be absent. |
| data.pagination | object | Current offset and next-page availability. |
| data.meta.elapsedMs | number | Search duration in milliseconds, not a performance guarantee. |
| meta.cache | string | null | hit, miss, or null if cache status is unknown. |
Result fields
Read entries from data.results. Additional groups, when present, are in data.features.
| Field | Type | Description |
|---|---|---|
| data.results[].domain | string | null | Destination domain, when available. |
| data.results[].favicon | string | null | Site icon when provided. |
| data.results[].sitelinks | array | Additional links nested under the result. |
| data.results[].sitelinks[].title | string | Sitelink label. |
| data.results[].sitelinks[].url | string | null | Sitelink destination. |
| data.results[].extensions | object | Other result-specific properties. |
| data.results[].snippetHighlightedWords | string[], optional | Highlighted terms in the snippet, when provided. |
| data.results[].position | integer | Rank on this results page, starting at 1. |
| data.results[].type | string | Result category: organic, news, image, video, shopping, local, forum, book, patent or ad. This can differ from the request type. |
| data.results[].title | string | null | Title shown in the result. |
| data.results[].url | string | null | Destination URL when resolved; it may be null. |
| data.results[].displayedUrl | string | null | URL or domain displayed by the engine; not always a clickable link. |
| data.results[].source | string | null | Source name or displayed domain. |
| data.results[].date | string | null | Date text when extracted; not necessarily an ISO timestamp. |
| data.results[].snippet | string | null | Result summary. |
| data.results[].thumbnail | string | null | Thumbnail URL or inline data URL, when provided. |
| data.results[].duration | string | null | Video duration text when provided. |
| data.results[].price | string | null | Price text when provided. |
| data.results[].rating | number | null | Rating when provided. |
Image searches do not guarantee original image URLs, dimensions or thumbnails. Do not treat a result-page URL as an original image URL.
Pagination
- Check
data.pagination.hasNext; stop when it is false. - Use
data.pagination.nextStartasstart. Keep the other search parameters unchanged. - Send the next request. Each page is a separate search request.
| Field | Type | Description |
|---|---|---|
| data.pagination.nextUrl | string | null | Search-engine URL for the next page, when available; use nextStart with this API. |
| data.pagination.requestedPage | integer | Page requested; may differ from the returned page if the engine does not provide it. |
| data.pagination.page | integer | Current page number. |
| data.pagination.start | integer | Current result offset. |
| data.pagination.hasNext | boolean | Whether another page is available. |
| data.pagination.nextStart | integer | null | Offset for the next request, or null when unavailable. |
Errors
{
"success": false,
"requestId": "req_example",
"error": {
"code": "INVALID_PARAM",
"message": "Unknown parameter \"page\"",
"retryable": false
}
} | Field | Type | Description |
|---|---|---|
| error.code | string | Machine-readable error code. |
| error.message | string | Reason the request failed. |
| error.retryable | boolean | Whether retrying is recommended. |
| error.retryAfterMs | number, optional | Minimum wait before retrying, in milliseconds. |
| HTTP status | Meaning | What to do |
|---|---|---|
| 400 | Invalid request or unsupported search type. | Check the query and engine/type combination. |
| 401 | Missing, invalid or revoked API key. | Check the authentication header and API key. |
| 402 | Insufficient credits. | Check your credit balance. |
| 403 | Permission or plan restriction. | Check account access and plan limits. |
| 422 | Invalid parameter. | Correct the parameter identified by error.message. |
| 429 | Request rate or queue limit. | Follow the retry rules below. |
| 5xx | Server or search service failure. | Keep the requestId; retry only if allowed. |
Retry rules
- Retry only when
error.retryableistrue. - If
error.retryAfterMsis present, wait at least that many milliseconds.
Pricing and limits
- Successful searches use credits at the applicable rate.
- Failed searches and timeouts are not charged.
- Cache hits are free at the default rate. Before searching, your available balance must cover the full request cost.
See plan pricing and rate-limit and credit details.
Frequently asked questions
Does an image result guarantee access to the original file?
No. The API returns fields extracted from the search result; it does not guarantee an original image URL or rights to reuse an image. Check the returned links and permissions at the source.
How are Bing Images searches charged?
Successful searches use the applicable credit rate for the engine, type and country. Failed searches and timeouts release the reservation; cache hits are free at the default rate. See Pricing and limits below for the current rules.