Async proxy endpoint
Proxy RankParse behind your own FastAPI endpoint. Add your own auth, caching, and rate limiting without changing client code.
FastAPI Integration
Call RankParse from async FastAPI endpoints using httpx. Add domain authority, tech stack detection, and backlink data to any Python backend in 10 minutes.
Patterns
Proxy RankParse behind your own FastAPI endpoint. Add your own auth, caching, and rate limiting without changing client code.
Use asyncio.gather() to call multiple RankParse endpoints in parallel: authority + tech stack in one response time.
Use FastAPI BackgroundTasks or Celery to enrich a domain list asynchronously after a form submission.
Wrap RankParse JSON in Pydantic models for type-safe responses and auto-generated OpenAPI docs.
Example
Async domain info endpoint that calls authority and tech stack in parallel.
# main.py: FastAPI app with RankParse integration
import asyncio
from fastapi import FastAPI, Query, HTTPException
from rankparse import AsyncRankParseClient
app = FastAPI()
client = AsyncRankParseClient(api_key="rp_your_key")
@app.get("/domain-info")
async def domain_info(domain: str = Query(..., description="Domain to analyze")):
"""Return authority score and tech stack for a domain."""
try:
authority, tech = await asyncio.gather(
client.domain_authority(domain),
client.tech_stack(domain),
)
except Exception as e:
raise HTTPException(status_code=502, detail=str(e))
return {
"domain": domain,
"authority_score": authority["data"]["authority_score"],
"referring_domains": authority["data"]["referring_domains"],
"tech_stack": [t["name"] for t in tech["data"].get("technologies", [])],
}
@app.get("/backlinks")
async def backlinks(
domain: str = Query(...),
limit: int = Query(20, ge=1, le=1000),
):
"""Proxy the RankParse backlinks endpoint."""
result = await client.backlinks(domain, limit=limit)
return result["data"]Your stack
Start free
100 free credits. No credit card. 10-minute integration.