OpenSERP Cloud Updated Quickstart →

Bing Search API

Query Bing and get structured web results as JSON. Bing is the most useful alternative to Google: it covers similar global results, tends to challenge automa...

Query Bing and get structured web results as JSON. Bing is the most useful alternative to Google: it covers similar global results, tends to challenge automated requests less often, and has strong image and news coverage. This page shows a Bing search in the SDKs and with curl, plus Bing image search.

Examples run against OpenSERP Cloud at https://api.openserp.org. The same request works on a self-hosted open-source OpenSERP server - point the SDK at your own baseUrl instead of passing apiKey.

export OPENSERP_API_KEY="osk_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"

JavaScript / TypeScript

npm install @openserp/sdk
import { OpenSERP } from "@openserp/sdk";

const client = new OpenSERP({ apiKey: process.env.OPENSERP_API_KEY });

const { results } = await client.search({
  engine: "bing",
  text: "best mechanical keyboards",
  limit: 10,
  region: "US",
});

for (const r of results) {
  console.log(r.rank, r.title, r.url);
}

Python

pip install openserp
import os
from openserp import OpenSERP

with OpenSERP(api_key=os.environ["OPENSERP_API_KEY"]) as client:
    response = client.search(engine="bing", text="best mechanical keyboards", limit=10, region="US")
    for r in response.results:
        print(r.rank, r.title, r.url)

curl

curl "https://api.openserp.org/v1/bing/search?text=best+mechanical+keyboards&limit=10&region=US" \
  -H "Authorization: Bearer $OPENSERP_API_KEY"

Try it without code first in the Search Playground, then copy the generated request.

Bing has excellent image coverage, so it is a good default for the image endpoint. Image results add image_url, thumbnail_url, source_url, and dimensions:

const images = await client.image({ engine: "bing", text: "aurora borealis", limit: 15 });

for (const img of images.results) {
  console.log(img.title, img.image_url, `${img.width}x${img.height}`);
}
curl "https://api.openserp.org/v1/bing/image?text=aurora+borealis&limit=15" \
  -H "Authorization: Bearer $OPENSERP_API_KEY"

When to reach for Bing

  • You want a second opinion next to Google without a big ranking gap.
  • You are pulling images at volume - Bing’s image endpoint is reliable and rich.
  • A workload keeps hitting challenges on Google and you want a lower-friction engine.

Bing also powers Ecosia, so results overlap - see the Ecosia Search API example if you want the same coverage with a European lean.

Next steps