Home/API Documentation

API Documentation

Complete reference for all SERP Search API endpoints.

Quick Start

Get up and running in three steps:

2

Generate an API key from your dashboard.

3

Make your first request:

# 1. Set your API key
API_KEY="mk_live_xxxxxxxxxxxxxxxxxxxxxxxx"

# 2. Make your first search
curl -G https://serpsearch.com/api/v1/search \
  -H "Authorization: Bearer $API_KEY" \
  --data-urlencode "query=web scraping best practices"

# 3. The response is JSON with organic_results, knowledge_graph, etc.

Authentication

All requests must include a valid API key as a Bearer token in the Authorization header.

Authorization: Bearer mk_live_xxxxxxxxxxxxxxxxxxxxxxxx

You can generate API keys from your dashboard. Keys are tied to your subscription and track usage against your monthly quota.

Important: Keep your API key secret. Do not expose it in client-side code or public repositories. If you suspect a key has been compromised, revoke it immediately from your dashboard and generate a new one.

MethodURL
GEThttps://serpsearch.com/api/v1/search

Parameters

NameTypeRequiredDefaultDescription
querystringYes--The search query.
pageintegerNo1Results page number.
latstringNo--Latitude for geolocation.
lngstringNo--Longitude for geolocation.

Response

{
  "organic_results": [
    {
      "title": "OpenAI",
      "url": "https://openai.com",
      "website": "openai.com",
      "position": 1,
      "description": "An AI research company...",
      "visible_url": "openai.com",
      "answer": null
    }
  ],
  "knowledge_graph": { ... },
  "definition_result": { ... },
  "people_also_ask": [ ... ],
  "weather_result": null
}

Example

curl -G "https://serpsearch.com/api/v1/search" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  --data-urlencode "query=latest AI models" \
  -d "page=1"

Autocomplete

MethodURL
GEThttps://serpsearch.com/api/v1/autocomplete

Parameters

NameTypeRequiredDefaultDescription
querystringYes--The search query to get suggestions for.

Response

[
  {
    "title": "openai chatgpt",
    "additional_info": {
      "title": "ChatGPT",
      "description": "AI chatbot by OpenAI",
      "image": "https://..."
    }
  },
  {
    "title": "openai api"
  }
]

Example

curl -G "https://serpsearch.com/api/v1/autocomplete" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  --data-urlencode "query=openai"

Translation

MethodURL
GEThttps://serpsearch.com/api/v1/translate

Parameters

NameTypeRequiredDefaultDescription
querystringYes--The text to translate.
langstringNoenTarget language code.

Response

{
  "translation": "Hello world",
  "sentences": [
    {
      "original": "Hola mundo",
      "translation": "Hello world"
    }
  ]
}

Example

curl -G "https://serpsearch.com/api/v1/translate" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  --data-urlencode "query=Hola mundo" \
  -d "lang=en"

News

MethodURL
GEThttps://serpsearch.com/api/v1/news

Parameters

NameTypeRequiredDefaultDescription
querystringYes--The news search query.

Response

[
  {
    "group_name": "Top stories",
    "articles": [
      {
        "title": "OpenAI announces new model",
        "url": "https://example.com/article",
        "created_at": "2024-01-15T10:30:00Z"
      }
    ]
  }
]

Example

curl -G "https://serpsearch.com/api/v1/news" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  --data-urlencode "query=artificial intelligence"

Image Search

MethodURL
GEThttps://serpsearch.com/api/v1/images

Parameters

NameTypeRequiredDefaultDescription
querystringYes--The image search query.
pageintegerNo1Results page number.

Response

[
  {
    "title": "AI Generated Art",
    "url": "https://example.com/image.jpg",
    "source": "example.com",
    "alt": "AI generated artwork",
    "is_licensable": false,
    "preview": "https://example.com/thumb.jpg",
    "full": "https://example.com/full.jpg"
  }
]

Example

curl -G "https://serpsearch.com/api/v1/images" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  --data-urlencode "query=sunset photography" \
  -d "page=1"

Video Search

MethodURL
GEThttps://serpsearch.com/api/v1/videos

Parameters

NameTypeRequiredDefaultDescription
querystringYes--The video search query.
pageintegerNo1Results page number.

Response

[
  {
    "title": "Introduction to Machine Learning",
    "url": "https://youtube.com/watch?v=...",
    "description": "A beginner-friendly guide...",
    "thumbnail": "https://i.ytimg.com/vi/.../default.jpg",
    "duration": "12:34",
    "website": "youtube.com",
    "channel_name": "Tech Channel",
    "upload_date": "2024-01-10"
  }
]

Example

curl -G "https://serpsearch.com/api/v1/videos" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  --data-urlencode "query=machine learning tutorial" \
  -d "page=1"

Maps Search

MethodURL
GEThttps://serpsearch.com/api/v1/maps

Parameters

NameTypeRequiredDefaultDescription
querystringYes--The maps search query (e.g. business name, category).

Response

{
  "results": [
    {
      "name": "Central Park",
      "address": "New York, NY 10024",
      "rating": 4.8,
      "review_count": 120000,
      "price_range": null,
      "place_id": "ChIJ4zGFAZpYwokRGUGph3Mf37k",
      "lat": 40.7829,
      "lng": -73.9654,
      "opening_hours": "Open 24 hours",
      "rating_distribution": { "5": 90000, "4": 20000, "3": 5000, "2": 3000, "1": 2000 }
    }
  ]
}

Example

curl -G "https://serpsearch.com/api/v1/maps" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  --data-urlencode "query=coffee shops in manhattan"

Place Details

MethodURL
GEThttps://serpsearch.com/api/v1/maps/place

Parameters

NameTypeRequiredDefaultDescription
querystringYes--A Google Place ID or place name.

Response

{
  "name": "Central Park",
  "address": "New York, NY 10024",
  "rating": 4.8,
  "review_count": 120000,
  "price_range": null,
  "place_id": "ChIJ4zGFAZpYwokRGUGph3Mf37k",
  "lat": 40.7829,
  "lng": -73.9654,
  "opening_hours": "Open 24 hours",
  "rating_distribution": { "5": 90000, "4": 20000, "3": 5000, "2": 3000, "1": 2000 }
}

Example

curl -G "https://serpsearch.com/api/v1/maps/place" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  --data-urlencode "query=ChIJ4zGFAZpYwokRGUGph3Mf37k"

Distance

MethodURL
GEThttps://serpsearch.com/api/v1/maps/distance

Parameters

NameTypeRequiredDefaultDescription
originstringYes--Starting point (address or place name).
destinationstringYes--Ending point (address or place name).
modestringNodrivingTravel mode: driving, transit, walking, or bicycling.

Response

{
  "distance_text": "5.2 mi",
  "duration_text": "15 mins",
  "distance_meters": 8368
}

Example

curl -G "https://serpsearch.com/api/v1/maps/distance" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  --data-urlencode "origin=Times Square, NYC" \
  --data-urlencode "destination=Central Park, NYC" \
  -d "mode=walking"

Reviews

MethodURL
GEThttps://serpsearch.com/api/v1/reviews

Parameters

NameTypeRequiredDefaultDescription
place_idstringYes--The Google Place ID to fetch reviews for.
sort_bystringNorelevantSort order: relevant, newest, high_rating, or low_rating.
page_idstringNo--Pagination token from a previous response's next_page field.
searchstringNo--Filter reviews by keyword.

Response

{
  "reviews": [
    {
      "review": {
        "id": "abc123",
        "rating": 5,
        "text": "Amazing place, highly recommend!",
        "lang": "en",
        "created_at": "2024-01-10T08:00:00Z"
      },
      "user": {
        "name": "John D.",
        "image_url": "https://..."
      },
      "response": {
        "text": "Thank you for your kind words!",
        "created_at": "2024-01-11T10:00:00Z"
      }
    }
  ],
  "next_page": "eyJwYWdlIjoyf..."
}

Example

curl -G "https://serpsearch.com/api/v1/reviews" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d "place_id=ChIJ4zGFAZpYwokRGUGph3Mf37k" \
  -d "sort_by=newest"

Error Codes

All errors follow the same envelope shape:

{
  "error": {
    "code": "RATE_LIMIT_EXCEEDED",
    "message": "Rate limit exceeded. Please slow down your requests."
  }
}
CodeHTTPDescription
INVALID_API_KEY401The API key is missing, malformed, or does not exist.
EXPIRED_API_KEY401The API key has passed its expiration date.
REVOKED_API_KEY401The API key has been manually revoked.
SUBSCRIPTION_REQUIRED403No active subscription found for this account.
SUBSCRIPTION_INACTIVE403The subscription exists but is not in ACTIVE state.
RATE_LIMIT_EXCEEDED429More than the allowed requests per second were sent. Slow down and retry.
QUOTA_EXCEEDED429Monthly request quota for the current billing period is exhausted.
INVALID_QUERY400The q / query parameter is missing, empty, or the request body is malformed JSON.
UPSTREAM_ERROR502The upstream search provider returned an error. Retry later.
INTERNAL_ERROR500An unexpected server-side error occurred.

Rate Limits & Quotas

Two separate limits apply to every request:

  • Per-second rate limit -- enforced with a sliding window. Exceeding it returns RATE_LIMIT_EXCEEDED (HTTP 429) with a Retry-After: 1 header.
  • Monthly quota -- resets with your billing period. Exceeding it returns QUOTA_EXCEEDED (HTTP 429). Upgrade your plan to increase your limit.
PlanMonthly requestsRequests / secondPrice
Pro10,0005$9.99 / mo
Ultra50,00015$44.99 / mo
Mega300,00050$239.99 / mo
EnterpriseCustomCustomContact us

You can monitor your current usage from the usage dashboard. Need higher limits? View all plans or contact us for Enterprise pricing.

Response Headers

Every response (including errors) includes the following headers to help you track your usage and rate limits:

HeaderDescription
X-RateLimit-LimitMaximum requests per second allowed for your plan.
X-RateLimit-RemainingRequests remaining in the current one-second window.
X-RateLimit-ResetUnix timestamp (seconds) when the rate limit window resets.
X-Quota-UsedTotal requests used in the current billing period.
X-Quota-LimitTotal requests allowed in the current billing period.
X-Response-TimeEnd-to-end server processing time (e.g. 142ms). Only present on successful responses.
Retry-AfterSeconds to wait before retrying. Present only on RATE_LIMIT_EXCEEDED responses.

Ready to get started?

Create a free account, pick a plan, and generate your API key in minutes.