Bing Search API

Ranked pages with titles, links and snippets.

What is this API?

Serqo’s Bing Search API retrieves a Bing web results page and returns it as structured JSON through Serqo’s search endpoint. Use engine: "bing" and type: "web"; this is a third-party Serqo API, not a Microsoft API.

Common use cases

  • Track Bing web-result positions for selected queries and markets.
  • Compare Bing results with another search engine using consistent query inputs.
  • Collect ranked links and snippets for an internal reporting workflow.

Request example

POST https://api.serqo.io/v1/search
FieldValue
enginebing
typeweb

Request headers

Create an API key and store it on your server. Send the API key in the x-api-key header.

HeaderValueDescription
Content-Typeapplication/jsonJSON request body.
x-api-keyYOUR_API_KEYAPI key used to authenticate the request.
bash
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": "best hiking trails portugal",
  "engine": "bing",
  "type": "web",
  "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.

JavaScript
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": "best hiking trails portugal","engine":"bing","type":"web"}),
});
const result = await response.json();
if (!response.ok) throw new Error(`${response.status}: ${result.error?.message ?? 'Search failed'}`);
console.log(result.data);
Python
import json
import os
from urllib.request import Request, urlopen

payload = {"q": "best hiking trails portugal","engine":"bing","type":"web"}
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.

FieldTypeRequiredDefaultDescription
qstringYes—Non-empty search query.
enginestringNogoogleUse bing for this API.
typestringNowebUse web for this API.
glstringNo—Two-letter lowercase country code, for example us.
hlstringNo—Interface language code, for example en.
startintegerNo—Offset from 0 to 1000000. Use nextStart from the response.
safeoff | activeNo—Explicit-content filter: off disables it, active enables it.
tbsstringNo—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.

JSON
{
  "success": true,
  "requestId": "req_f145aebb-1495-4459-8c4a-88b748d50162",
  "data": {
    "engine": "bing",
    "type": "web",
    "query": {
      "q": "best hiking trails portugal",
      "gl": "us",
      "hl": "en"
    },
    "searchInformation": {
      "totalResults": null,
      "timeTakenMs": null,
      "displayed": null
    },
    "results": [
      {
        "position": 1,
        "type": "organic",
        "title": "10 Best trails and hikes in Portugal | AllTrails",
        "url": "https://www.alltrails.com/portugal",
        "displayedUrl": "AllTrails",
        "domain": "alltrails.com",
        "source": "AllTrails",
        "date": null,
        "snippet": "No matter what you're looking for, you can find a diverse range of the best hiking trails in Portugal to suit your needs. Explore one of … 4.1/5",
        "thumbnail": null,
        "favicon": null,
        "duration": null,
        "price": null,
        "rating": null,
        "sitelinks": [],
        "extensions": {}
      },
      {
        "position": 2,
        "type": "organic",
        "title": "7 of the Best Hikes in Portugal - Lonely Planet",
        "url": "https://www.lonelyplanet.com/articles/best-hikes-in-portugal",
        "displayedUrl": "Lonely Planet",
        "domain": "lonelyplanet.com",
        "source": "Lonely Planet",
        "date": null,
        "snippet": "Via Algarviana. Best long-distance hike in the southern interior. 300km (186 miles), 2–3 weeks, … Seven Hanging Valleys Trail. Best walk along sea cliffs. 5.7km (3.5 miles) one-way, 2–3 hours, … Piódão to Foz d’Égua Loop. Best village-to-village walk. 6.8km (4.2 miles), round-trip, 2 hours, … Paiva Walkways. Best river walk. 8km (5 miles) one-way, 3 hours, moderate. Hidden in northern … Via Geira Roman Road. Best historical trail. 4.3km (2.7 miles), one-way, 1–2 hours, easy. One of … See full list on lonelyplanet.com",
        "thumbnail": null,
        "favicon": null,
        "duration": null,
        "price": null,
        "rating": null,
        "sitelinks": [],
        "extensions": {}
      },
      {
        "position": 3,
        "type": "organic",
        "title": "16 Best Hiking Trails in Portugal",
        "url": "https://www.portugalthings.com/best-hiking-trails-in-portugal/",
        "displayedUrl": "Portugal Things",
        "domain": "portugalthings.com",
        "source": "Portugal Things",
        "date": null,
        "snippet": "All images Feb 13, 2025 · In Portugal, hiking trails are an opportunity to discover breathtaking views, natural wonders, and historical monuments …",
        "thumbnail": null,
        "favicon": null,
        "duration": null,
        "price": null,
        "rating": null,
        "sitelinks": [],
        "extensions": {}
      }
    ],
    "features": {},
    "pagination": {
      "page": 1,
      "start": 0,
      "hasNext": true,
      "nextStart": 10
    },
    "meta": {
      "elapsedMs": 1487
    }
  },
  "meta": {
    "cache": "miss"
  }
}

Response fields

FieldTypeDescription
data.queryobjectSearch query passed to the engine.
data.searchInformationobjectReported result count and search timing, when provided.
successbooleanWhether the request succeeded. True in this example.
requestIdstringRequest identifier to include when troubleshooting.
data.typestringSearch type used for this response.
data.enginestringEngine that returned the results.
data.resultsarrayMain result list. Check feature groups as well when present.
data.featuresobjectAdditional result groups; groups not returned by the engine may be absent.
data.paginationobjectCurrent offset and next-page availability.
data.meta.elapsedMsnumberSearch duration in milliseconds, not a performance guarantee.
meta.cachestring | nullhit, miss, or null if cache status is unknown.

Result fields

Read entries from data.results. Additional groups, when present, are in data.features.

FieldTypeDescription
data.results[].domainstring | nullDestination domain, when available.
data.results[].faviconstring | nullSite icon when provided.
data.results[].sitelinksarrayAdditional links nested under the result.
data.results[].sitelinks[].titlestringSitelink label.
data.results[].sitelinks[].urlstring | nullSitelink destination.
data.results[].extensionsobjectOther result-specific properties.
data.results[].snippetHighlightedWordsstring[], optionalHighlighted terms in the snippet, when provided.
data.results[].positionintegerRank on this results page, starting at 1.
data.results[].typestringResult category: organic, news, image, video, shopping, local, forum, book, patent or ad. This can differ from the request type.
data.results[].titlestring | nullTitle shown in the result.
data.results[].urlstring | nullDestination URL when resolved; it may be null.
data.results[].displayedUrlstring | nullURL or domain displayed by the engine; not always a clickable link.
data.results[].sourcestring | nullSource name or displayed domain.
data.results[].datestring | nullDate text when extracted; not necessarily an ISO timestamp.
data.results[].snippetstring | nullResult summary.
data.results[].thumbnailstring | nullThumbnail URL or inline data URL, when provided.
data.results[].durationstring | nullVideo duration text when provided.
data.results[].pricestring | nullPrice text when provided.
data.results[].ratingnumber | nullRating when provided.

Pagination

  1. Check data.pagination.hasNext; stop when it is false.
  2. Use data.pagination.nextStart as start. Keep the other search parameters unchanged.
  3. Send the next request. Each page is a separate search request.
FieldTypeDescription
data.pagination.nextUrlstring | nullSearch-engine URL for the next page, when available; use nextStart with this API.
data.pagination.requestedPageintegerPage requested; may differ from the returned page if the engine does not provide it.
data.pagination.pageintegerCurrent page number.
data.pagination.startintegerCurrent result offset.
data.pagination.hasNextbooleanWhether another page is available.
data.pagination.nextStartinteger | nullOffset for the next request, or null when unavailable.

Errors

JSON
{
  "success": false,
  "requestId": "req_example",
  "error": {
    "code": "INVALID_PARAM",
    "message": "Unknown parameter \"page\"",
    "retryable": false
  }
}
FieldTypeDescription
error.codestringMachine-readable error code.
error.messagestringReason the request failed.
error.retryablebooleanWhether retrying is recommended.
error.retryAfterMsnumber, optionalMinimum wait before retrying, in milliseconds.
HTTP statusMeaningWhat to do
400Invalid request or unsupported search type.Check the query and engine/type combination.
401Missing, invalid or revoked API key.Check the authentication header and API key.
402Insufficient credits.Check your credit balance.
403Permission or plan restriction.Check account access and plan limits.
422Invalid parameter.Correct the parameter identified by error.message.
429Request rate or queue limit.Follow the retry rules below.
5xxServer or search service failure.Keep the requestId; retry only if allowed.

Retry rules

  • Retry only when error.retryable is true.
  • If error.retryAfterMs is 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

Is this Microsoft’s official Bing Search API?

No. This is Serqo’s third-party API for retrieving Bing search results. Microsoft retired its Bing Search APIs on August 11, 2025; see the Microsoft notice for the product status.

How are Bing Search requests 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.