Skip to main content
Reader provides first-party SDKs that wrap POST /v1/read, handle async job polling, parse the envelope contract, and throw typed errors.

Available SDKs

LanguagePackageInstall
JavaScript / TypeScript@vakra-dev/reader-jsnpm install @vakra-dev/reader-js
Pythonreader-pypip install reader-py

Quick comparison

import { ReaderClient } from "@vakra-dev/reader-js";

const client = new ReaderClient({ apiKey: process.env.READER_KEY! });

const result = await client.read({ url: "https://example.com" });
if (result.kind === "scrape") {
  console.log(result.data.markdown);
}
Both SDKs return a discriminated result: kind: "scrape" for single-URL requests, kind: "job" for batches and crawls. The SDK auto-polls async jobs to completion and collects all paginated results before returning.

Features

Featurereader-jsreader-py
Sync scrape
Batch & crawl auto-poll
Async client(native fetch is async)AsyncReaderClient
SSE streamingclient.stream(jobId)client.stream(jobId)
Typed errors (11 codes)
Auto-pagination of job results
Retry with exponential backoff
Honors Retry-After on 429

Error handling

Errors from the API are parsed into specific exception subclasses so you can branch on the error type rather than HTTP status:
import { InsufficientCreditsError, RateLimitedError } from "@vakra-dev/reader-js";

try {
  await client.read({ url });
} catch (err) {
  if (err instanceof InsufficientCreditsError) {
    console.error(`Need ${err.required}, have ${err.available}`);
  } else if (err instanceof RateLimitedError) {
    console.error(`Retry after ${err.retryAfterSeconds}s`);
  } else {
    throw err;
  }
}
The full catalog of 11 error codes is documented on the Errors page.

Next