Skip to content
unzoi docs
Search and navigation
Start here
REST API
MCP
Limits and plans
Agent clients
SDKs
Guides

SDKs

There is nothing to install, and that is deliberate.

A handful of GET endpoints with query parameters is not enough surface to justify a package in five languages — each of which would lag the API, need its own release, and hide the two things that actually matter: the limit headers and how you retry.

What you get instead:

  • An OpenAPI 3.1 document that any generator consumes, if you want types — see OpenAPI.
  • A worked client per language below, short enough to read in one sitting and paste into your own code.

What a client should do

  1. Send the key as a header, never in the query string. Query strings end up in logs and referrers.
  2. Tell the 429s apart. Spending this minute's credits is transient and wants a short retry; running out of the month's credits is not and wants an error. The body's code distinguishes them: insufficient_credits is the one not to retry. The logic is here.
  3. Surface from_clamped. Otherwise a plan boundary is indistinguishable from an empty corpus. Archive depth.
  4. Check partial and coverage before caching a negative. A 200 with few results and partial: true is a degraded index, not a quiet news day. Reading completeness.
  5. Switch on code, not on prose. Every error body is JSON with a stable code, including 401, 402 and 429. Error bodies.
  6. Ask for large pages. limit=100 where you can — each page is a billed request.
  7. Do not retry a 404 or a zero-result response. Neither is a failure.

If you are writing an agent rather than a client, you probably want MCP instead — the model reads the tool descriptions and makes these choices itself.

Comparing the five, honestly

Language Dependencies Async Timeout set by default Generated types available
curljq, for the examples that parse JSONNo — one call per invocationNo — add --max-time yourselfNo
TypeScriptNone for the client; openapi-typescript is dev-onlyYes, nativelyNo — add one explicitlyYes, from the spec
PythonhttpxOptional — sync and async variants shownYes, 30sNo — hand-write a TypedDict, or generate one separately
GoNone — standard library onlyVia goroutines, not built into the clientYes, 30sYes, via oapi-codegen
Rustreqwest, serde, tokio, thiserrorYes, natively (async fn)Yes, 30sNo — the structs above are hand-written

The honest takeaway is that the languages with a mainstream code generator for OpenAPI (TypeScript, Go) get typed requests almost for free, and the ones without a commonly-used one for this shape of spec (Python, Rust) are better served hand-writing the dozen fields these six endpoints actually return than pulling in a heavier generator dependency for it.

Questions this page actually gets

Why is there no official package on PyPI, npm or crates.io?
Because publishing one creates a second thing to version, and it would lag the API the moment a field is added to a response — the worked examples on this page are current with the OpenAPI document by construction, since they are read from it, not maintained separately against it.
Which language should I start with if I have no preference?
curl, to see the raw shapes and headers with nothing hiding them, then whichever of the other four matches the language your project is already in — the retry logic is the same decision in every one of them, just spelled differently.
Do any of these examples handle the MCP endpoint instead of REST?
Each language page ends with a short MCP example alongside its REST client, calling the same list_stories tool the REST examples call as /stories — useful for comparing the two surfaces directly rather than reading the MCP overview in the abstract.