SERP API

Overview

SERP API is a powerful and efficient solution for retrieving search engine results from Google, Bing, Yandex, and DuckDuckGo. Whether you are conducting SEO research, monitoring brand presence, or analyzing market trends, this API delivers real-time, structured SERP data in an easy-to-use format. With support for multiple search engines, it enables comprehensive analysis across different platforms. Enjoy fast responses, high accuracy, and seamless integration with your applications.

Unlike traditional APIs that require users to build complex query URLs, this API allows users to directly pass structured search engine URLs, simplifying the scraping process. It is designed for SEO research, competitive analysis, and data gathering with seamless integration.

Pricing Plans

Choose the right plan for your search engine data needs with flexible pricing options

Basic

$4.99 /month

1,000 Requests / Month

+ $0.005 per extra request

  • All search engines
  • Structured JSON responses
  • Organic search results
RECOMMENDED

Pro

$39.99 /month

10,000 Requests / Month

+ $0.004 per extra request

  • All search engines
  • 10× more requests
  • Ads & related searches

Ultra

$149.99 /month

50,000 Requests / Month

+ $0.003 per extra request

  • All search engines
  • Advanced result fields
  • 50,000 monthly requests

Mega

$499.99 /month

200,000 Requests / Month

+ $0.0025 per extra request

  • All search engines
  • High volume support
  • 200,000 monthly requests

API Documentation

The SERP API allows you to extract structured data from search engine results pages. This documentation provides comprehensive details on how to integrate and use the API efficiently in your applications.

Try It Now

Click the button below to run and test this API with Postman:

Base URL

https://advanced-serp-api.p.rapidapi.com/v1/search

All API requests should be made to this endpoint using HTTPS.

Supported Search Engines

  • Google
  • Bing
  • Yandex
  • DuckDuckGo

Parameters

Parameter Type Description
url string The search engine URL to scrape
mobile boolean Whether to use mobile user agent

Authentication

To use the API, you must authenticate using your RapidAPI key. Include it in your headers as follows:

{
  "X-RapidAPI-Key": "YOUR_RAPIDAPI_KEY"
}

Google Search Parameters

Search Types

Type Parameter Example
Images tbm=isch q=hamburger&tbm=isch
Shopping tbm=shop q=hamburger&tbm=shop
News tbm=nws q=hamburger&tbm=nws
Videos tbm=vid q=hamburger&tbm=vid

Example Request

GET /v1/search?q=hamburger&engine=google HTTP/1.1
Host: serp-api.p.rapidapi.com
X-RapidAPI-Key: YOUR_RAPIDAPI_KEY
X-RapidAPI-Host: serp-api.p.rapidapi.com

Example Response

{
  "organic": [
    {
      "link": "https://en.wikipedia.org/wiki/Hamburger",
      "display_link": "https://en.wikipedia.org › wiki › Hamburger",
      "title": "Hamburger",
      "description": "A hamburger, or simply a burger, is a dish consisting of fillings—usually a patty of ground meat, typically beef—placed inside a sliced bun or bread roll."
    }
  ],
  "related_searches": [
    "hamburger recipes",
    "hamburger near me",
    "best hamburger"
  ],
  "knowledge_graph": {
    "title": "Hamburger",
    "description": "A hamburger is a food consisting of fillings—usually a patty of ground meat, typically beef—placed inside a sliced bun or bread roll."
  }
}

Response Object Structure

The API returns structured data from search results. The response includes the following main sections:

Property Type Description
organic array Regular search results with title, link, and description
related_searches array Related search terms suggested by the search engine
knowledge_graph object Rich data about entities when available
ads array Sponsored results (when present)
pagination object Information about result pages and navigation

The specific fields returned may vary based on the search engine and query type.

Error Handling

The API uses standard HTTP status codes to indicate success or failure of requests:

  • 400 - Bad Request: Invalid request parameters. Check that your URL is properly formatted.
  • 401 - Unauthorized: Invalid API key. Verify your RapidAPI credentials.
  • 403 - Forbidden: Your plan doesn't allow access to this resource.
  • 429 - Too Many Requests: You've exceeded your rate limit or quota.
  • 500 - Internal Server Error: Something went wrong on our end. Try again later.
  • 504 - Gateway Timeout: The request took too long to complete. Try a simpler query.
{
  "error": {
    "code": 429,
    "message": "You have exceeded your plan's rate limit. Please upgrade your plan or try again later.",
    "details": {
      "retry_after": 3600
    }
  }
}

Best Practices

  • Implement caching: Search results don't change frequently. Cache responses to reduce API calls.
  • Be specific with search parameters: More specific queries yield more targeted results.
  • Handle rate limiting gracefully: Implement backoff logic for 429 responses.
  • Process results incrementally: For applications needing regular updates, fetch and process in batches.
  • Filter irrelevant data: Process the API response to extract only the data you need for your application.

Integration Examples

JavaScript (Node.js)

const axios = require('axios');

const options = {
  method: 'GET',
  url: 'https://serp-api.p.rapidapi.com/v1/search',
  params: {
    url: 'https://www.google.com/search?q=hamburger'
  },
  headers: {
    'X-RapidAPI-Key': 'YOUR_RAPIDAPI_KEY',
    'X-RapidAPI-Host': 'serp-api.p.rapidapi.com'
  }
};

try {
  const response = await axios.request(options);
  console.log(response.data);
} catch (error) {
  console.error(error);
}
Python
import requests

url = "https://serp-api.p.rapidapi.com/v1/search"

querystring = {"url":"https://www.google.com/search?q=hamburger"}

headers = {
    "X-RapidAPI-Key": "YOUR_RAPIDAPI_KEY",
    "X-RapidAPI-Host": "serp-api.p.rapidapi.com"
}

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

print(response.json())

API Versioning

The current version of the SERP API is v1. We strive for backward compatibility within the same major version.

Version Status Notes
v1 Current Stable release with full functionality

We announce major updates and deprecations at least 6 months in advance through our documentation and via email to active users.

Frequently Asked Questions

Which search engines does the API support?

The SERP API supports four major search engines: Google, Bing, Yandex, and DuckDuckGo. This multi-engine support allows you to gather comprehensive data across different platforms, understanding how your content or keywords perform across the search engine landscape. Each engine has its own URL structure, but the API handles them all with the same consistent response format.

How do I search for specific content types like images or news?

To search for specific content types, you'll need to pass the appropriate URL to the search engine. For Google, you can use parameters like 'tbm=isch' for images, 'tbm=nws' for news, 'tbm=vid' for videos, and 'tbm=shop' for shopping results. Simply construct the URL with these parameters and pass it to the API. For example, to search for hamburger images on Google, use: 'https://www.google.com/search?q=hamburger&tbm=isch'.

Does the API support mobile search results?

Yes, the API supports mobile search results. You can use the 'mobile=true' parameter to retrieve search results as they would appear on mobile devices. This is particularly useful for SEO analysis, as search engines often display different results on mobile versus desktop. Mobile results may include different rankings, different featured snippets, and mobile-specific elements like AMP pages.

What type of data is returned in the API response?

The API returns structured JSON data with various elements from the search results page. For organic results, this includes the title, link, and display link for each search result. Depending on the search engine and query type, the response may also include additional elements like featured snippets, knowledge panels, related questions, advertisements, and more. All data is organized in a consistent format for easy parsing and analysis.

Are there any rate limits for the API?

Yes, the API has rate limits based on your subscription plan. The Basic plan includes 1,000 requests per month, while higher tiers offer more requests. If you exceed your plan's monthly limit, additional requests are charged based on overage rates (starting at $0.005 per request for the Basic plan). To avoid unexpected charges, monitor your usage and consider upgrading to a higher tier if you consistently approach your limit.

Integrations Coming Soon

Connect our powerful APIs with your favorite platforms for seamless workflow automation

Zapier

Connect with 3,000+ apps

Make.com

Create complex automation workflows

Power Automate

Microsoft's enterprise automation

n8n

Open-source workflow automation

Want to see us integrate with your favorite platform? Let us know!