POST only

API Documentation

Endpoint-first reference for Google Search, Images, News, Videos, Maps Search, and Maps Detail.

Base URL
https://api.serpbase.dev
Auth header
X-API-Key
Billing
1 or 2 credits per successful request
Authentication

Send POST JSON requests and pass your API key in the X-API-Key header. The response body is JSON for both success and failure cases.

elapsed_ms

Common response envelope

credits_charged

1 or 2 credits per successful request

request_id

support trace id

Minimal request
bash
curl -X POST https://api.serpbase.dev/google/search \
  -H "Content-Type: application/json" \
  -H "X-API-Key: your_api_key" \
  -d '{"q":"openai realtime api","hl":"en","gl":"us"}'
Common response envelope

Successful endpoint responses return the same top-level metadata. Endpoint-specific data lives in one result key such as organic, images, news, videos, places, or place.

status
required
number

required

Business status code. 0 means success.

request_id
required
string

required

Stable request identifier for support, retries, and log correlation.

elapsed_ms
required
number

required

Gateway-observed request latency in milliseconds.

credits_charged
required
number

required

Credits charged after refund logic is applied.

search_type
required
string

required

Resolved type: search, images, news, videos, maps_search, or maps_detail.

Endpoints
POST
/google/images

Images

Image result URLs, thumbnails, source pages, and domains.

type
images
result
images
Billing
2 credits
Parameters
q
required
string

required

Search query string.

hl
optional
string

optional

Language code. Defaults to en.

gl
optional
string

optional

Country code. Defaults to us.

page
optional
number

optional

1-based page number. Defaults to 1.

Response fields
query
required
string

required

Normalized query from the request.

page
required
number

required

Current 1-based page number.

images
optional
ImageResult[]

When image results are parsed.

Google Images results.

ImageResult Result item schema
rank
required
number

required

1-based ranking position in this response.

position
optional
number

Alias for rank when available.

Normalized rank alias for clients that expect position.

title
optional
string

When image title or alt text is parsed.

Result title.

link
required
string

required

Primary link returned by the parser.

url
optional
string

Present for normalized result links.

Canonical target URL, usually the same value as link.

source_url
optional
string

Only when Google redirect/source URL is observed.

Original Google URL kept for debugging and provenance.

display_url
optional
string

When Google display text or a domain can be derived.

Display URL or source domain.

image_url
required
string

required

Full image URL.

thumbnail_url
optional
string

When Google exposes a thumbnail.

Thumbnail URL.

thumbnail
optional
string

Alias for thumbnail_url when available.

Normalized thumbnail alias.

source
optional
string

When source text is parsed.

Image source label.

domain
optional
string

When source page domain can be derived.

Source page domain.

Examples
bash
curl -X POST https://api.serpbase.dev/google/images \
  -H "Content-Type: application/json" \
  -H "X-API-Key: your_api_key" \
  -d '{
    "q": "iphone 15 pro blue",
    "hl": "en",
    "gl": "us",
    "page": 1
  }'
Notes

Visual search, product monitoring, image source discovery.

Some Google Images payload shapes expose rank/link but not every normalized alias. Treat url, display_url, source_url, position, and thumbnail as optional.

POST
/google/news

News

News articles with publisher, time text, snippets, and thumbnails.

type
news
result
news
Billing
1 credits
Parameters
q
required
string

required

Search query string.

hl
optional
string

optional

Language code. Defaults to en.

gl
optional
string

optional

Country code. Defaults to us.

page
optional
number

optional

1-based page number. Defaults to 1.

Response fields
query
required
string

required

Normalized query from the request.

page
required
number

required

Current 1-based page number.

news
optional
NewsResult[]

When news results are parsed.

Google News results.

NewsResult Result item schema
rank
required
number

required

1-based ranking position in this response.

position
optional
number

Alias for rank when available.

Normalized rank alias for clients that expect position.

title
required
string

required

Result title.

link
required
string

required

Primary link returned by the parser.

url
optional
string

Present for normalized result links.

Canonical target URL, usually the same value as link.

source_url
optional
string

Only when Google redirect/source URL is observed.

Original Google URL kept for debugging and provenance.

display_url
optional
string

When Google display text or a domain can be derived.

Display URL or source domain.

source
optional
string

When publisher text is parsed.

Publisher/source label.

time
optional
string

When Google exposes time text.

Raw published time text.

published_at
optional
string

Alias for parsed time when available.

Normalized published time alias.

snippet
optional
string

When a snippet is parsed.

Article summary snippet.

thumbnail_url
optional
string

When Google exposes a thumbnail.

Thumbnail URL.

thumbnail
optional
string

Alias for thumbnail_url when available.

Normalized thumbnail alias.

Examples
bash
curl -X POST https://api.serpbase.dev/google/news \
  -H "Content-Type: application/json" \
  -H "X-API-Key: your_api_key" \
  -d '{
    "q": "apple event",
    "hl": "en",
    "gl": "us",
    "page": 1
  }'
Notes

Brand monitoring, trend tracking, media discovery.

Source and time are parsed from compact Google metadata text, so clients should treat both as optional.

POST
/google/videos

Videos

Video result links with source, duration, time, and thumbnails.

type
videos
result
videos
Billing
1 credits
Parameters
q
required
string

required

Search query string.

hl
optional
string

optional

Language code. Defaults to en.

gl
optional
string

optional

Country code. Defaults to us.

page
optional
number

optional

1-based page number. Defaults to 1.

Response fields
query
required
string

required

Normalized query from the request.

page
required
number

required

Current 1-based page number.

videos
optional
VideoResult[]

When video results are parsed.

Google Videos results.

VideoResult Result item schema
rank
required
number

required

1-based ranking position in this response.

position
optional
number

Alias for rank when available.

Normalized rank alias for clients that expect position.

title
required
string

required

Result title.

link
required
string

required

Primary link returned by the parser.

url
optional
string

Present for normalized result links.

Canonical target URL, usually the same value as link.

source_url
optional
string

Only when Google redirect/source URL is observed.

Original Google URL kept for debugging and provenance.

display_url
optional
string

When Google display text or a domain can be derived.

Display URL or source domain.

source
optional
string

When source/channel can be parsed.

Video source or channel label.

duration
optional
string

When duration appears in result text.

Video duration text.

time
optional
string

When posted time can be parsed.

Raw posted time text.

published_at
optional
string

Alias for parsed time when available.

Normalized posted time alias.

thumbnail_url
optional
string

When Google exposes a thumbnail.

Thumbnail URL.

thumbnail
optional
string

Alias for thumbnail_url when available.

Normalized thumbnail alias.

Examples
bash
curl -X POST https://api.serpbase.dev/google/videos \
  -H "Content-Type: application/json" \
  -H "X-API-Key: your_api_key" \
  -d '{
    "q": "python asyncio tutorial",
    "hl": "en",
    "gl": "us",
    "page": 1
  }'
Notes

Video search, tutorial discovery, media monitoring.

If no dedicated video cards are parsed, the parser falls back to news-style extraction for compatible Google layouts.

POST
/google/maps/detail

Maps Detail

Single place details by Google Maps feature_id.

type
maps_detail
result
place
Billing
2 credits
Parameters
feature_id
required
string

required

Google Maps feature id, formatted like 0x...:0x....

hl
optional
string

optional

Language code. Defaults to en.

gl
optional
string

optional

Country code. Defaults to us.

Response fields
feature_id
required
string

required

Feature id resolved from the Maps detail request.

page
required
number

required

Always 1 for maps detail.

place
optional
MapsPlace

When place details are parsed.

Single place detail object.

MapsPlace Result item schema
position
optional
number

Maps Search only.

Place rank in the local result list.

name
required
string

required

Place name.

title
required
string

required

Alias for name.

feature_id
required
string

required

Google Maps feature id.

place_id
optional
string

When Google exposes it.

Google place id.

data_id
optional
string

Alias for feature_id.

Maps data id.

cid
optional
string

Derived from feature_id when possible.

Google CID.

kgmid
optional
string

When present in Maps payload.

Knowledge graph machine id.

google_maps_url
optional
string

When Google exposes a Maps URL.

Google Maps URL.

url
optional
string

google_maps_url or website fallback.

Primary place URL.

rating
optional
number

When rating is present.

Google rating.

types
optional
string[]

When categories are present.

Place type labels.

category
optional
object

When category block is parsed.

Structured category data.

address
optional
string

When address is present.

Formatted address.

address_components
optional
object

When components are present.

Street, city, postal code, country code.

plus_code
optional
object

When plus code is present.

Global and compound plus codes.

phone
optional
string

When phone is present.

Local phone number.

phone_international
optional
string

When present.

International phone number.

phone_uri
optional
string

When present.

Telephone URI.

website
optional
string

When website is present.

Business website.

website_domain
optional
string

When website domain is present.

Business website domain.

latitude
optional
number

When coordinates are present.

Latitude.

longitude
optional
number

When coordinates are present.

Longitude.

image
optional
string

When image is present.

Primary place image.

thumbnail
optional
string

Alias for image when available.

Primary image alias.

photos
optional
MapsPhoto[]

When photos are parsed.

Photo id, URL, size, and optional coordinates.

hours
optional
Record<string,string>

When hours are parsed.

Opening hours by day.

open_status
optional
object

When status is present.

Open status text and current hours.

attributes
optional
object[]

When attributes are parsed.

Grouped place attributes.

related_places
optional
object[]

When related places are present.

Related places from Maps payload.

short_description
optional
string

When description block is present.

Short place description.

description
optional
string

When description block is present.

Longer place description.

snippet
optional
string

short_description or description fallback.

Normalized text summary.

timezone
optional
string

When present.

Place timezone.

region
optional
string

When present.

Region label.

country_code
optional
string

When present.

Country code.

language
optional
string

When present.

Language code from Maps payload.

Examples
bash
curl -X POST https://api.serpbase.dev/google/maps/detail \
  -H "Content-Type: application/json" \
  -H "X-API-Key: your_api_key" \
  -d '{
    "feature_id": "0x8085809c2c6fdc63:0x4b3f2d70e4f5a123",
    "hl": "en",
    "gl": "us"
  }'
Notes

Place enrichment, local CRM data, detail pages.

Use feature_id from Maps Search results to request a detail record.

Errors
error
required
string

required

Human-readable failure message.

0
SUCCESS

Request completed successfully.

1000
INVALID_REQUEST

Missing or invalid body or parameters.

1001
UNAUTHORIZED

Missing, invalid, or revoked API key.

1020
INSUFFICIENT_CREDITS

Account balance is not enough.

1029
RATE_LIMITED

QPS or concurrency limit exceeded.

1500
INTERNAL_ERROR

Unexpected internal server error.

1502
UPSTREAM_FAILED

Worker returned an upstream fetch or parse error.

1503
SERVICE_UNAVAILABLE

No worker session is available.

1504
UPSTREAM_TIMEOUT

Gateway timed out waiting for a worker result.

json
{
  "status": 1001,
  "error": "unauthorized",
  "request_id": "0f3576b2-6e2e-4f1e-bb0e-8cb0d4a60195",
  "elapsed_ms": 0,
  "credits_charged": 0
}
Privacy and retention
Search queries may be logged for billing, debugging, abuse prevention, and account logs. See the privacy page for retention details.