TypeScript · npm install serpkite
Node.js / TypeScript + SerpKite
The official SerpKite TypeScript SDK: zero dependencies, fully typed responses, automatic retries on 429 and 5xx with Retry-After, and every vertical. Runs on Node 18+, Bun, Deno and edge runtimes.
Overview
What Node.js / TypeScript is, and where SerpKite fits
npm install serpkite gives you a typed SerpKite client built on fetch, so it runs on Node 18+, Bun, Deno and edge runtimes with no dependencies.
Keep your key on the server. CORS is enabled for the API, but a key in browser code can be copied by anyone.
Setup
Set it up in 3 steps
-
1
Get an API key
Sign up (no card), create a key in the dashboard and export it as
SERPKITE_API_KEY. New accounts get 2,500 free credits, then 1,000 every month.export SERPKITE_API_KEY=skt_live_… -
2
Install the SDK
Works with npm, pnpm, yarn and bun.
npm install serpkite -
3
Search
await sk.search({ q })returns typed results;res.meta.credits_usedis what the call cost.
Code
Example
import { SerpKite, SerpKiteError } from "serpkite";
// Reads SERPKITE_API_KEY; or new SerpKite({ apiKey, baseUrl, timeoutMs, maxRetries })
const sk = new SerpKite();
try {
const res = await sk.search({ q: "best espresso machine 2026", country: "us", language: "en" });
for (const r of res.results.slice(0, 5)) console.log(r.position, r.domain, r.title);
console.log(`used ${res.meta.credits_used} credits`);
} catch (err) {
if (err instanceof SerpKiteError) console.error(err.status, err.code, err.message, err.requestId);
else throw err;
}
// Markdown for an LLM prompt (returns a string)
const md = await sk.search({ q: "best espresso machine 2026", format: "markdown" });
// Other verticals
const news = await sk.news({ q: "espresso machine recall", time: "week" });
const places = await sk.maps({ q: "coffee roasters", location: "Berlin, Germany" });Balance and limits
Check your balance before a big job
sk.account() (GET /v1/account) is free and returns your balance, rate limit, plan and this month's usage. Use it to fail fast before a large batch.
const account = await sk.account();
console.log(account);
const { batches } = await sk.batches.create({
endpoint: "search",
requests: [{ q: "crm for startups" }, { q: "crm pricing" }],
});
const done = await sk.batches.wait(batches[0].id); // polls until done or failed
console.log(done.status, done.credits_used);FAQ
Node.js / TypeScript and SerpKite: common questions
Keep exploring
Related APIs and integrations
Start building
Give your Node.js / TypeScript project Google search
2,500 free credits, then 1,000 every month. No credit card.