zpi-sdk weekly downloads statistics
By zeative · npm · MCP servers
The TypeScript SDK for Zapi: call any scraper, stream, run bulk jobs, verify webhooks. Zero dependencies; Node, Bun, Deno, browsers and edge.
zpi-sdk has 10,289 recorded weekly downloads on npm, a decrease of 54.5% over the past 30 days, ranking #1246 of 3,247 tracked listings.
About zpi-sdk
<a href="https://www.npmjs.com/package/zpi-sdk"><img src="https://img.shields.io/npm/v/zpi-sdk.svg" alt="npm"></a> <a href="https://github.com/zeative/zpi-sdk/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-MIT-blue" alt="MIT"></a> <img src="https://img.shields.io/badge/dependencies-0-brightgreen" alt="zero dependencies">
Docs · Catalog · Get an API key · Migrating from 0.x
</div>Quick start
npm i zpi-sdk
export ZPI_API_KEY=zpi_...
import { Zpi } from "zpi-sdk";
const zpi = new Zpi();
const profile = await zpi.run("social-media:instagram-scraper/profile", { username: "instagram" });
That is the whole API for most apps. Every endpoint has an id, "category:scraper/endpoint", the same string as its URL (/v1/social-media:instagram-scraper/profile). Find ids in the catalog or from the terminal:
npx zpi search instagram
npx zpi schema social-media:instagram-scraper/profile
npx zpi run social-media:instagram-scraper/profile username=instagram
Recipes
Know what a call cost
const { data, meta } = await zpi.run("finance:goldprice/spot", { currency: "IDR" }).withMeta();
meta.cache; // "HIT" | "MISS" | …
meta.zap; // { cost: 2, remaining: 178 }
meta.rateLimit; // { minute: { limit, remaining }, month: { limit, remaining } }
meta.requestId; // matches the entry in your dashboard logs
const { quota } = await zpi.usage(); // free, works even when the quota is spent
console.log(`${quota.remaining} ${quota.unit} left until ${quota.resetAt}`);
Stream
const messages = [{ role: "user", content: "Why is the sky blue?" }];
for await (const chunk of zpi.stream("ai:copilot/chat", { messages })) {
console.log(chunk.event, chunk.data); // SSE events, NDJSON lines or text, one shape
}
const all = await zpi.stream("ai:copilot/chat", { messages }).text();
stream() sends stream: true for you on endpoints that support it.
Run many inputs at once (bulk)
const job = await zpi.bulk.run(
"social-media:instagram-scraper/profile",
[{ username: "instagram" }, { username: "zapi" }],
{ onProgress: (j) => console.log(`${j.succeeded + j.failed}/${j.total}`) },
);
for (const item of job.items) console.log(item.status, item.data ?? item.error);
Upload a file
Pass a File or Blob as a param and the request goes out as multipart:
const image = new File([await readFile("photo.jpg")], "photo.jpg", { type: "image/jpeg" });
const result = await zpi.run("ai:nsfw-checker/check", { image });
Verify webhooks
import { verifyWebhook } from "zpi-sdk/webhooks";
// Next.js route handler, Hono, Bun, Deno, Workers
export async function POST(request: Request) {
const event = await verifyWebhook(request, { secret: process.env.ZPI_WEBHOOK_SECRET! });
if (event.event === "bulk.completed") console.log(event.data.jobId, event.data.succeeded);
return new Response("ok");
}
On Express, read the body raw (express.raw({ type: "application/json" })) and pass { body: req.body, signature: req.headers["x-zpi-signature"] }.
Typed params
npx zpi types # scans your code for zpi.run("…") calls and writes zpi.d.ts
After that, ids autocomplete in your editor and params are checked:
await zpi.run("social-media:instagram-scraper/profile", {});
// ~~ Property 'username' is missing
Results stay any (a scraper's response is the upstream site's shape and can change). Annotate the variable, or add result: YourType to the entry in zpi.d.ts.
Browse the catalog
const { items } = await zpi.catalog.list({ q: "instagram" });
const { endpoints } = await zpi.catalog.get("social-media:instagram-scraper");
const { fields } = await zpi.catalog.schema("social-media:instagram-scraper/profile");
for await (const scraper of zpi.catalog.all({ category: "social-media" })) console.log(scraper.slug);
MCP
import { createMcpClient } from "zpi-sdk/mcp";
const mcp = createMcpClient();
const tools = await mcp.listTools();
const out = await mcp.callTool("search_scrapers", { query: "instagram" });
Errors
Every failure is a ZpiError with a stable code, status, retryable, and the server's own message. Subclasses tell you what to do:
import { ZpiError, ZpiPlanError, ZpiRateLimitError } from "zpi-sdk";
try {
await zpi.run("social-media:instagram-scraper/profile", { username: "instagram" });
} catch (e) {
if (e instanceof ZpiRateLimitError && e.code === "rate_limited") await sleep(e.retryAfter! * 1000);
else if (e instanceof ZpiPlanError) console.log(`Needs ${e.requiredPlan}: ${e.upgradeUrl}`);
else if (e instanceof ZpiError) console.log(e.code, e.message, e.requestId);
else throw e;
}
```…
Description from the npm listing.
- zapi
- zpi
- scraper
- scraping
- api
- sdk
- typescript
- mcp
- webhooks
README badge
Show your rank in a README or on your website. The badge updates automatically.
Charts
Images: 30d · 1y · all time · 1600×900 dark
Adoption over time
7/30/90-day growth
Ranking history
Listing placement
Listing placement
Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.
Each band is one page of 20. Weekly downloads on a linear scale. Placement is projected from weekly downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.
Recent observations
Full history (121)Similar npm MCP servers plugins
All 20 zpi-sdk alternativesData source
Weekly downloads (trailing 7 complete days) come from the official npm downloads API. Downloads include CI and mirrors and are not equivalent to installs or users. npm publishes no ratings.
Listing: https://www.npmjs.com/package/zpi-sdk. First seen Dec 2, 2026; last successful collection Dec 6, 2026. See the methodology.