Bright Data Docs home pagelight logodark logo
  • My requests
  • New request
  • Sign up
  • Sign up
SERP API
SERP API FAQs
Welcome
Proxy Infrastructure
Web Access APIs
Data Feeds
API Reference
General
Integrations
  • Introduction
  • Postman collection
  • Web Unlocker API
  • SERP API
    • Introduction
    • Quick Start
    • Configuration
    • Send Your First Request
    • Query Parameters
    • Parsed JSON Results
    • Asynchronous Requests
    • FAQs
  • Browser API
  • Crawl API
  • Easy Scraper
  • Browser Extension
  • Bright Shield
  • FAQs
SERP API

SERP API FAQs

Discover how to effectively use Bright Data’s SERP API with detailed FAQs on setup, troubleshooting, and advanced search techniques, including Google Image and hotel data scraping.

The Bright Data SERP API solution allows you to focus on what matters most, the data. It provides you with a 3-in-1 proxy unlocking solution that autonomously takes care of the proxy management (which proxy to use and when), unlocking logic (captcha solving, fingerprinting, retries, best headers, etc), and scraping functionality. 

In your code its as easy as swapping out the 1 line of your regular proxy network request with this 1 line SERP API request

You only pay for successful requests.

Because pricing is done according to number of pages (price per 1k requests), the bandwidth of your request doesn’t matter.

Use real user devices with laser-focused geotargeting (including city-level) to collect accurate Search Engine Result Pages (SERPs) from major search engines as a real user.

Bright Data can support your growing traffic needs and peak periods with high success rates and exceptional response time (under 5 seconds), regardless of your request volume.

Save money on data extraction engineers and IT professionals, without worrying about server maintenance.

Each request is sent from a different IP ensuring no IP is flagged or banned.

Get parsed or unparsed responses in JSON or HTML format for easy integration with any system.

Bright Data supports a wide variety of tailored parameters to answer your search requirements including different search types, different devices, results per page, etc.

Access 72 million+ real user IPs in all geolocations.

With Bright Data’s SERP API, it’s easy to collect Google Search by Image data.

Google reverse image search (officially “Google Search by Image”), is a service provided by Google that allows users to search for images using an image as the starting point, rather than a written or spoken search query.

The JSON response includes the image in base64 encoding.

curl -v --compressed --proxy brd.superproxy.io:33335 --proxy-user brd-customer-<customer_id>-zone-<zone_name>:<zone_password> "https://www.google.com/searchbyimage?image_url={TARGET_IMAGE_URL}"

See the rest of our Google Image SERP features.

Bright Data’s SERP API makes it easy to collect hotel data, like prices, availability, reviews, and more.

There are two ways to collect hotel data:

Provides limited info per specific hotel on pricing and dates

When you search for a specific hotel using Google Search, its details and reviews appear in the knowledge graph/widget that you can see on the right side below:

You can set arrival and departure dates, the number of guests, and compare pricing..

With SERP API, you can set these fields to collect different price combinations using dedicated parameters. See the full set of hotel parameters and features within our API documentation.

Provides limited info per specific hotel on pricing and dates

When you search for a specific hotel using Google Search, its details and reviews appear in the knowledge graph/widget that you can see on the right side below:

You can set arrival and departure dates, the number of guests, and compare pricing..

With SERP API, you can set these fields to collect different price combinations using dedicated parameters. See the full set of hotel parameters and features within our API documentation.

Provides full details on hotels, pricing, and dates

SERP API also lets you target the hotel page in Google Travel (Google.*/travel/hotels/…), where you can find more prices and search by additional parameters (including arrival and departure dates, the number of adults and children, the children’s ages, and whether or not it has free cancellation) to collect more price combinations.

Only //Google.*/travel/hotels/… URLs are supported.

Go to the control panel API Guide for an explanation of how to target this page and the dedicated parameters you can use or see our API documentation.

When targeting HTTPS, URL data is encrypted. Therefore, for SERP API to decrypt the data and return the result, you will need to download and install the Bright Data Certificate.

Here are sample code on how to send HTTPS requests:

curl "https://www.google.com/search?q=pizza&lum_json=1" -v --insecure --compressed --proxy brd.superproxy.io:33335 --proxy-user brd-customer-<customer_id>-zone-<zone_name>:<zone_password>

Use the cacert flag followed by the certificate file path:

Shell
curl -v --compressed "https://www.google.com/search?q=pizza&lum_json=1" --cacert “{cert file path}“ --proxy brd.superproxy.io:33335 --proxy-user brd-customer-<customer_id>-zone-<zone_name>:<zone_password>

Use the cacert flag followed by the certificate file path:

Shell
curl -v --compressed "https://www.google.com/search?q=pizza&lum_json=1" --cacert “{cert file path}“ --proxy brd.superproxy.io:33335 --proxy-user brd-customer-<customer_id>-zone-<zone_name>:<zone_password>

Please import the certificate to the Java Keystore. Here’s an example using Java keytool to import the certificate:

%JAVA_HOME% Keystore (mostly the cacerts file in ..\lib\security\).

Follow the instructions in the following article on how to download and Install the Bright Data certificate to your local machine’s Trusted Root Certification Authorities.

Shell
T_ID&zone={ASYNC_ZONE}&output={output_fomat_html/json}&response_id={response_id} -H "Authorization: Bearer {API_KEY}" -o {Your_result_ouput_file}

Please refer to this article: Parsing Search Results

SERP API supports sending 2 parallel query requests with one API request using the multi parameter.

These parallel requests use the same peer IP and session and can be used for collecting additional data, comparison tests, etc. - e.g., making a pair of requests with different parameters/values. They use the same IP and session.

Conditions:

  • Supported only for a zone with asynchronous requests enabled
  • Supported only for Google Search
  • Limited to 2 requests
  • Billed as 2 requests

Use Case:

multi:[
  {
    "keyword": "pizza",
    "num": 20
  },
  {
    "keyword": "pizza",
    "num": 100
  }
]

Sample Code:

curl -v --compressed "https://api.brightdata.com/serp/req" -H "Content-Type: application/json" -H "Authorization: Bearer $API_KEY" -d "{\"zone\":\"$ZONE\",\"country\":\"us\",\"multi\":[{\"keyword\":\"pizza\",\"num\":20},{\"keyword\":\"pizza\",\"num\":100}]}"

Absolutely!

Bright Data has developed a backup feature for the ‘num’ parameter which will kick in, in the event that Google stops supporting the ‘num’ parameter in the future.

Our new feature will seamlessly compensate for any ‘num’ parameter limitations found in the initial SERP response data and send 9 additional requests (10 results each), combine them together, and return the full 100 results to you as a consolidated and comprehensive response. This new response will have the identical appearance and functionality of a response with the ‘ num=100’ parameter working flawlessly.

Nope! Despite the additional requests involved in this new feature and providing the combined responses, there will be no change in pricing and this request will count for you as a single regular request for billing purposes. We understand the importance of maintaining costs and will absorb any additional costs here without passing them on to our customers.

If you having issues with the ‘num’ parameter please reach out to your Bright Data account manager, and we will activate the feature for you.

Mapping a company’s ranking for various keywords in different locations

Track top results for company brands and trademarks

Search for products on online shopping websites and compare prices between different vendors

Collect information about companies, contacts, locations, and more

Search for images or other copyright-protected content

See which ads are showing for keywords in different countries, including double-click & Google ad services

In the following article, we will analyze the different options for date-specific search queries on Bing and how to use them effectively

​
Types of Date Filter Queries

No date filter applied

  • URL: https://www.bing.com/search?q=YOUR\\\_QUERY

No date filter applied

  • URL: https://www.bing.com/search?q=YOUR\\\_QUERY

Add filters=ex1%3a"ez1" to the URL

  • URL: https://www.bing.com/search?q=YOUR\\\_QUERY\\&filters=ex1%3a”ez1”

Add filters=ex1%3a"ez2" to the URL

  • URL: https://www.bing.com/search?q=YOUR\\\_QUERY\\&filters=ex1%3a”ez2”

Add filters=ex1%3a"ez3" to the URL

  • URL: https://www.bing.com/search?q=YOUR\\\_QUERY\\&filters=ex1%3a”ez3”

Specify the exact date range by adding filters=ex1:"ez5_StartDateSequence_EndDateSequence” to the URL

  • URL: https://www.bing.com/search?q=YOUR\\\_QUERY\\&filters=ex1:“ez5\\\_StartDateSequence\\\_EndDateSequence”

StartDateSequence and EndDateSequence can be calculated using the logic below.


​
Determining the Sequence String for “Exact Match” Query

To perform an Exact match date search, you need to calculate the sequence string for your desired date range. Follow these steps to determine the sequence string.

1

Use known sequence as a “Starting Point”

Use January 1, 2024 as the starting point with known sequence: 19723

2

Calculate StartDateSequence

  • Count the days from January 1 to your desired starting date.

  • Add the number of days counted to the sequence number of January 1 to get the StartDateSequence.

    Counting starts from “0”. e.g. 0, 1, 2, 3 …

​
Example:

To calculate the sequence number for February 4, 2024:

  • Total days from January 1 to February 4: 35 days
  • 35 - 1 (counting starts at “0”) = 34
  • February 4, 2024: 19723 (Jan1) + 34 = 19757 (StartDateSequence)
3

Calculate EndDateSequence

Add the number of days in your date range to the StartDateSequence to get the EndDateSequence.

​
Example:

To calculate the sequence number for February 20, 2024:

  • February 4, 2024: 19757
  • Days from February 4 to February 20: 17 days
  • 17 - 1 (counting starts at “0”) = 16
  • February 20, 2024: 19757 + 16 = 19773 (EndDateSequence)
4

Form the Sequence String

  • Use the format ez5_StartDateSequence_EndDateSequence
  • Replace StartDateSequence with the sequence number calculated above for the starting date.
  • Replace EndDateSequence with the sequence number calculated above for the ending date.

​
Example: For February 4, 2024, to February 20, 2024:

  • Calculated StartDateSequence: 19757
  • Calculated EndDateSequence: 19773
  • Sequence string: ez5_19757_19773
  • URL for query pizza:
    https://www.bing.com/search?q=pizza\\&filters=ex1:“ez5\\\_19757\\\_19773”

With the above, you can construct URLs to query Bing for any specific date range.

SERP API supports a select number of generic domains/endpoints related to search engines, some specific subdomains or endpoints, may not be supported - example: https://trends.google.com/trends Is not supported while https://trends.google.com/trends/explore Is supported.

To see a list of working examples of domains and paths that are supported, we highly recommend that you check the SERP Playground and the SERP Documentation.

If you’re monitoring ads in Google search results and want to maximize visibility, consider using our Enhanced Ads feature for Google.com SERP API requests.

Default SERP Behavior:

  • Retrieves both organic search results and ads across a broad geographical scope. With Enhanced Ads Enabled:
  • Expands the range of search results and ads, simulating an incognito browsing experience without cookies.

To activate this feature, navigate to your SERP API zone in the control panel and enable it from the configuration tab.

Learn More

Was this page helpful?

Asynchronous RequestsIntroduction
linkedinyoutubegithub
Powered by Mintlify