Introduction
The PrivaScan API gives you programmatic access to smart contract risk scores for EVM privacy protocols. One request returns a deterministic composite score (0-100), a letter grade, and six sub-scores covering code, ownership, liquidity, audits, compliance, and governance. No SDK required.
Authentication
Pass your API key in the X-API-Key header. Without a key you get 10 requests per hour based on your IP address. A free key gives you 500 per hour, isolated to your key so other users never affect your quota. Generate one at privascan.xyz/keys.
Rate Limits
Two windows run simultaneously: per-minute prevents burst abuse, per-hour caps sustained usage. Both must be within limit for a request to succeed. On 429, check the Retry-After header for seconds to wait.
API Key Usage Credits
Every API request consumes 1 credit from your hourly allowance. Credits reset one hour after your first request in that window. Here is what counts and what does not:
Track real-time usage at privascan.xyz/usage.
Endpoint Index
All available endpoints at a glance:
/score/{chain}/{address}/score/{chain}/{address}/history/score/request/protocols//protocols/{slug}/keys/generate/keys/usageError Reference
All errors return a JSON object with a single detail field containing a human-readable explanation. Use the HTTP status code to identify the error class.
Get Contract Risk Score
/api/v1/score/{chain}/{address}The primary endpoint. Runs a full 6-dimension risk analysis on any EVM contract and returns a composite score from 0 to 100 (lower is safer), a letter grade A through F, and detailed per-dimension sub-scores. First-time scans take 30-60 seconds while Slither analyses the bytecode. Results are cached for 1 hour after that.
chain*EVM chain slug. One of: ethereum, arbitrum, optimism, base, polygon, bsc, avalanche
address*Contract address. 0x-prefixed EVM address, 42 characters. Lowercased automatically.
Get Score History
/api/v1/score/{chain}/{address}/historyReturns historical score snapshots for a contract address, newest first. Curated protocols accumulate 4 snapshots per day (rescored every 6 hours). Community scans accumulate only on request. Use the limit query param to control how many you get back.
limitNumber of snapshots to return. Default: 10. Maximum: 30.
Queue Background Scan
/api/v1/score/requestDispatches a Slither analysis to the background worker queue and returns a task ID immediately without waiting for the result. Poll the task endpoint to check completion. Useful when you want to trigger a rescore without blocking your application.
List Privacy Protocols
/api/v1/protocols/Returns all 14 curated protocols with metadata and their latest ecosystem scores. These protocols are manually vetted, have verified source code, and are automatically rescored every 6 hours. Results include the aggregated ecosystem grade across all deployed contracts.
Get Protocol Detail
/api/v1/protocols/{slug}Full protocol metadata, the complete list of all deployed contracts across all chains, and the latest ecosystem-level score. Use this to get contract addresses for individual scoring via the GET /score endpoint.
slug*Protocol slug. Examples: railgun, aztec, privacy-pools, hinkal, tornado-cash
Generate API Key
/api/v1/keys/generateGenerates a new ps_ prefixed API key. The raw key is returned exactly once and is never stored on the server. Save it immediately. If you lose it, generate a new one. Free keys require Telegram verification first — use the guided flow at privascan.xyz/keys.
Check API Usage
/api/v1/keys/usageReturns detailed usage stats for an API key: credits used this hour, remaining credits, time until the window resets, all-time request count, and a daily breakdown for the last 7 days. Or use the visual usage dashboard.
key*Your full API key starting with ps_. Passed as a URL query parameter.
Grade Reference
Supported Chains
ethereumEthereum Mainnet1arbitrumArbitrum One42161optimismOptimism Mainnet10baseBase8453polygonPolygon PoS137bscBNB Smart Chain56avalancheAvalanche C-Chain43114Response Schema
Complete shape of the score response object: