Skip to main content

API Overview

Pry exposes a FastAPI JSON API. All endpoints are documented in the bundled OpenAPI spec (openapi.json in the repo root) and served live at /docs (Swagger UI) when the server is running.

Base URL​

EnvironmentBase URL
Local (bare metal)http://localhost:8002
Docker (host)https://api.pryscraper.com
ConfigurablePRY_URL env var

All request/response bodies are JSON. There are 251 registered paths across 64 tag groups.

Authentication​

Authentication is enforced by the PryHttpMiddleware and request_authorized. The policy is fail-closed:

  • PRY_API_KEY set → EVERY request (loopback or remote) must send Authorization: Bearer <key> (or an rmi JWT). Requests without a valid credential get 401 Unauthorized.
  • PRY_API_KEY unset → the API is only reachable from the loopback interface (127.0.0.1 / ::1). Every non-loopback request is rejected with 401, so a keyless instance is never exposed to the internet (e.g. when the Docker port mapping is public).
curl -X POST https://api.pryscraper.com/v1/scrape \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <your-api-key>" \
-d '{"url": "https://example.com"}'

Public paths that skip auth: /health, /live, /ready (liveness/readiness probes).

Proxy/Tor configuration endpoints (/v1/proxy/configure, POST /v1/config, /v1/config/profile/tor) are additionally guarded: remote clients that cannot present the key are rejected.

Rate limits​

  • Token bucket per IP, default 120 requests/minute (PRY_RATE_LIMIT_RPM).
  • Exceeding the limit returns 429 Too Many Requests with:
    • Retry-After response header (seconds)
    • x-ratelimit-limit, x-ratelimit-remaining, x-ratelimit-reset headers
    • A body containing retry_after
{
"type": "/errors/rate_limit_exceeded",
"title": "Too Many Requests",
"status": 429,
"detail": "Rate limit exceeded",
"request_id": "a1b2c3d4e5f6",
"instance": "/v1/scrape",
"timestamp": "2026-08-16T12:00:00.000000+00:00",
"code": "rate_limit_exceeded",
"retry_after": 1
}

Error format​

Errors follow RFC 7807 Problem Details, returned by the global exception handler:

{
"type": "/errors/unauthorized",
"title": "Unauthorized",
"status": 401,
"detail": "Invalid or missing API key",
"request_id": "a1b2c3d4e5f6",
"instance": "https://api.pryscraper.com/v1/scrape",
"timestamp": "2026-08-16T12:00:00.000000+00:00",
"code": "unauthorized"
}
FieldMeaning
typeError type URI (/errors/<slug>, or about:blank for 500s)
titleHuman-readable title
statusHTTP status code
detailHuman-readable detail
request_idCorrelation ID (also echoed in the x-request-id response header)
instanceThe request URL that produced the error
timestampISO 8601 UTC timestamp
codeMachine-readable slug of the error

Common status codes:

CodeMeaning
400Bad request (invalid input)
401Unauthorized — missing/invalid API key, or remote client with no key set
403Forbidden
404Not found (unknown path)
409Conflict
422Validation error (Pydantic)
429Rate limit exceeded
500Internal server error (detail is hidden, use request_id)
502 / 503Upstream / service unavailable
402Payment required — only when x402 gating is enabled (see x402 Pay-per-call)

Health & monitoring endpoints​

EndpointPurpose
GET /healthService health + cache stats + active sessions
GET /liveLiveness probe
GET /readyReadiness probe
GET /metricsPrometheus metrics
GET /v0/statsBasic stats

Request IDs​

Every request gets a request_id. Send your own with the x-request-id header to correlate logs end-to-end; otherwise a UUID is generated.

API groups​

The API is organized into tag groups — the most relevant for day-to-day use:

TagKey endpoints
Health/health, /live, /ready
Scraping/v1/scrape, /v1/crawl, /v1/map, /v1/batch, /v1/ultimate-scrape, /v1/detect-block
Extraction/v1/extract, /v1/extract/css, /v1/extract/llm, /v1/parse, /v1/shadow-dom, /v1/schema
Automation/v1/automate, /v1/screenshot, /v1/session/*, /v1/capture/*
x402/v1/x402/pricing, /v1/x402/pay, /v1/x402/verify, /v1/x402/payment, /v1/x402/require-payment
Batch/v1/batch, /v1/batch-file
Monitoring/v1/watch, /v1/monitor, /v1/freshness/*, /v1/diff
Analysis/v1/vision, /v1/summarize, /v1/categorize, /v1/compare
Sessions/v1/session/create, /v1/session/save, /v1/session/restore, /v1/session/destroy, /v1/sessions
MCP/mcp/tools, /mcp/call (see MCP Integration for the supported transports)

All routes by data domain​

Every domain route below is a real endpoint from routers/*.py — grouped by the Data Domains sections. Core platform routes (scraping, extraction, monitoring, GDPR, pipelines, …) are listed in the tag table above; the complete machine-readable surface ships as openapi.json in the repo root.

Crypto Market — 3 routes​

See Crypto Market.

MethodPathSummary
GET/v1/crypto/token-launchesNew tokens / pairs / trending
GET/v1/crypto/cex-listingsCEX listing / delisting signals
GET/v1/crypto/token-security/{chain}/{address}Rug / honeypot security scan

Marketplace — 7 routes​

See Marketplace.

MethodPathSummary
POST/v1/actors/createCreate a marketplace actor
GET/v1/actorsList actors (filter by visibility / tag)
POST/v1/actors/{actor_id}/runRun an actor
GET/v1/marketplace/amazon/product/{asin}Amazon product by ASIN
GET/v1/marketplace/amazon/searchAmazon keyword search
GET/v1/marketplace/walmart/product/{product_id}Walmart product
GET/v1/marketplace/tiktok/trendingTikTok Shop trending

See Legal & Public Records.

MethodPathSummary
GET/v1/legal/dockets/searchCourtListener docket search
GET/v1/legal/dockets/{docket_id}Single docket lookup
GET/v1/legal/sec/searchSEC EDGAR filing search
GET/v1/legal/sec/insider/{ticker}Form 4 insider trades
GET/v1/legal/sanctions/{name}OFAC SDN name screening

Real Estate — 3 routes​

See Real Estate.

MethodPathSummary
GET/v1/realestate/listing/{zillow_id}Zillow listing lookup
GET/v1/realestate/searchListings by location / status
GET/v1/realestate/property/{county}/{parcel_id}County property record

Jobs — 6 routes​

See Jobs.

MethodPathSummary
GET/v1/job/{job_id}Async job status + result
GET/v1/jobsList jobs in a Pryfile
GET/v1/jobs/searchCross-board keyword search
GET/v1/jobs/salary/{company}Levels.fyi salary bands
GET/v1/jobs/{board}/{company}ATS job listings
GET/v1/jobs/{board}/job/{job_id}One ATS job's full detail

Travel — 3 routes​

See Travel.

MethodPathSummary
GET/v1/travel/flights/gridCheapest flight per day over a range
GET/v1/travel/flights/searchOne-way flight options
GET/v1/travel/hotels/ratesPer-night hotel rates

Attention & SEO — 7 routes​

See Attention & SEO.

MethodPathSummary
GET/v1/attention/serpGoogle SERP (organic + AI Overview + PAA)
GET/v1/attention/trendsGoogle Trends interest
GET/v1/attention/adsMeta Ad Library search
POST/v1/seo/analyzeSEO element analysis
POST/v1/seo/trackSEO change tracking
POST/v1/seo/keywordsKeyword presence / density
POST/v1/seoLegacy SEO analysis (extraction router)

Local Business — 3 routes​

See Local Business.

MethodPathSummary
GET/v1/local/places/searchGoogle Maps business search
GET/v1/local/places/{place_id}Place detail + popular times
GET/v1/local/reviews/{place_id}Google / Yelp review history

Document Parsing — 6 routes​

See Document Parsing.

MethodPathSummary
POST/v1/parseParse PDF/DOCX/OCR/CSV/JSON
POST/v1/markdownMarkdown with content filtering
POST/v1/shadow-domShadow DOM extraction
POST/v1/pdf/extractPDF table extraction
POST/v1/ocr/extractImage OCR
POST/v1/extract-tableHTML table extraction

Browser Automation — 15 routes​

See Browser Automation.

MethodPathSummary
POST/v1/automateStep-based browser automation
POST/v1/screenshotScreenshot → base64 PNG
POST/v1/session/createCreate persistent session
POST/v1/session/destroyDestroy session
GET/v1/sessionsList sessions
POST/v1/session/saveSave session state to disk
POST/v1/session/restoreRestore saved session
POST/v1/record/startStart recording browser actions
POST/v1/record/stepRecord an action step
POST/v1/record/exportExport recording as script
POST/v1/record/clearClear recorded actions
POST/v1/capture/lazyLazy-load / infinite-scroll capture
POST/v1/capture/networkNetwork / hidden-API capture
POST/v1/ws/scrapeWebSocket data capture
POST/v1/sse/scrapeServer-Sent Events capture

Sports Data — 13 routes​

See Sports Betting.

MethodPathSummary
GET/v1/sports/oddsLive betting odds across bookmakers
GET/v1/sports/odds/{event_id}Multi-sportsbook odds comparison
GET/v1/sports/stats/{player}Player stats (ESPN)
GET/v1/sports/scoresFinal / live scores for a day
GET/v1/sports/arbitrageGuaranteed-profit arbitrage across bookmakers
GET/v1/sports/plus-evPositive-EV betting vs a sharp book
GET/v1/sports/propsPlayer prop betting lines
GET/v1/sports/injuriesInjury report for a sport or team
GET/v1/sports/liveLive in-play odds
GET/v1/sports/historicalHistorical betting odds for past events
GET/v1/sports/betting-percentagesPublic betting percentages (bets & money)
GET/v1/sports/sharp-consensusSharp consensus lines (CLV-aware)
GET/v1/sports/alertsMoney-printer alerts (line moves, steam, CLV)

Healthcare Data — 4 routes​

See Healthcare.

MethodPathSummary
GET/v1/health/trials/searchClinical trial keyword search
GET/v1/health/trials/{nct_id}One clinical trial by NCT id
GET/v1/health/drug/{drug}US drug price (NADAC + GoodRx fallback)
GET/v1/health/insurance/quotesInsurance quote feasibility + public rate tables

Commerce Data — 5 routes​

See Commerce Long-Tail.

MethodPathSummary
GET/v1/commerce/searchProduct search across eBay/Etsy/AliExpress/Shopify
GET/v1/commerce/platformsList supported marketplaces / platforms
GET/v1/commerce/syncCommerce sync status / targets
GET/v1/commerce/{marketplace}/{product_id}Single product by id
GET/v1/social/{platform}/{handle}Public follower metrics + fake-follower estimate

Government Data — 3 routes​

See Government Data.

MethodPathSummary
GET/v1/gov/procurement/searchFederal procurement opportunities (SAM.gov)
GET/v1/gov/procurement/{notice_id}Single procurement notice
GET/v1/gov/recalls/searchCPSC / FDA product recalls

IP Data — 4 routes​

See IP Data.

MethodPathSummary
GET/v1/ip/patents/searchUS patent keyword search (Google Patents)
GET/v1/ip/patents/{patent_id}Single patent detail
GET/v1/ip/trademarks/searchUS trademark search (USPTO)
GET/v1/ip/companies/searchState company registry search

Climate Data — 2 routes​

See Climate / Weather & Agri.

MethodPathSummary
GET/v1/climate/weatherNOAA NWS current weather + short-range forecast
GET/v1/climate/agriUSDA NASS crop prices / agri conditions

Research Data — 2 routes​

See Research & Academic.

MethodPathSummary
GET/v1/research/papersAcademic paper / preprint search (OpenAlex + Crossref)
GET/v1/research/domainDomain intelligence report (RDAP WHOIS + crt.sh)

Total: 91 domain routes across the 17 data domains (the full API has 251 registered paths).

Next steps​