API Abuse Calculator
Work out how long and how cheaply an attacker could scrape an enumerable endpoint, and whether the economics favour them.
Inputs
Time to Scrape the Dataset
0.00hours
Requests Required
20,000
Attacker Cost
$300.00
Attacker Cost per Record
$0.0001
Attacker Return on Investment
233,233%
Detection Before Completion
Likely — detection fires after about 200 requests, well before the scrape finishes
Step by step
Values used
Records reachable through the endpoint = 2,000,000 records; Records returned per response = 100 records; Rate limit per key or address = 5 req/s; Keys or proxies the attacker rotates = 500 identities; Cost per identity = 0.6000 USD; Detection probability per request = 0.5000 %; Resale or abuse value per record = 0.3500 USD
API Abuse
requests = ceil(records ÷ page size); elapsed = requests ÷ (rate limit × identities); attacker cost = identities × cost per identity.
Attacker economics
ROI = (records × value per record − attacker cost) ÷ attacker cost × 100; expected requests before detection = 100 ÷ per-request detection probability.
Time to Scrape the Dataset
= 0.00 hours
Requests Required
= 20,000
Attacker Cost
= 300.00
Attacker Cost per Record
= 0.0001
Attacker Return on Investment
= 233,233
Detection Before Completion
= Likely — detection fires after about 200 requests, well before the scrape finishes
How it works
Rate limits do not stop a scrape, they price it: the elapsed time is the request count divided by the aggregate rate the attacker can buy, and the cost is the price of the identities needed. Comparing that cost with the resale value of the dataset shows whether your controls have made the attack uneconomic or merely slow. Business-logic abuse does not appear in a vulnerability scan — the endpoint works exactly as designed — so the only way to justify pagination limits and anomaly detection is to show what the dataset costs to take.
Formulas
API Abuse
requests = ceil(records ÷ page size); elapsed = requests ÷ (rate limit × identities); attacker cost = identities × cost per identity.
- identities
- Rotated API keys, accounts or proxy addresses
- page size
- Records returned by one request
Attacker economics
ROI = (records × value per record − attacker cost) ÷ attacker cost × 100; expected requests before detection = 100 ÷ per-request detection probability.
- value per record
- What one record is worth resold or abused
- detection probability
- Chance any single request trips an alert
Frequently Asked Questions
How is API Abuse calculated?
requests = ceil(records ÷ page size); elapsed = requests ÷ (rate limit × identities); attacker cost = identities × cost per identity. Rate limits do not stop a scrape, they price it: the elapsed time is the request count divided by the aggregate rate the attacker can buy, and the cost is the price of the identities needed. Comparing that cost with the resale value of the dataset shows whether your controls have made the attack uneconomic or merely slow.
Why does API Abuse matter?
Business-logic abuse does not appear in a vulnerability scan — the endpoint works exactly as designed — so the only way to justify pagination limits and anomaly detection is to show what the dataset costs to take.
What values do I need to enter?
This calculator takes 7 inputs: Records reachable through the endpoint, Records returned per response, Rate limit per key or address, Keys or proxies the attacker rotates, Cost per identity, Detection probability per request, Resale or abuse value per record. The pre-filled defaults are a realistic starting point — replace them with figures from your own environment for a result you can act on.
What actually stops enumeration?
Removing the enumerable pattern first: unguessable identifiers, no sequential IDs, and object-level authorisation on every read. After that, cap total records per credential per day rather than requests per second, and alert on breadth of access — an account that has touched ten thousand distinct records is abnormal however slowly it did so.
You might also need
- API Rate Limiting Security CalculatorCommonly used together
- API Security Score CalculatorCommonly used together
- REST API Security CalculatorCommonly used together
- Webhook Retry CalculatorCommonly used together
- OWASP Risk CalculatorAlso in Web & API Security
- GraphQL Query Complexity CalculatorAlso in Web & API Security