Introduction to Bing Search Scraper

This document provides information about the API endpoints, supported environments, and available GET parameters for the NetNut's Bing Scraper API. The API allows you to retrieve search engine results pages (SERPs) from Bing.

Authentication

To access the NetNut API, you must provide basic authentication credentials using the username and password provided by NetNut. Include these credentials in the HTTP request headers as follows:

Authorization: Basic base64(username:password)

Where base64(username:password) is the Base64-encoded string of your username and password concatenated with a colon (:) separator.

Environments

Base URL: https://serp-api.netnut.io Endpoint: /search/get-html?

API Parameters & Specifications

The following parameters are supported when retrieving Bing SERPs via the API. To target Bing specifically, you must include the parameter siteType=bing in your request.

Search Query

Name
Status
Description

q

Required

The 'q' parameter defines the query you want to search for.

Pagination

Name
Status
Description

count

Optional

The 'num' parameter defines the maximum number of results to return for the query. For example 10 (default) returns 10 results, 20 returns 20 results etc. We support max results of 50 for each query

first

Optional

The 'start' parameter defines the results offset. It allows skipping the given number of results. It is 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.).

Localization

Name
Status
Description

cc

Optional

The cc' parameter defines the country to use for the Google search. It is a two-letter country code. For example - use us for the United States, uk for United Kingdom, etc.

setLang

Optional

The language setting for the browser interface. It is a two-letter country code. For example - use en for English, fr for French, etc.

Advanced Filters

Name
Status
Description

rawHtml

Optional

The 'rawHtml' parameter defines the final output you want. It can be set to 1 (true) or 0 (false) to get the raw html response. for receiving html only (without parsing) set it to 2 (only)

safeSearch

Optional

Controls the Bing SafeSearch filter. Acceptable values are:

safeSearch=strict safeSearch=moderate safeSearch=off

device

Optional

The 'device' parameter defines the device to use to get the Google search results. The parameter can be set to desktop (default) to use a regular browser, or mobile to use a mobile browser (currently using iPhones).

API Results HTTP Response

The API currently supports JSON responses. Here is an example schema of the Bing SERP API response:

{
    "url": "string",
    "engine": "bing",
    "general": {
        "id": "string",
        "timestamp": "string",
        "bing_url": "string",
        "resultscount": 0
    },
    "input": {
        "q": "string",
        "cc": "string",
        "device": "string",
        "engine": "bing"
    },
    "organic_results": [
        {
            "position": 0,
            "title": "string",
            "snippet": "string",
            "link": "string",
            "displayed_link": "string",
            "tracking_link": "string",
            "thumbnail": "string"
        }
    ],
    "pagination": {
        "current": 0,
        "next": "string",
        "other_pages": {
            "2": "string",
            "3": "string"
        }
    },
    "html": "string"
}

Key Notes:

  • The top-level engine field will always be bing when siteType=bing is specified.

  • organic_results contains an array of result objects, each including position, title, snippet, URL, display link, and optional thumbnails.

  • The pagination object includes current and next page indices and URLs.

  • If rawHtml=1 is set, the full HTML source of the search result page will be included under the html field.

Last updated