☰ Getting started / Quickstart
Docs / Getting started
Quickstart
zpi-sdk is a universal, zero-runtime-dependency TypeScript SDK for Zapi. Dual ESM + CJS build, runs on Node ≥ 20, Bun, Deno, and in the browser behind a proxy. MIT-licensed.zpi-sdk is a zero-dependency TypeScript SDK for Zapi. Node ≥ 20, Bun, Deno and the browser behind a proxy. MIT.
Install
$ npm i zpi-sdkYour first call
Create a client with your API key and call run() with a project key in category:scraper format.
quickstart.ts
import { ZpiClient } from "zpi-sdk"; const client = new ZpiClient({ apiKey: "zpi_..." }); // projectKey is "category:scraper" — no HTTP method needed,// the SDK detects and remembers the right verb per endpointconst profile = await client.run("social:instagram", "profile", { username: "instagram",});import { ZpiClient } from "zpi-sdk";const client = new ZpiClient({ apiKey: "zpi_..."});const profile = await client.run( "social:instagram", "profile", { username: "instagram" });Entry points
| Entry point | What it is |
|---|---|
| zpi-sdk | Core client: run(), stream(), bulk, catalog, errors. |
| zpi-sdk/mcp | Isolated MCP client for the remote Zapi MCP server. |
| zpi-sdk/webhooks | Verify and parse signed incoming webhook deliveries. |
| zpi-sdk/codegen | Node-only type generator for the scraper catalogue. |
| zpi (bin) | CLI, currently the codegen command. |
zpi-sdk
run(), stream(), bulk, catalog, errors
zpi-sdk/mcp
MCP client for the Zapi server
zpi-sdk/webhooks
Verify signed webhook deliveries
zpi-sdk/codegen
Type generator for the catalogue
zpi (bin)
CLI, currently codegen
Edit this page on GitHubWas this page helpful? ·
Docs menu