Every API here is available over the APIs.io API and to AI agents over MCP.
openapi: 3.2.0
info:
title: SerpKite SERP Playground API
version: 1.12.4
description: 'Public search API (api.serpkite.com). Google results as clean JSON or Markdown
for AI agents, plus a Google Custom Search–compatible endpoint. Official SDKs:
`serpkite` on npm and PyPI, `github.com/serpkite/serpkite-go`. **Auth:** `Authorization: Bearer skt_live_…`. A bare `Authorization: skt_live_…`
(no scheme) is also accepted, for MCP hosts that can''t add one. GET requests
may pass `?api_key=` instead. `/customsearch/v1` also accepts Google''s `?key=`. **Bodies:** every vertical accepts `POST` with a JSON object or `GET` with the
same parameters in the query string (only `GET /v1/search` is spelled out
here). Unknown parameters are rejected with 400, and so is a parameter the
endpoint would ignore (e.g. `time` on `/v1/scholar`, `ll` on `/v1/search`). To run many queries at once,
use `POST /v1/batches`. **Formats:** `format=json` (default) returns the schemas below. `format=markdown` returns `text/markdown` for every vertical. `format=compact` and `fields=` return a reduced JSON object (same top-level
keys, fewer item fields, `meta` always kept), so required item fields may be
absent there. **Responses** share one envelope: `request` (the normalised request),
`results` (the vertical''s primary list), vertical-specific extras and `meta`. All keys are snake_case. **Credits** are decimal numbers (e.g. `0.5`). Failed, empty and blocked
responses are refunded. Every billed response carries `X-Credits-Used`,
`X-Credits-Remaining`, `X-Cost-USD`, `X-Cache` (`HIT`|`MISS`), `X-Latency-Ms`,
`X-Tokens-Estimate` and `X-Request-Id`. **Errors** share one body: `{"error":{"code","message","request_id"}}`. Upstream failures (`upstream_error`, `upstream_blocked`, `upstream_timeout`)
are `503` with `Retry-After`, never billed and safe to retry. The API never
returns `502` or `504`. `429` also carries `Retry-After`: `rate_limited` is
the per-second limit; `daily_limit_reached` is the free daily limit of an
account that never bought a pack, which resets at 00:00 UTC (the message
names the limit and the billing page; buying any pack removes it). `403 account_restricted` means the account''s free use is paused because it
appears to be one of several accounts run by the same person (same device
or network, or requests in step with other accounts) or uses a disposable
email address; buying any pack lifts it. **CORS:** `Access-Control-Allow-Origin: *` without credentials; the `X-*`
headers above are exposed, so a browser playground can call the API with a key. The keyless `/playground/search` is the exception: it only answers serpkite.com
and app.serpkite.com (other `Origin`s get 403). Credit table: search/news/images/videos/maps/places/shopping/scholar/patents/
webpage/customsearch = 1 per page; place details = 1; `num=100` depth bundle = 7; reviews = 1 per 10;
autocomplete = 0.5; `include_content` = +1 per fetched page;
batches ×0.5 (from 2026-11-23 a batch depth request is 0.5 per page with
results, without the bundle cap: `num=100` = 5); cache hit via `max_age` ×0.5. `engine=consensus` (search only) =
the sum of one page per provider that returned results. **AI** (Claude writes, OpenAI''s Decisions API runs typed checks; a failed
model step is never billed): an answer (`include_answer` on `/v1/search` and
`/v1/news`, the model part of `/v1/answer`) = +2 over the result page, +4
when it read pages (`include_content`, `/v1/answer` depth=standard);
`/v1/extract` `summary` = +4 and `output_schema` = +4 per page;
`/v1/research` = lite 30, standard 75, deep 200. Responses that used a
model carry `meta.llm`. **AI assistants** (`/v1/chatgpt`, `/v1/gemini`, `/v1/copilot`,
`/v1/ai_mode`, `/v1/brave_ai`): a `prompt` sent to the public assistant
as a logged-out user; the response is its answer
(`text`, `markdown`) with the `sources` it cited or listed,
`search_queries`, `products` and `places` where the assistant shows them,
and `mentions` for the brands and domains in `track`.'
servers:
- url: https://api.serpkite.com
- url: http://localhost:8080
security:
- bearer: []
tags:
- name: Playground
paths:
/playground/search:
post:
summary: No-login demo of /v1/search (and news, images, autocomplete via `endpoint`).
operationId: playground
security: []
requestBody:
required: true
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/SearchRequest'
- type: object
properties:
endpoint:
type: string
enum:
- search
- news
- images
- autocomplete
default: search
turnstile_token:
type: string
description: 'Cloudflare Turnstile token, required when the server enforces Turnstile. Single-use: get a fresh one for every request'
responses:
'200':
description: Same body as the corresponding endpoint
content:
application/json:
schema:
type: object
additionalProperties: true
'400':
$ref: '#/components/responses/Error'
'403':
description: Bot check failed (missing, spent or foreign Turnstile token) or the Origin is not one of our sites
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'429':
$ref: '#/components/responses/Error'
tags:
- Playground
components:
schemas:
DomainList:
description: 'Domains as an array or a comma-separated string, at most 20: a host (`example.com`, subdomains match), a host with a path prefix (`github.com/org`) or a TLD (`.gov`).'
oneOf:
- type: string
examples:
- github.com,en.wikipedia.org
- type: array
maxItems: 20
items:
type: string
examples:
- - github.com/serpkite
- .gov
SearchRequest:
type: object
required:
- q
properties:
q:
type: string
minLength: 1
maxLength: 2048
country:
type: string
default: us
description: Country code (ISO 3166-1 alpha-2, case-insensitive; uk is accepted as gb). When omitted and location ends in a country name, that country is used. Russia (ru) is supported across all search verticals, including patents
language:
type: string
default: en
description: 'Interface language: a language code with an optional region (e.g. en, ru, de, pt-br, zh-tw, es-419). Russian (ru) is supported across all search verticals; language does not change the selected country. On patents, a non-English code restricts publication language (ar, zh, da, nl, fi, fr, de, it, ja, ko, no, pt, ru, es, sv)'
location:
type: string
description: Free-text location, e.g. "Austin, Texas, United States". Google and Yandex Maps apply it; other engines have no such parameter and are skipped (a 400 when you named one), never answered for the wrong place. uule works the same way
uule:
type: string
description: Pre-encoded Google location (overrides ll and location; percent-encoded values are decoded)
ll:
type: string
description: 'Map point "@lat,lng,14z" (maps and places only; zoom optional, default 14z): the map is searched around that point at that zoom, wherever the request comes from. Overrides location'
num:
type: integer
default: 10
minimum: 1
maximum: 100
description: '1–100. Up to 10 returns one page (10 results, 1 credit; trim it yourself for fewer). Above 10 on search and news is the depth bundle (7 credits for 100; values between round up to whole pages). On images a page is a block of up to 100 images (1 credit) and num (default 100) is how many of them to return; `page` moves to the next block. Other verticals return one page as the engine serves it: up to 10 on Google (shopping cards come 40-55 to a page, and Brave and DuckDuckGo news and videos up to about 60), for 1 credit. Trim it yourself'
page:
type: integer
default: 1
minimum: 1
maximum: 10
time:
type: string
enum:
- hour
- day
- week
- month
- year
description: Only results from the last hour/day/… (search, news, images, videos, shopping). A fallback engine without that window is skipped, never answered unfiltered
tbs:
type: string
description: 'Advanced: raw Google tbs filter (e.g. qdr:d, qdr:w2, cdr:1,cd_min:1/1/2026,cd_max:1/31/2026); overrides time'
device:
type: string
enum:
- desktop
- mobile
default: desktop
safe:
type: string
enum:
- active
- 'off'
default: 'off'
autocorrect:
type: boolean
default: true
format:
type: string
enum:
- json
- markdown
- compact
default: json
fields:
type: string
description: Comma-separated projection, e.g. "results.title,results.link,knowledge_graph"
include_content:
type: integer
minimum: 0
maximum: 5
default: 0
description: Also fetch the top N organic pages as Markdown (+1 credit each fetched page)
ads:
type: boolean
default: false
description: Include sponsored results
max_age:
type: integer
minimum: 0
description: Accept a cached result up to this many seconds old (50% of credits on a hit)
engine:
$ref: '#/components/schemas/EngineParam'
include_domains:
$ref: '#/components/schemas/DomainList'
description: 'Only results from these domains (search, news, images, videos). Compiled into site: operators and enforced on the results. With engine=consensus, every provider gets the operators and only providers with a remaining result are billed'
exclude_domains:
$ref: '#/components/schemas/DomainList'
description: Drop results from these domains (search, news, images, videos)
boost_domains:
$ref: '#/components/schemas/DomainList'
description: Move results from these domains to the top, keeping the order within both groups (search, news)
start_date:
type: string
format: date
description: Only results published on or after this date, YYYY-MM-DD (search, news, images, videos). Can't be combined with time or tbs. A fallback engine without date ranges is skipped
end_date:
type: string
format: date
description: Only results published on or before this date, YYYY-MM-DD. Can't be combined with time or tbs
highlights:
type: boolean
default: false
description: Return up to 3 query-ranked passages (`highlights`) of each page read by include_content instead of the whole page (search only; needs include_content; no extra credits)
include_answer:
type: boolean
default: false
description: Add a cited AI `answer` written by Claude over this response's results (search and news; +2 credits, +4 when it read pages via `include_content`; refunded with a `meta.warnings` entry when the model fails)
EngineParam:
description: 'Which search providers may answer. `google` (the default) is Google only; Google requests are retried internally before failing. `auto` allows falling back to other enabled providers, in route order, when Google is blocked or times out. A single other provider (`brave`) or a list (`["google","brave"]`, or `google,brave` in a query string) restricts the request to those providers. `meta.engine` always names the provider that answered and credits follow that provider''s price. A key with "Allow fallback to other search engines" on treats a request without `engine` as `auto`. `consensus` (`/v1/search` only; 400 elsewhere, and it can''t be combined with other names) queries several independent search indexes in parallel (at most one Bing-backed provider, so Yahoo or DuckDuckGo never count as agreeing with Bing), merges the results by URL and ranks them by how many providers returned each one. Each result lists its `sources`; `meta.engine` is `consensus` and `meta.route` lists every provider attempt. Up to three providers answer: a provider that fails or comes back empty hands its turn to the next one in the route. It stops once `num` unique results are in hand or after a few seconds, and costs the sum of one page at each provider that returned results (providers that failed, came back empty or were never started are free). `yandex` serves `/v1/search` from Yandex web search (no `time` filter or `safe: active`: a request naming it gets a 400 with them) and `/v1/maps`, `/v1/places` and `/v1/place` from Yandex Maps, where the deployment enables it (otherwise a 503 `unavailable`, not charged); with `auto` it is the last fallback there.'
oneOf:
- type: string
default: google
examples:
- google
- auto
- consensus
- brave
- google,brave
- type: array
items:
$ref: '#/components/schemas/Provider'
minItems: 1
Provider:
type: string
description: A search provider (docs/providers). Which verticals each serves depends on the deployment.
enum:
- google
- brave
- bing
- yahoo
- duckduckgo
- mojeek
- wikipedia
- yandex
Error:
type: object
required:
- error
properties:
error:
type: object
required:
- code
- message
properties:
code:
type: string
description: '403: spend_cap_reached, key_limit_reached, account_restricted, forbidden. 409/422: idempotency_key_reused. 422: target_unavailable (the URL you asked for failed: its site answered 404, its domain doesn''t resolve; resending won''t help), no_pages. 429: rate_limited, daily_limit_reached. 503: upstream_error, upstream_blocked, upstream_timeout, unavailable (the API never sends 502 or 504)'
examples:
- unauthorized
- invalid_request
- insufficient_credits
- rate_limited
- daily_limit_reached
- spend_cap_reached
- key_limit_reached
- account_restricted
- idempotency_key_reused
- forbidden
- not_found
- upstream_error
- upstream_blocked
- upstream_timeout
- unavailable
- internal
message:
type: string
request_id:
type: string
responses:
Error:
description: Error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
securitySchemes:
bearer:
type: http
scheme: bearer
oauth:
type: oauth2
description: OAuth 2.1 for the remote MCP server only (authorization code + PKCE S256; app-api.serpkite.com is the authorization server).
flows:
authorizationCode:
authorizationUrl: https://app-api.serpkite.com/oauth/authorize
tokenUrl: https://app-api.serpkite.com/oauth/token
refreshUrl: https://app-api.serpkite.com/oauth/token
scopes:
mcp: Use the SerpKite MCP tools, billed to your account
offline_access: Stay connected with refresh tokens