SERP Agent API keys API
Create, list, and revoke API keys (max 5 active per account).
Create, list, and revoke API keys (max 5 active per account).
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/serp-agent-com:serp-agent-com-api-keys-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: SERP Agent API keys API
version: 1.0.0
description: 'Agent-ready SEO automation API: programmatic signup, technical site audits, and end-to-end SEO article generation. Designed for AI agents — instant sandbox keys (no CAPTCHA, no payment method), uniform machine-readable errors, idempotent POSTs, and signed webhooks. All request and response fields are snake_case. Quickstart for agents: https://serp-agent.com/docs/agents'
contact:
url: https://serp-agent.com/docs
servers:
- url: https://serp-agent.com
description: Production
security:
- apiKey: []
tags:
- name: API Keys
description: Create, list, and revoke API keys (max 5 active per account).
paths:
/v1/api-keys:
post:
operationId: createApiKey
summary: Create an additional API key
description: Mints a key of the **same mode** as the calling key (sandbox keys mint sandbox keys, live mint live) — a trial can never self-upgrade. Sandbox rotations inherit the calling key's expiry and usage ledger, so minting keys never extends or resets the trial budget. Max 5 active keys per account. The raw key appears only in this response. Empty body is valid (`name` is optional).
tags:
- API Keys
parameters:
- name: Idempotency-Key
in: header
required: false
description: 'Any unique string (max 200 chars). Retrying a request with the same key replays the stored response verbatim (with header Idempotent-Replayed: true) instead of re-executing — including one-time secrets in the original body. Keys are scoped per account (per client IP on the unauthenticated signup) and pruned after 24h. Reusing a key on a different endpoint returns 409 idempotency_conflict.'
schema:
type: string
maxLength: 200
example: b3f1c9e2-1a77-4d0e-9f5a-2f4f4f4f4f4f
requestBody:
required: false
content:
application/json:
schema:
type: object
properties:
name:
type: string
minLength: 1
maxLength: 100
example:
name: ci-runner
responses:
'201':
description: Key created. `api_key` is the full raw key — shown exactly once.
headers:
X-RateLimit-Limit:
description: Request budget for the current window (600/min per API key on authenticated routes; 5/hour per IP on signup).
schema:
type: integer
X-RateLimit-Remaining:
description: Requests remaining in the current window.
schema:
type: integer
X-RateLimit-Reset:
description: Unix timestamp (seconds) when the window resets.
schema:
type: integer
content:
application/json:
schema:
$ref: '#/components/schemas/CreatedApiKey'
example:
id: ck_key_01h9x3
name: ci-runner
key_prefix: sk_sandbox_
last4: 9fQz
mode: sandbox
created_at: '2026-07-23T09:00:00.000Z'
last_used_at: null
expires_at: '2026-08-06T09:00:00.000Z'
revoked_at: null
api_key: sk_sandbox_REDACTED_EXAMPLE_KEY
'400':
description: Malformed body (`invalid_request`) or 5 active keys already exist (`key_limit_reached`).
headers:
X-RateLimit-Limit:
description: Request budget for the current window (600/min per API key on authenticated routes; 5/hour per IP on signup).
schema:
type: integer
X-RateLimit-Remaining:
description: Requests remaining in the current window.
schema:
type: integer
X-RateLimit-Reset:
description: Unix timestamp (seconds) when the window resets.
schema:
type: integer
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
error:
code: key_limit_reached
message: You already have 5 active API keys. Revoke one (DELETE /v1/api-keys/{id}) before creating another.
doc_url: https://serp-agent.com/docs/errors#key_limit_reached
'401':
description: 'Missing, malformed, unknown, revoked, or expired API key. Codes: `unauthorized`, `key_revoked`, `key_expired`.'
headers:
X-RateLimit-Limit:
description: Request budget for the current window (600/min per API key on authenticated routes; 5/hour per IP on signup).
schema:
type: integer
X-RateLimit-Remaining:
description: Requests remaining in the current window.
schema:
type: integer
X-RateLimit-Reset:
description: Unix timestamp (seconds) when the window resets.
schema:
type: integer
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
error:
code: unauthorized
message: 'Missing or malformed Authorization header. Expected: Bearer sk_...'
doc_url: https://serp-agent.com/docs/errors#unauthorized
'429':
description: Rate limit exceeded (600 requests/minute per API key). Honor `Retry-After`.
headers:
Retry-After:
description: Seconds to wait before retrying.
schema:
type: integer
X-RateLimit-Limit:
description: Request budget for the current window (600/min per API key on authenticated routes; 5/hour per IP on signup).
schema:
type: integer
X-RateLimit-Remaining:
description: Requests remaining in the current window.
schema:
type: integer
X-RateLimit-Reset:
description: Unix timestamp (seconds) when the window resets.
schema:
type: integer
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
error:
code: rate_limited
message: Rate limit exceeded for this API key.
doc_url: https://serp-agent.com/docs/errors#rate_limited
get:
operationId: listApiKeys
summary: List API keys
description: All keys on the account, newest first. Only `key_prefix` + `last4` are exposed — the full secret and hash never appear after creation.
tags:
- API Keys
responses:
'200':
description: The account's keys.
headers:
X-RateLimit-Limit:
description: Request budget for the current window (600/min per API key on authenticated routes; 5/hour per IP on signup).
schema:
type: integer
X-RateLimit-Remaining:
description: Requests remaining in the current window.
schema:
type: integer
X-RateLimit-Reset:
description: Unix timestamp (seconds) when the window resets.
schema:
type: integer
content:
application/json:
schema:
$ref: '#/components/schemas/ApiKeyList'
example:
keys:
- id: ck_key_01h9x2
name: default
key_prefix: sk_sandbox_
last4: 9fQz
mode: sandbox
created_at: '2026-07-23T09:00:00.000Z'
last_used_at: '2026-07-23T09:05:12.000Z'
expires_at: '2026-08-06T09:00:00.000Z'
revoked_at: null
'401':
description: 'Missing, malformed, unknown, revoked, or expired API key. Codes: `unauthorized`, `key_revoked`, `key_expired`.'
headers:
X-RateLimit-Limit:
description: Request budget for the current window (600/min per API key on authenticated routes; 5/hour per IP on signup).
schema:
type: integer
X-RateLimit-Remaining:
description: Requests remaining in the current window.
schema:
type: integer
X-RateLimit-Reset:
description: Unix timestamp (seconds) when the window resets.
schema:
type: integer
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
error:
code: unauthorized
message: 'Missing or malformed Authorization header. Expected: Bearer sk_...'
doc_url: https://serp-agent.com/docs/errors#unauthorized
'429':
description: Rate limit exceeded (600 requests/minute per API key). Honor `Retry-After`.
headers:
Retry-After:
description: Seconds to wait before retrying.
schema:
type: integer
X-RateLimit-Limit:
description: Request budget for the current window (600/min per API key on authenticated routes; 5/hour per IP on signup).
schema:
type: integer
X-RateLimit-Remaining:
description: Requests remaining in the current window.
schema:
type: integer
X-RateLimit-Reset:
description: Unix timestamp (seconds) when the window resets.
schema:
type: integer
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
error:
code: rate_limited
message: Rate limit exceeded for this API key.
doc_url: https://serp-agent.com/docs/errors#rate_limited
/v1/api-keys/{id}:
delete:
operationId: revokeApiKey
summary: Revoke an API key
description: 'A key may revoke itself, but revoking the FINAL active key is refused (`cannot_revoke_last_key`) — with zero active keys the account would be locked out. Rotation order: create the new key first, then revoke the old one. Revoking an already-revoked key is idempotent (returns the same terminal state).'
tags:
- API Keys
parameters:
- name: id
in: path
required: true
description: API key id (from POST/GET /v1/api-keys).
schema:
type: string
responses:
'200':
description: Key revoked (or already revoked).
headers:
X-RateLimit-Limit:
description: Request budget for the current window (600/min per API key on authenticated routes; 5/hour per IP on signup).
schema:
type: integer
X-RateLimit-Remaining:
description: Requests remaining in the current window.
schema:
type: integer
X-RateLimit-Reset:
description: Unix timestamp (seconds) when the window resets.
schema:
type: integer
content:
application/json:
schema:
$ref: '#/components/schemas/ApiKeyEnvelope'
example:
key:
id: ck_key_01h9x2
name: default
key_prefix: sk_sandbox_
last4: 9fQz
mode: sandbox
created_at: '2026-07-23T09:00:00.000Z'
last_used_at: '2026-07-23T09:05:12.000Z'
expires_at: '2026-08-06T09:00:00.000Z'
revoked_at: '2026-07-23T10:00:00.000Z'
'400':
description: 'This is the only active key. Code: `cannot_revoke_last_key`.'
headers:
X-RateLimit-Limit:
description: Request budget for the current window (600/min per API key on authenticated routes; 5/hour per IP on signup).
schema:
type: integer
X-RateLimit-Remaining:
description: Requests remaining in the current window.
schema:
type: integer
X-RateLimit-Reset:
description: Unix timestamp (seconds) when the window resets.
schema:
type: integer
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
error:
code: cannot_revoke_last_key
message: This is your only active API key — revoking it would lock the account out of the API. Create a replacement first (POST /v1/api-keys), then revoke this one.
doc_url: https://serp-agent.com/docs/errors#cannot_revoke_last_key
'401':
description: 'Missing, malformed, unknown, revoked, or expired API key. Codes: `unauthorized`, `key_revoked`, `key_expired`.'
headers:
X-RateLimit-Limit:
description: Request budget for the current window (600/min per API key on authenticated routes; 5/hour per IP on signup).
schema:
type: integer
X-RateLimit-Remaining:
description: Requests remaining in the current window.
schema:
type: integer
X-RateLimit-Reset:
description: Unix timestamp (seconds) when the window resets.
schema:
type: integer
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
error:
code: unauthorized
message: 'Missing or malformed Authorization header. Expected: Bearer sk_...'
doc_url: https://serp-agent.com/docs/errors#unauthorized
'404':
description: 'No such key on this account. Code: `not_found`.'
headers:
X-RateLimit-Limit:
description: Request budget for the current window (600/min per API key on authenticated routes; 5/hour per IP on signup).
schema:
type: integer
X-RateLimit-Remaining:
description: Requests remaining in the current window.
schema:
type: integer
X-RateLimit-Reset:
description: Unix timestamp (seconds) when the window resets.
schema:
type: integer
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
error:
code: not_found
message: No such API key.
doc_url: https://serp-agent.com/docs/errors#not_found
'429':
description: Rate limit exceeded (600 requests/minute per API key). Honor `Retry-After`.
headers:
Retry-After:
description: Seconds to wait before retrying.
schema:
type: integer
X-RateLimit-Limit:
description: Request budget for the current window (600/min per API key on authenticated routes; 5/hour per IP on signup).
schema:
type: integer
X-RateLimit-Remaining:
description: Requests remaining in the current window.
schema:
type: integer
X-RateLimit-Reset:
description: Unix timestamp (seconds) when the window resets.
schema:
type: integer
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
error:
code: rate_limited
message: Rate limit exceeded for this API key.
doc_url: https://serp-agent.com/docs/errors#rate_limited
components:
schemas:
Error:
type: object
description: 'Uniform error body returned by every non-2xx response. `code` is machine-readable (full catalog: https://serp-agent.com/docs/errors); `doc_url` links its documentation.'
required:
- error
properties:
error:
type: object
required:
- code
- message
- doc_url
properties:
code:
type: string
example: rate_limited
message:
type: string
description: Human/agent-readable explanation, often with the exact next step.
doc_url:
type: string
format: uri
CreatedApiKey:
type: object
description: ApiKey plus the raw secret — present only in the creation response.
required:
- id
- name
- key_prefix
- last4
- mode
- created_at
- last_used_at
- expires_at
- revoked_at
- api_key
properties:
id:
type: string
name:
type:
- string
- 'null'
key_prefix:
type: string
enum:
- sk_sandbox_
- sk_live_
last4:
type: string
mode:
type: string
enum:
- sandbox
- live
created_at:
type: string
format: date-time
last_used_at:
type:
- string
- 'null'
format: date-time
expires_at:
type:
- string
- 'null'
format: date-time
revoked_at:
type:
- string
- 'null'
format: date-time
api_key:
type: string
description: Full raw key — shown exactly once.
ApiKeyEnvelope:
type: object
required:
- key
properties:
key:
$ref: '#/components/schemas/ApiKey'
ApiKeyList:
type: object
required:
- keys
properties:
keys:
type: array
items:
$ref: '#/components/schemas/ApiKey'
ApiKey:
type: object
required:
- id
- name
- key_prefix
- last4
- mode
- created_at
- last_used_at
- expires_at
- revoked_at
properties:
id:
type: string
name:
type:
- string
- 'null'
key_prefix:
type: string
enum:
- sk_sandbox_
- sk_live_
last4:
type: string
description: Last 4 characters of the raw key.
mode:
type: string
enum:
- sandbox
- live
created_at:
type: string
format: date-time
last_used_at:
type:
- string
- 'null'
format: date-time
expires_at:
type:
- string
- 'null'
format: date-time
description: Sandbox keys expire; live keys have null.
revoked_at:
type:
- string
- 'null'
format: date-time
securitySchemes:
apiKey:
type: http
scheme: bearer
description: 'API key in the Authorization header: `Authorization: Bearer sk_sandbox_...` (trial) or `Bearer sk_live_...` (paid). Keys are obtained from POST /v1/accounts (instant sandbox key) or POST /v1/api-keys. The raw key is shown exactly once at creation — only a hash is stored. Sandbox keys expire after 14 days.'
x-sandbox-limits:
description: 'Hard caps on a free sandbox trial (per key): 1 project, 1 audit, 2 draft-only articles; the key expires after 14 days. Exceeding a cap returns 403 sandbox_limit_reached with the upgrade URL. Upgrade: https://serp-agent.com/pricing'
projects: 1
audits: 1
articles: 2
expires_days: 14