Node.js / TypeScript
RankParse in Node.js.
All RankParse endpoints are plain HTTP GET (and a few POSTs). Use native fetch, axios, got, or undici — no SDK install required. Works in Node.js, Deno, Bun, Edge Runtime, and Cloudflare Workers.
Works everywhere fetch works
| Runtime | Recommended client |
|---|---|
| Node.js 18+ | native fetch or undici |
| Next.js (App Router) | native fetch with next: { revalidate } |
| Cloudflare Workers | native fetch (no node_modules needed) |
| Bun | native fetch |
| Deno | native fetch |
| AWS Lambda / Vercel Edge | native fetch or axios |
Example: fetch wrapper
A minimal typed wrapper around the RankParse REST API. Copy-paste into your project.
// Install: npm install rankparse
// (SDK not yet published — use fetch directly in the meantime)
const RANKPARSE_KEY = process.env.RANKPARSE_API_KEY;
const BASE = "https://api.rankparse.com/v1";
async function rp(path, params = {}) {
const url = new URL(`${BASE}${path}`);
Object.entries(params).forEach(([k, v]) => url.searchParams.set(k, String(v)));
const res = await fetch(url, {
headers: { "X-API-Key": RANKPARSE_KEY },
});
if (!res.ok) {
const err = await res.json().catch(() => ({}));
throw new Error(`RankParse ${res.status}: ${err.error ?? res.statusText}`);
}
return res.json();
}
// Domain authority
const { data: authority } = await rp("/domain-authority", { domain: "stripe.com" });
console.log(authority.authority_score); // 91
// Backlinks
const { data: links } = await rp("/backlinks", { domain: "stripe.com", limit: 10 });
links.forEach(({ from_url, anchor_text }) => console.log(from_url, "→", anchor_text));
// Batch
const { data: batch } = await rp("/batch", {});
// (POST endpoints use fetch with method: "POST")Official npm package
A typed rankparse npm package with full TypeScript definitions is in progress. In the meantime, the REST API is simple enough that a fetch wrapper (see above) covers all use cases. The OpenAPI spec can be used to auto-generate a typed client with openapi-typescript.