API reference

OpenAPI & Swagger

The API ships a live OpenAPI 3.1 schema. Explore it interactively, read it as reference, or feed it to a client generator to get a typed SDK in your language.

Interactive explorer

The service is built on FastAPI, which serves an always-current, auto-generated schema straight from the code. Open the interactive Swagger UI to browse every endpoint, expand request and response models, and fire real requests from the browser after pasting a key into the X-API-Key authorize box.

Endpoints

  • https://serp-api.hoangha.shop/docs — Swagger UI (try-it-out).
  • https://serp-api.hoangha.shop/redoc — ReDoc, a clean read-only reference.
  • https://serp-api.hoangha.shop/openapi.json — the raw OpenAPI 3.1 document.

Authorizing in Swagger UI

The explorer needs your key to make live calls. Click Authorize, paste your key into the X-API-Key field, and every subsequent try-it-out request sends it automatically. A real call consumes quota exactly like any other, so use a key you are happy to spend against.

Live calls cost quota

Requests fired from Swagger UI hit the real crawler. Cached repeats are free, but a fresh crawl counts against your monthly quota just like a request from your own code.

Generate a typed client

Because the spec is machine-readable, you do not have to hand-write an HTTP client. Point a generator at the schema and it emits typed models and request methods for your stack.

typescript (openapi-typescript)
# generate types from the live schema
npx openapi-typescript https://serp-api.hoangha.shop/openapi.json -o src/serp-api.d.ts
python (openapi-python-client)
pipx run openapi-python-client generate --url https://serp-api.hoangha.shop/openapi.json
any language (openapi-generator)
# e.g. Go, Java, PHP, Ruby, C#, Rust, …
openapi-generator-cli generate \
  -i https://serp-api.hoangha.shop/openapi.json \
  -g go \
  -o ./serp-api-client

Prefer hand-written calls or a language not covered by a generator? The endpoints are plain JSON over HTTPS — see Language SDKs for ready-to-paste submit-and-poll snippets in several languages.