Skip to main content

Official Python SDK for the RankParse SEO API

Project description

rankparse

Official Python SDK for the RankParse SEO API.

RankParse gives you cheap, programmatic access to 25+ SEO signals — backlinks, domain authority, tech stack, page metadata, and more — powered by pre-processed Common Crawl data.

Install

pip install rankparse

Requires Python 3.9+ and installs httpx automatically.

Quick start

Sync:

from rankparse import RankParseClient

client = RankParseClient(api_key="rp_...")

result = client.domain_authority("github.com")
print(result["data"])
# {"domain": "github.com", "score": 94, "backlinks": 12400000, ...}

Async:

import asyncio
from rankparse import AsyncRankParseClient

async def main():
    client = AsyncRankParseClient(api_key="rp_...")
    result = await client.domain_authority("github.com")
    print(result["data"])

asyncio.run(main())

Context managers (recommended for connection cleanup):

with RankParseClient(api_key="rp_...") as client:
    da = client.domain_authority("example.com")
    bl = client.backlinks("example.com", limit=50)
async with AsyncRankParseClient(api_key="rp_...") as client:
    da = await client.domain_authority("example.com")

Error handling

from rankparse import RankParseClient
from rankparse.errors import (
    AuthError,
    InsufficientCreditsError,
    NotFoundError,
    RateLimitError,
    APIError,
    RankParseError,
)

client = RankParseClient(api_key="rp_...")

try:
    result = client.backlinks("example.com")
except AuthError:
    print("Invalid API key")
except InsufficientCreditsError:
    print("Out of credits — buy more at rankparse.com/dashboard")
except RateLimitError:
    print("Rate limited — slow down")
except NotFoundError:
    print("Resource not found")
except APIError as e:
    print(f"API error {e.status}: {e}")
except RankParseError as e:
    print(f"Unexpected error: {e}")

All exceptions expose .status (HTTP status code) and .code (API error code string).

Response envelope

Every response is a dict with this shape:

{
  "data": [...],
  "credits_used": 2,
  "credits_remaining": 998,
  "domain": "example.com",
  "total": 1234,
  "limit": 100,
  "offset": 0
}

Fields domain, url, total, limit, and offset are only present when relevant.

All methods

Link graph

Method Description Key params Credits
backlinks(domain) Inbound links to this domain limit, offset, sort, from_domain, link_type 2
referring_domains(domain) Unique domains linking to this domain limit, offset 2
outbound_links(domain) Links pointing out from this domain limit 2
anchor_text(domain) Anchor text distribution for inbound links limit 2
link_velocity(domain) Rate of link acquisition over time 0 (v1 stub)
new_links(domain) Recently acquired links 0 (v1 stub)
lost_links(domain) Recently lost links 0 (v1 stub)
link_intersect(domain_a, domain_b) Domains linking to both targets limit 5

Domain intelligence

Method Description Key params Credits
domain_authority(domain) DA score, backlink count, RDAP info, Tranco rank 1
domain_rank(domain) Popularity rank 2
domain_overlap(domains) Shared linking domains across a list limit 5
similar_domains(domain) Domains with similar link profiles limit 5
competitor_gap(domain, vs) Links pointing to competitor but not you limit 5
link_audit(domain) Toxic/spammy link signals 2
site_explorer(domain) Full domain overview limit 10

Page / site

Method Description Key params Credits
page_seo(url) On-page SEO signals 2
page_performance(url) Google PageSpeed Insights + Core Web Vitals strategy 3
tech_stack(url) Technologies detected on the page 2
site_health(domain) Crawl errors, redirect chains, status codes 2
sitemap(domain) Sitemap URLs 2
crawl_history(domain) Crawl timestamps and HTTP status history limit, offset 2
schema_markup(url) Structured data / JSON-LD 0 (v1 stub)
internal_links(url) Internal link graph for a page limit, offset 0 (v1 stub)
top_pages(domain) Most-linked pages on a domain limit 2

Batch

Method Description Credits
batch(requests) Run multiple endpoint calls in one request Sum of individual costs
result = client.batch([
    {"endpoint": "domain-authority", "domain": "github.com"},
    {"endpoint": "backlinks", "domain": "github.com", "limit": 10},
])

Dashboard (no credits)

Method Description
me() Your profile and credit balance
credits() Current credit balance
keys() List your API keys (returns a plain list)
create_key(name) Create a new API key (returns raw key once)
revoke_key(key_id) Revoke an API key
usage(limit, offset) Paginated usage logs
checkout(pack_id) Create a Stripe checkout session for credit top-up

Configuration

client = RankParseClient(
    api_key="rp_...",
    base_url="https://api.rankparse.com/v1",  # default
    timeout=30.0,  # seconds, default 30
)

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rankparse-0.1.0.tar.gz (6.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rankparse-0.1.0-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

File details

Details for the file rankparse-0.1.0.tar.gz.

File metadata

  • Download URL: rankparse-0.1.0.tar.gz
  • Upload date:
  • Size: 6.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for rankparse-0.1.0.tar.gz
Algorithm Hash digest
SHA256 7ea78eb8ee2f11d4f7983b7db015437fb4ea2ca37e0ec276b53c7c42bb8d8d4b
MD5 a9f078a10057133038281bdc03d81184
BLAKE2b-256 18afa599e1c5fe2a1552f173b10eac43e4d84c7e68cb524c6c891ede26b86769

See more details on using hashes here.

Provenance

The following attestation bundles were made for rankparse-0.1.0.tar.gz:

Publisher: publish.yml on abhibavishi/rankparse-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rankparse-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: rankparse-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 7.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for rankparse-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 64a1f2f5e1352a389e72bc7d9ed82f7fc619c89d2eaaba7da6723dccec14b047
MD5 0b5d4ae2348535870e0c6f1f28d7d3c6
BLAKE2b-256 8f1e34f98ff26055704ce2f36f7507401be11ae083098125d5435ba6685aba5a

See more details on using hashes here.

Provenance

The following attestation bundles were made for rankparse-0.1.0-py3-none-any.whl:

Publisher: publish.yml on abhibavishi/rankparse-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page