Copied to clipboard!

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

Search Query

q

Required

Parameter defines the the search query, including all Baidu search operators. (e.g., inurl:, site:, intitle:, etc.).

Localization

ct

Optional

Parameter defines which language to restrict results. Use 0 for all languages, 1 for simplified Chinese, or 2 for traditional Chinese.

Pagination

pn

Optional

Parameter defines the result offset. It skips the given number of results. It's used for pagination. (e.g., 0 (default) is the first page of results, 10 is the 2nd page of results, 20 is the 3rd page of results, etc.).

rn

Optional

Parameter defines the maximum number of results to return, limited to 100. (e.g., 10 (default) returns 10 results, 40 returns 40 results, and 100 returns 100 results).

Advanced Filters

lm

Optional

Parameter defines the time period for results. (e.g., 7 only returns results from the past 7 days.).

q5

Optional

Similar to using inurl: or intitle:. (e.g., 1 to search by page title, 2 to search by web address.).

q6

Optional

Similar to using site:. (e.g., q6=serpapi.com to search for results only from the domain serpapi.com).

Advanced Baidu Parameters

bs

Optional

Defines the previous search query.

oq

Optional

Defines the original search query when navigated from a related search.

f

Optional

Defines the originating search type. (e.g., 8 is a normal search, 3 is from the suggestion list, and 1 is a related search.

Serpapi Parameters

engine

Required

Set parameter to Baidu to use the Baidu API engine.

no_cache

Optional

Parameter will force SerpApi to fetch the Google 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.

api_key

Optional

Parameter defines the SerpApi private key to use.

output

Optional

Parameter defines the final output you want. It can be set to json (default) to get a structured JSON of the results, or html to get the raw html retrieved.

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: Queued -> 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.

Organic Results

API Examples

Bing search Results for simple q="Coffee" query

Example with optional parameters

GET https://serpapi.com/search?engine=bing&q=Fresh+Bagels&safeSearch=strict&first=20&count=30 Playground
  {
    "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": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAYAAABWdVznAAAATklEQVR4AWP4//8/HJeVlQkA8QIg/g/CULYAshoUDVAFB4BYAYSh7AX4NPwHKUTiK4DE8GoA0ciYYg0wwQsgCQL4ArKG/8Tg4aCBrFACANnEb3hNDHmBAAAAAElFTkSuQmCC",
        "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."
      },
      ...
    ]
  }