Skip to content

Getting Started

Welcome to SERP API! This guide will help you get up and running quickly with our Search Engine Results Page (SERP) API.

🎯 What is SERP API?

SERP API is a powerful tool that allows you to retrieve real-time search results data from major search engines. We support multiple search engines and search types, providing you with structured JSON formatted data.

Supported search engines include:

  • Google Search (Web, Images, News, Maps, etc.)
  • Bing Search

🚀 Quick Start

1. Obtain an API Key

To begin using SERP API, you first need to obtain an API key:

  1. Register for an account
  2. Log in to your account dashboard
  3. Generate a new API key in the API Keys section
  4. Save your API key for future use

2. Make Your First Request

Construct your API request using the following basic parameters:

Parameter Type Required Description Default
api_key string Yes Your API key for authentication
engine string Yes Search engine type
q string Yes Search query

Example request:

1
2
3
4
5
6
7
8
curl --request POST \
  --url https://api.searchinfra.com/api/v1/open/search \
  --header 'Content-Type: application/json' \
  --data '{
    "q": "coffee",
    "api_key": "your_api_key"
}
'

3. Process Response Data

The API will return structured JSON data that you can easily parse and use.

🛠️ API Usage

Code Examples

import requests

url = "https://api.searchinfra.com/api/v1/open/search"
params = {
    "api_key": "YOUR_API_KEY",
    "engine": "google_web",
    "q": "best coffee shops"
}

response = requests.get(url, params=params)
data = response.json()
print(data)
const url = "https://api.searchinfra.com/api/v1/open/search";
const params = new URLSearchParams({
    api_key: "YOUR_API_KEY",
    engine: "google_web",
    q: "best coffee shops"
});

fetch(`${url}?${params}`)
    .then(response => response.json())
    .then(data => console.log(data));

📊 Processing Response Data

The API returns structured JSON data that's easy to parse and use. A typical response includes:

{
  "reqId": "2016321857157869568",
  "code": 200,
  "msg": "OK",
  "data": {
    "search_metadata": {
    },
    "search_parameters": {
    },
    "search_information": {
      "query_displayed": "coffee"
    },
    "organic_results": [
    ]
    // ... more results
  }
}

🧭 What to Learn Next?

Based on your needs, dive deeper into the following documentation:

📞 Need Help?

If you encounter any issues during use, please contact our support team or refer to the complete API documentation.