Skip to content
Docs

Docs / API reference

API reference

JSON over HTTPS for every seospark tool: the same tools, data and credits as the dashboard and the MCP server. Every endpoint below is generated from the API itself, so what you read is what it does.

Base URL
api.seospark.io/v2
Format
JSON
Auth
Bearer API key

Authentication

Send an API key in the Authorization header of every request. Owners create keys in the dashboard under Settings › API keys; more about keys.

Your first call
curl https://api.seospark.io/v2/account \
  -H "Authorization: Bearer $SEOSPARK_KEY"

Responses and cost

Every success has the same envelope. data is what the endpoint returns; cost is the credits this call used, also in the x-credits-used header. Reading results is free; starting work is what costs.

Success
{
  "status": "success",
  "data": { … },
  "cost": 2480
}
Error
{
  "status": "error",
  "error_code": "bad_request",
  "message": "keywords: Too small: expected array to have >=10 items",
  "invalid_fields": ["keywords"]
}

Runs that take a while

Clustering, metrics lookups, People Also Ask and other heavy work run in the background. Starting one returns a run with an id and status: "processing". Read it again until the status is succeeded (or failed; its credits stay spent, since the data was already requested), then read its results. Every run also shows up in the dashboard’s History.

Lists of results are paged the same way everywhere:

  • page_index (from 0) and page_size in the query;
  • total_count, page_index, page_size and items in the answer.

Rate limits

A key may make 300 requests a minute, 60 of them POSTs. x-ratelimit-limit, x-ratelimit-remaining and x-ratelimit-reset say where you stand; over the limit you get 429 rate_limited with a retry-after header.

Errors

Statuserror_codeWhen
400bad_requestA field is missing or invalid; invalid_fields names them.
400invalid_filterThe filter has more conditions than the live data source can apply (8 at most; a list of values counts once, except for contains_all).
400size_limit_exceededIt would grow past its size limit.
401invalid_api_keyNo key, or an unknown or revoked one.
402insufficient_creditsIt costs more than the credits left. Nothing is charged.
402paid_plan_requiredOnly available on a paid plan.
403insufficient_entitlementsYour plan doesn’t include it (the API itself, or this size); missing_entitlements says what.
404not_foundNo such id in your organisation.
409awaiting_mutationThe list is still busy with the last change; try again in a moment.
409job_not_readyThe run hasn’t succeeded yet.
409search_console_not_readyThe project reads no Search Console property yet, or its data is still loading.
422not_enough_resultsToo few keywords are left after cleaning up.
429rate_limitedOver the key’s rate limit; retry after the retry-after header.

Endpoints

OpenAPI spec

The whole API as an OpenAPI 3.1 document, for client generators, Postman or your assistant: https://api.seospark.io/v2/openapi.json. No key needed.