RankParse

Node.js SDK

Official TypeScript SDK for the RankParse API. Zero dependencies, dual ESM/CJS, typed responses.

Installation

npm install rankparse

Requires Node.js 18+. No runtime dependencies — uses native fetch.

Quick start

import { RankParse } from 'rankparse';

const client = new RankParse({ apiKey: process.env.RANKPARSE_API_KEY! });

const result = await client.domainAuthority('github.com');
console.log(result.data.score);          // 94
console.log(result.credits_remaining);  // 9995

CommonJS

const { RankParse } = require('rankparse');

const client = new RankParse({ apiKey: process.env.RANKPARSE_API_KEY });

Configuration

const client = new RankParse({
  apiKey: 'rp_...',
  baseUrl: 'https://api.rankparse.com/v1', // optional override
  timeout: 30_000,                          // ms, default 30s
});

Error handling

import { RankParse, AuthError, InsufficientCreditsError, RateLimitError } from 'rankparse';

try {
  const result = await client.backlinks('example.com');
} catch (err) {
  if (err instanceof AuthError) {
    // Invalid API key
  } else if (err instanceof InsufficientCreditsError) {
    // Top up at rankparse.com/dashboard
  } else if (err instanceof RateLimitError) {
    // Back off and retry
  }
}

All methods

MethodEndpointCredits
backlinks(domain, opts?)GET /backlinks2
referringDomains(domain, opts?)GET /referring-domains2
outboundLinks(domain, opts?)GET /outbound-links2
anchorText(domain, opts?)GET /anchor-text2
linkIntersect(domainA, domainB, opts?)GET /link-intersect5
linkVelocity(domain)GET /link-velocity0 (v2)
newLinks(domain)GET /new-links0 (v2)
lostLinks(domain)GET /lost-links0 (v2)

Domain intelligence

MethodEndpointCredits
domainAuthority(domain)GET /domain-authority1
domainRank(domain)GET /domain-rank2
domainOverlap(domains[], opts?)GET /domain-overlap5
similarDomains(domain, opts?)GET /similar-domains5
competitorGap(domain, vs, opts?)GET /competitor-gap5
linkAudit(domain)GET /link-audit8
siteExplorer(domain, opts?)GET /site-explorer10

Page & site

MethodEndpointCredits
pageSeo(url)GET /page-seo3
pagePerformance(url, opts?)GET /page-performance3
techStack(url)GET /tech-stack2
siteHealth(domain)GET /site-health2
sitemap(domain)GET /sitemap2
crawlHistory(domain, opts?)GET /crawl-history2
topPages(domain, opts?)GET /top-pages2
schemaMarkup(url)GET /schema-markup0 (v2)
internalLinks(url, opts?)GET /internal-links0 (v2)

Batch & dashboard

MethodDescription
batch(requests[])Run up to 50 requests in one call
me()Current user profile + credit balance
credits()Credit balance
keys()List API keys
createKey(name?)Create a new API key
revokeKey(keyId)Revoke an API key
usage(opts?)Paginated usage logs

Pagination

All list endpoints accept limit (default 100, max 1000) and offset:

const page1 = await client.backlinks('example.com', { limit: 100, offset: 0 });
const page2 = await client.backlinks('example.com', { limit: 100, offset: 100 });

Batch requests

const results = await client.batch([
  { endpoint: 'domain-authority', domain: 'stripe.com' },
  { endpoint: 'domain-authority', domain: 'github.com' },
  { endpoint: 'backlinks', domain: 'vercel.com', limit: 10 },
]);

Source & issues

GitHub: abhibavishi/rankparse-node

On this page