SerpBase

Quickstart

Run your first Google search through the API in about two minutes. You need an API key and a terminal; nothing to install.

1

Get an API key

Create an account — it comes with 500 free credits and needs no card. Open API keys in the dashboard and create a key. Keep it private: send it only in the X-API-Key header, never in a URL or in browser code.

API keys →
2

Send a search

Search endpoints take a JSON body over POST. This one searches Google for “coffee shops” as someone in the US would:

BASH
curl -X POST 'https://api.serpbase.dev/google/search' \
  -H "Content-Type: application/json" \
  -H 'X-API-Key: YOUR_API_KEY' \
  --max-time 60 \
  -d '{"device":"mobile","gl":"us","hl":"en","q":"coffee shops"}'

Prefer clicking? The same request runs in the Playground, which fills in your key. Playground →

Base URL: https://api.serpbase.dev

3

Read the result

You get the results page as JSON, one field per block Google showed. A real answer, shortened:

Response · real, shortened
{
  "status": 0,
  "credits_charged": 1,
  "request_id": "r-4b27fe8a36d9ac303a5da7dd",
  "product_id": "google_web_search",
  "query": "coffee shops",
  "local_results": [
    {
      "address": "Denver, CO",
      "category": "Coffee shop",
      "hours": "Open",
      "position": 1,
      "rank": 1,
      "rating": "4.9",
      "reviews_count": "455",
      "title": "Coffeegraph"
    },
    {
      "address": "Sioux Falls, SD",
      "category": "Coffee shop",
      "hours": "Open",
      "position": 1,
      "rank": 2,
      "rating": "4.9",
      "reviews_count": "295",
      "title": "The Breaks Coffee Roasting Co."
    }
  ],
  "organic": [
    {
      "date": "Sep 17, 2026",
      "display_link": "www.discovertheburgh.com",
      "display_url": "www.discovertheburgh.com",
      "link": "https://www.discovertheburgh.com/pittsburgh-coffee-shops/",
      "position": 3,
      "published_at": "Sep 17, 2026",
      "rank": 1,
      "snippet": "🏨 Book Avenue in Garfield. Redhawk Coffee. Ghost Coffee Collab at Trace Brewing. Kaibur Coffee Kaibu…",
      "source_url": "https://www.google.com/goto?url=CAESdAHrOzAVQPT8-1-RxOq_G62WuAgUAmaFDk4SD6YsadPoLMH5lbvuR0WPu8BR2EKN…",
      "title": "48 Pittsburgh Coffee Shops to Grab a Delicious Brew",
      "url": "https://www.discovertheburgh.com/pittsburgh-coffee-shops/"
    }
  ],
  "page": 1,
  "people_also_ask": [
    {
      "position": 2,
      "question": "What are the top 10 coffee chains?"
    },
    {
      "position": 2,
      "question": "What are the main coffee shop chains?"
    }
  ],
  "people_also_search_for": [
    "Best coffee shops",
    "Coffee shops Orlando"
  ],
  "related_searches": [
    "Best coffee shops in Pittsburgh to study",
    "Coffee Shops near Monroeville PA"
  ],
  "search_type": "search"
}
status: 0
Success. Anything else comes with an error message, and a failed search costs nothing.
credits_charged
What this request cost. A Google search is 1 credit.
request_id
Quote it when you contact support; we find the request in seconds.
4

Where to next

Endpoints