Scrapingdog
HomePricingSupportLogin
  • Documentation
  • Web Scraping API
    • Request Customization
      • Javascript Rendering
        • Wait when rendering Javascript
      • Custom Headers
      • Premium Residential Proxies
      • Geotargeting
      • Sessions
  • POST Request
  • Google Search Scraper API
    • Google Country Parameter: Supported Google Countries
    • Supported Google Countries via cr parameter
    • Google Domains Page
    • Google Language Page
    • Google LR Language Page
  • Google Maps API
    • Google Maps Posts API
    • Google Maps Photos API
    • Google Maps Reviews API
    • Google Maps Places API
  • Google Trends API
    • Google Trends Autocomplete API
    • Google Trends Trending Now API
  • Google Images API
  • Google News API
    • Google News API 2.0
  • Google Shopping API
  • Google Product API
  • Google Videos API
  • Google Shorts API
  • Google Autocomplete API
  • Google Scholar API
    • Google Scholar Profiles API
    • Google Scholar Author API
      • Google Scholar Author Citation API
    • Google Scholar Cite API
  • Google Finance API
  • Google Lens API
  • Google Jobs API
  • Google Local API
  • Google Patents API
    • Google Patent Details API
  • Bing Search Scraper API
  • Amazon Scraper API
    • Amazon Product Scraper
    • Amazon Search Scraper
    • Amazon Reviews API
    • Amazon Autocomplete Scraper
  • Instagram Scraper API
  • Linkedin Scraper API
    • Person Profile Scraper
    • Company Profile Scraper
  • Linkedin Jobs Scraper
    • Scrape Linkedin Jobs
    • Scrape LinkedIn Job Overview
  • Yelp Scraper API
  • Twitter Scraping API
    • X Scraping API 2.0
  • Indeed Scraper API
  • Zillow Scraper API
  • Youtube Scraper API
    • Youtube Search API
    • YouTube Transcripts API
  • Walmart Scraper API
    • Walmart Product Scraper
    • Walmart Search Scraper
    • Walmart Reviews Scraper
  • Screenshot API
  • Webhook Integration
  • Datacenter Proxies
  • Account API
Powered by GitBook
On this page
  • API Example
  • API Response

Bing Search Scraper API

Using Bing Search API you can scrape Bing search results without worrying about proxy rotation and data parsing. Our API is fast and reliable.

Each successful request will cost you 5 API credits.

You have to send a GET request to http://api.scrapingdog.com/bing/search with the below-given parameters.

Parameters

Scrapingdog Parameters

Parameter
Description

api_key

required

Your personal API key. Available on your dashboard Type: String

Search Query

Parameter
Description

query required

The parameter specifies the search query, allowing you to use any terms or operators you would typically use in a standard Bing search (e.g., 'query', NOT, OR, site:, filetype:, near:, ip:, loc:, feed:, etc.). Type: String

Geographic Location

Parameter
Description

lat

Specifies the GPS latitude as the starting point for the search. Type: String

lon

Specifies the GPS longitude as the starting point for the search. Type: String

mkt

Specifies the market from which the results originate (e.g., en-US). Typically, this corresponds to the country where the request is made, but it may differ if the user is in a region where Bing does not provide results. The market should be formatted as <language code>-<country code> (e.g., en-US) and is case-insensitive.

Note: If known, it is recommended to always specify the market, as this helps Bing route the request efficiently and return the most relevant results. If an unsupported market is provided, Bing will map it to the closest available market, though this mapping may change over time.

This parameter is mutually exclusive with the cc query parameter—only one should be used. Type: String

Localization

Parameter
Description

cc

This parameter specifies the country from which the search is conducted. It follows the two-character ISO 3166-1 format (e.g., "us" for the United States, "de" for Germany, "gb" for the United Kingdom, etc.). Type: String

Pagination

Parameter
Description

first

This parameter adjusts the starting position of the organic search results. By default, it is set to 1. For example, setting first=10 will shift the 10th organic result to the first position. Type: String

count

This parameter determines the number of results displayed per page, ranging from a minimum of 1 to a maximum of 50. However, the actual number of results returned may vary. Type: String

Advanced Filters

Parameter
Description

safeSearch

This parameter controls the filtering level for adult content:

  • Off: Includes webpages with adult text, images, and videos.

  • Moderate: Allows adult text but excludes adult images and videos.

  • Strict: Blocks webpages containing adult text, images, and videos.

Type: String

filters

This parameter enables advanced filtering options, such as date range filtering (e.g., ez5_18169_18230) or specific display filters like:

ufn:"Wunderman+Thompson" sid:"5bede9a2-1bda-9887-e6eb-30b1b8b6b513" catguid:"5bede9a2-1bda-9887-e6eb-30b1b8b6b513_cfb02057" segment:"generic.carousel" entitysegment:"Organization"

You can construct exact filter values by performing a Bing search and copying the filters query parameter. Type: String

API Example

curl "https://api.scrapingdog.com/bing/search/?api_key=5eaa61a6e562fc52fe763tr516e4653&query=what+is+api&cc=us"
import requests

api_key = "5eaa61a6e562fc52fe763tr516e4653"
url = "https://api.scrapingdog.com/bing/search/"

params = {
    "api_key": api_key,
    "query": "what+is+api",
    "cc" : "us"
}

response = requests.get(url, params=params)

if response.status_code == 200:
    data = response.json()
    print(data)
else:
    print(f"Request failed with status code: {response.status_code}")
const axios = require('axios');

const api_key = '5eaa61a6e562fc52fe763tr516e4653';
const url = 'https://api.scrapingdog.com/bing/search/';

const params = {
  api_key: api_key,
  query: 'what+is+api',
  cc: 'us',
};

axios
  .get(url, { params: params })
  .then(function (response) {
    if (response.status === 200) {
      const data = response.data;
      console.log(data)
    } else {
      console.log('Request failed with status code: ' + response.status);
    }
  })
  .catch(function (error) {
    console.error('Error making the request: ' + error.message);
  });
<?php

// Set the API key and request parameters
$api_key = '5eaa61a6e562fc52fe763tr516e4653';
$query = 'what+is+api';
$cc = 'us';

// Set the API endpoint
$url = 'https://api.scrapingdog.com/bing/search/?api_key=' . $api_key . '&query=' . $query . '&cc=' . $cc;

// Initialize cURL session
$ch = curl_init($url);

// Set cURL options
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

// Execute the cURL request
$response = curl_exec($ch);

// Check if the request was successful
if ($response === false) {
    echo 'cURL error: ' . curl_error($ch);
} else {
    // Process the response data as needed
    echo $response;
}

// Close the cURL session
curl_close($ch);
require 'net/http'
require 'uri'

# Set the API key and request parameters
api_key = '5eaa61a6e562fc52fe763tr516e4653'
query = 'what+is+api'
cc = 'us'

# Construct the API endpoint URL
url = URI.parse("https://api.scrapingdog.com/bing/search/?api_key=#{api_key}&query=#{query}&cc=#{cc}")

# Create an HTTP GET request
request = Net::HTTP::Get.new(url)

# Create an HTTP client
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true # Enable SSL (https)

# Send the request and get the response
response = http.request(request)

# Check if the request was successful
if response.is_a?(Net::HTTPSuccess)
  puts response.body # Process the response data as needed
else
  puts "HTTP request failed with code: #{response.code}, message: #{response.message}"
end
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
import java.io.IOException;

public class Main {
    public static void main(String[] args) {
        try {
            // Set the API key and request parameters
            String apiKey = "5eaa61a6e562fc52fe763tr516e4653";
            String query = "what+is+api";
            String cc = "us";

            // Construct the API endpoint URL
            String apiUrl = "https://api.scrapingdog.com/bing/search/?api_key=" + apiKey
                    + "&query=" + query
                    + "&cc=" + cc

            // Create a URL object from the API URL string
            URL url = new URL(apiUrl);

            // Open a connection to the URL
            HttpURLConnection connection = (HttpURLConnection) url.openConnection();

            // Set the request method to GET
            connection.setRequestMethod("GET");

            // Get the response code
            int responseCode = connection.getResponseCode();

            if (responseCode == 200) {
                // Read the response from the connection
                BufferedReader reader = new BufferedReader(new InputStreamReader(connection.getInputStream()));
                String inputLine;
                StringBuilder response = new StringBuilder();

                while ((inputLine = reader.readLine()) != null) {
                    response.append(inputLine);
                }
                reader.close();

                // Process the response data as needed
                System.out.println(response.toString());
            } else {
                System.out.println("HTTP request failed with response code: " + responseCode);
            }

            // Close the connection
            connection.disconnect();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}

API Response

{
"bing_data": [
  {
    "title": "What is an API? A Beginner's Guide to APIs - Postman",
    "displayed_link": "https://www.postman.com › what-is-an-api",
    "link": "https://www.postman.com/what-is-an-api/",
    "snippet": "Learn what an API is, how it works, and why it is important for modern applications. Explore the history, types, benefits, and examples of APIs with Postman, an API platform.",
    "rank": 1,
    "images": []
  },
  {
    "title": "API - Wikipedia",
    "displayed_link": "https://en.wikipedia.org › wiki › API",
    "link": "https://en.wikipedia.org/wiki/API",
    "snippet": "An API is a connection or interface between computers or software programs that allows them to communicate and interact. Learn about the origin, purpose, …",
    "rank": 2,
    "extensions": [
      {
        "title": "",
        "snippet": ""
      }
    ],
    "images": []
  },
  {
    "title": "What is an API (application programming interface)? - IBM",
    "displayed_link": "https://www.ibm.com › think › topics › api",
    "link": "https://www.ibm.com/think/topics/api",
    "snippet": "Learn what an API is, how it works, and why it is important for software development and integration. Explore different types of APIs, such as web, open, partner, internal and composite …",
    "rank": 3,
    "images": []
  },
  {
    "title": "What is an API and How Does it Work? APIs for …",
    "displayed_link": "https://www.freecodecamp.org › news …",
    "link": "https://www.freecodecamp.org/news/how-apis-work/",
    "snippet": "Dec 5, 2022 · Learn what API stands for, how it works, and what types of APIs exist. This guide explains the basics of HTTP protocol, methods, status codes, and examples of web APIs.",
    "rank": 4,
    "images": []
  },
  {
    "title": "What Is an API, and How Do Developers Use Them?",
    "displayed_link": "https://www.howtogeek.com › what-is-…",
    "link": "https://www.howtogeek.com/343877/what-is-an-api/",
    "snippet": "Dec 27, 2021 · An API is an Application Programming Interface that lists operations developers can use to access hardware, software, or online resources. APIs make life easier for developers by saving time, reducing code, and …",
    "rank": 5,
    "images": []
  },
  {
    "title": "What is an API? Full Form, Meaning, Definition, Types …",
    "displayed_link": "https://www.guru99.com › what-is-api.html",
    "link": "https://www.guru99.com/what-is-api.html",
    "snippet": "Aug 19, 2024 · API is a collection of software functions and procedures. In simple terms, API means a software code that can be accessed or executed. Application Programming Interface(API) is a software interface that allows two …",
    "rank": 6,
    "images": []
  },
  {
    "title": "What is an API? | API definition - Cloudflare",
    "displayed_link": "https://www.cloudflare.com › learning › se…",
    "link": "https://www.cloudflare.com/learning/security/api/what-is-an-api/",
    "snippet": "An application programming interface (API) is a set of rules that enable one program to transmit data to another program. Learn more about API calls, API security, and API integrations.",
    "rank": 7,
    "images": []
  },
  {
    "title": "What is an API? A Beginner's Guide to Understanding …",
    "displayed_link": "https://cosmoforge.io › insight › marketi…",
    "link": "https://cosmoforge.io/insight/marketing/what-is-an-api-a-beginners-guide-to-understanding-apis-with-real-world-examples/",
    "snippet": "Nov 21, 2024 · Learn what an API is, how it works, and why it matters for modern technology. Explore different types, components, and scenarios of APIs with simple explanations and relatable examples.",
    "rank": 8,
    "images": []
  },
  {
    "title": "What is an API? How APIs work, simply explained",
    "displayed_link": "https://www.contentful.com › api",
    "link": "https://www.contentful.com/api/",
    "snippet": "Jan 15, 2025 · Learn the fundamentals of APIs, how they enable seamless integration between systems, and why they are essential for modern digital experiences. Explore topics like API endpoints, keys, calls, and headless APIs …",
    "rank": 9,
    "images": []
  }
 ]
}

PreviousGoogle Patent Details APINextAmazon Scraper API

Last updated 1 month ago

For a full list of supported markets, refer to .

Market Codes