Node.js / TypeScript
RankParse in Node.js.
Official TypeScript SDK. Zero runtime dependencies; uses native fetch. Dual ESM and CommonJS. Fully typed responses. Works in Node.js 18+, Bun, Deno, and Edge runtimes.
Installation
npm install rankparse
Requires Node.js 18+. No runtime dependencies.
Quick start
Import the client, pass your API key, and start calling endpoints.
import { RankParse } from 'rankparse';
const client = new RankParse({ apiKey: process.env.RANKPARSE_API_KEY! });
// Domain authority
const result = await client.domainAuthority('stripe.com');
console.log(result.data.score); // 91
console.log(result.credits_remaining); // 9999
// Backlinks
const backlinks = await client.backlinks('stripe.com', { limit: 10 });
for (const link of backlinks.data) {
console.log(link.from_url, '→', link.anchor_text);
}
// Batch: backlinks for up to 50 domains in one call (2 credits per successful domain)
const batch = await client.batch(['stripe.com', 'github.com', 'vercel.com']);
for (const item of batch.data) {
console.log(item.domain, item.success ? item.total : item.error);
}What's included
| Feature | Details |
|---|---|
| All 25+ endpoints | Link graph, domain intelligence, page & site, batch, dashboard |
| TypeScript types | Every response shape is typed, no any |
| ESM + CommonJS | Works with import and require() |
| Error classes | AuthError, InsufficientCreditsError, RateLimitError, NotFoundError |
| Timeout control | Configurable per-client, default 30s |
| Zero dependencies | Uses native fetch available in Node 18+ |
Full SDK reference
See the Node.js SDK docs for the complete method reference, error handling guide, pagination, and batch examples. Source on GitHub.