Bot protection

What Is API Abuse? How Bots Exploit APIs

API abuse is the automated or malicious use of valid API functionality in ways that create fraud, cost, disruption, or data loss. It often looks syntactically valid, so stopping it requires behavioral and application context.

13 min read
In short: API abuse is the automated or malicious use of valid API functionality in ways that create fraud, cost, disruption, or data loss. It often looks syntactically valid, so stopping it requires behavioral and application context.

What is API abuse?

API abuse is the use of an API in a way that violates its intended business purpose, even when individual requests are technically valid. Attackers automate ordinary features—login, search, checkout, signup, password reset, or content creation—to commit fraud, extract data, exhaust resources, or disrupt legitimate users.

Unlike an injection vulnerability, abuse may not require malformed input or broken code. A login endpoint is supposed to check passwords; a bot turns that feature into credential stuffing by trying stolen credentials across many accounts. A reservation endpoint is supposed to hold inventory; automation can reserve every available slot and let the holds expire.

The important unit of analysis is the operation and its business effect, not just the request. A 200 response, valid credentials, and well-formed JSON do not prove legitimate intent.

API abuse overlaps with, but is not identical to, conventional API vulnerabilities. Broken object-level authorization lets a caller access an object they should never reach. Abuse can happen after every authorization check succeeds because an allowed operation is repeated, coordinated, or used for an unintended outcome. The OWASP API Security Top 10 treats unrestricted resource consumption and unrestricted access to sensitive business flows as distinct API risks.

Common API abuse attacks

Start by mapping each pattern to the operation it exploits, the evidence it produces, and the control closest to the business resource:

PatternAbused operationUseful signalsPrimary controls
Credential stuffingLogin or token issuance

One credential pair per account, elevated failures, known-compromised passwords, device reuse

MFA, breached-password screening, account- and device-aware login limits

Account enumerationLogin, signup, recovery, or profile lookup

Systematic identifiers, response or timing differences, high miss rate

Uniform responses, authorization, identifier-aware limits
ScrapingSearch, listing, profile, pricing, or content retrieval

Sequential traversal, exhaustive pagination, low interaction diversity

Access controls, query budgets, pagination caps, bot controls
Inventory hoardingCart, reservation, ticket, or appointment hold

Many holds, few purchases, repeated expiry, linked accounts or devices

Short expiries, per-identity caps, checkout verification
Fake account creationSignup and verification

Identity reuse, disposable attributes, device clusters, immediate promotional activity

Verification, velocity controls, delayed privileges, promotion limits

Cost exhaustionSearch, export, messaging, image, or AI inference

Cost growth detached from customers or revenue, repeated worst-case inputs

Quotas based on cost units, concurrency limits, maximum input/output size

Carding and payment abuseAdd-card, authorization, or low-value purchase

Many cards per account or device, repeated declines, small-value attempts

Payment-provider risk controls, velocity limits, step-up verification

Credential stuffing differs from brute force. Credential stuffing tests username and password pairs stolen elsewhere, often with only one or two attempts against each account. A simple per-account failed-login threshold can miss it. The OWASP Credential Stuffing Prevention Cheat Sheet recommends layered defenses, including multi-factor authentication, breached-password checks, and detection of automation.

Scraping also needs context. Indexing public documentation may be intended; collecting every private profile may not be. Define which automated clients and volumes are approved before selecting a control. Likewise, cost controls should follow the metered resource: model tokens, concurrent generations, query complexity, or exported rows may matter more than request count.

Why API abuse is hard to detect

Abusive traffic often uses the same endpoints, schemas, and success paths as legitimate traffic. Arcjet's threat model assumes capable operators may execute JavaScript, preserve cookies, imitate browsers, rotate residential IP addresses, and spread activity across accounts. These are possibilities to design and test for, not signals that independently prove a client is malicious. Compromised accounts also bring valid credentials and realistic history.

Bot identification answers “does this client appear automated?” Authorization answers “may this identity perform this action on this resource?” They are independent decisions. A verified search crawler is still not authorized to read a private endpoint. A human user can still attempt an unauthorized object lookup. Bot detection should contribute risk evidence; it must not replace authentication or object- and function-level authorization.

Attackers also operate below obvious thresholds. A low-and-slow credential-stuffing campaign can send one attempt per account from thousands of addresses over several days. Each IP, session, and account looks quiet, while the population-level pattern is abnormal. Detecting it requires longer aggregation windows and links across identifiers, such as repeated device characteristics, credential sources, autonomous systems, payload structure, and outcome sequences.

False positives are the corresponding operational risk. Shared corporate networks, mobile carrier NAT, accessibility tools, load tests, partner integrations, and customers importing data can resemble automation. A sudden signup surge may follow a real product launch. Blocking solely on IP reputation, request speed, or a browser fingerprint can punish legitimate users and create support load.

This makes a single signal unreliable. A high request rate may be a busy customer. A residential IP may belong to a bot or a real user. A valid account may be compromised. Effective detection combines multiple signals and evaluates them in the context of the action's value and cost.

Use graduated responses when confidence is incomplete. Logging, tighter quotas, delayed processing, step-up authentication, and challenges preserve more legitimate traffic than an immediate permanent block. Review downstream outcomes rather than assuming every blocked request was malicious.

Warning signs of automated abuse

Look for patterns across identities and time instead of evaluating every request alone. Organizing telemetry into four groups helps distinguish a noisy indicator from a coordinated campaign.

Identity signals

  • many failed logins distributed across many accounts, or one device touching many accounts;
  • many accounts sharing recovery details, payment instruments, promotion codes, or API keys;
  • newly created or dormant accounts immediately performing high-value operations;
  • repeated password resets, MFA enrollment changes, or token refreshes before sensitive actions.

Network and device signals

  • activity shifting rapidly between IP addresses, autonomous systems, regions, or hosting providers;
  • many accounts created from related device, TLS, cookie, or network characteristics;
  • implausible location changes or a mismatch between claimed client type and protocol behavior;
  • high address diversity combined with nearly identical payloads and timing.

These attributes can be shared or spoofed, so treat them as evidence rather than durable identity.

Behavior signals

  • repetitive navigation, intervals, payloads, header combinations, or error recovery;
  • requests for sequential or systematically varied object identifiers;
  • exhaustive pagination, high miss rates, or repeated worst-case queries;
  • workflows that omit normal steps, such as reserving inventory without viewing details or proceeding to payment.

Business-outcome signals

  • conversion rates collapse while traffic, holds, declines, or account creation rises;
  • expensive operations increase without matching customer, usage, or revenue growth;
  • reservations repeatedly expire, promotions are redeemed by linked accounts, or messages produce unusual complaint rates;
  • elevated account takeover reports, payment disputes, provider costs, or resource saturation.

Correlate leading technical signals with these outcomes. For example, a ticketing service might alert when reservation creation rises, purchase completion falls, and device-to-account fan-out increases together. This is stronger evidence than a high request count by itself.

Measure both blocked and allowed traffic. A control that stops obvious bots may cause attackers to slow down or distribute traffic rather than disappear. Compare downstream outcomes before and after enforcement, and keep enough history to detect migration to another endpoint or identity pool.

How to prevent API abuse

Start with authentication and object-level authorization, then layer controls around business operations. Prevention is most effective when teams agree on the operation's cost and legitimate completion.

Which identity controls prevent API abuse?

  1. Define normal and approved use. Identify the humans, mobile apps, partners, crawlers, and internal jobs each endpoint should support. Document expected workflows, automation, rates, and exceptional events such as imports or product launches.
  2. Enforce authorization on every object and function. Scope tokens narrowly, check tenant ownership server-side, and never rely on an unguessable identifier. The broader API security checklist covers authentication, authorization, validation, and monitoring.

How should APIs control automated volume?

  1. Limit the scarce resource. Rate limit login attempts, messages, exports, reservations, payment methods, or model tokens rather than generic HTTP requests alone. Use per-operation quotas and concurrency caps. Compare fixed window, sliding window, token bucket, and leaky bucket rate limiting before choosing an algorithm.
  2. Aggregate across meaningful identities. Apply limits by account, user, session, API key, tenant, device evidence, payment instrument, and network characteristics as appropriate. Do not let rotating one weak identifier reset every budget.
  3. Identify automation without granting trust. Allowlist approved machine clients with authenticated credentials and explicit scopes. Use bot signals to detect unapproved scripts, but continue to authorize every request and meter approved bots.

Which business controls reduce the value of abuse?

  1. Make workflows abuse-resistant. Expire reservations, cap simultaneous holds, bind promotions to verified eligibility, add idempotency, and delay costly privileges for new accounts. Put hard bounds on pagination, request size, query complexity, and generated output.
  2. Add verification at risk transitions. Require MFA or another step-up check before changing recovery data, exporting sensitive records, or making an unusual purchase. NIST SP 800-63B provides primary guidance on authenticator assurance and phishing-resistant options.
  3. Observe before enforcing. Run new rules in dry-run mode, label the reason for each decision, review affected traffic, then promote them with owners, expiry dates, and rollback criteria.

Challenges such as CAPTCHA can add friction, but should not be the first or only defense. They can fail accessibility requirements, be outsourced, and interrupt legitimate automation. Use them selectively when risk justifies interrupting the user, and provide an accessible alternative.

A practical signup design might limit attempts per device and network, verify contact information, and withhold referral credit until a downstream qualifying event. This targets the economic objective—promotion redemption—rather than trying to perfectly classify every visitor at the first request.

How to respond to an active attack

What evidence should responders preserve?

First preserve evidence and identify the abused operation, affected accounts, and resource impact. Record request and decision identifiers, identity links, rule versions, timestamps, and downstream outcomes under the organization's retention and privacy policies. Avoid collecting secrets or full payment data merely because an incident is underway.

How should an API abuse incident be contained?

Contain with the narrowest reversible control that reduces harm. Lower a route-specific quota, cap reservation concurrency, pause promotional credit, require step-up authentication, revoke compromised sessions or API keys, or temporarily queue an expensive operation. A feature-level kill switch can be safer than blocking an entire country or provider.

Protect users in parallel. Force credential resets only for accounts with credible exposure, revoke active sessions when appropriate, and prevent recovery channels from being changed during suspected takeover. Coordinate payment abuse with the payment provider rather than storing or analyzing sensitive card details unnecessarily.

Monitor the attacker's adaptation and legitimate-user impact. Broad IP blocks are easy to evade and can block shared networks. Watch for traffic moving to alternate endpoints, slower schedules, new accounts, or different identifiers. Compare challenge completion, successful purchases, latency, support contacts, and cost—not only the number of denials.

For example, during inventory hoarding, temporarily reduce holds per verified account, shorten hold duration, and require payment confirmation earlier for high-risk sessions. Keep a bypass for authenticated support operations. If purchase completion recovers without a spike in legitimate checkout failures, the control is addressing the abused workflow rather than merely displacing requests.

What should happen after containment?

After containment, correct the business-logic weakness, rotate exposed credentials, and remove temporary rules on a documented schedule. Add a regression test for the workflow invariant, an alert tied to the business outcome, and a runbook containing owners and rollback steps. Review which telemetry was missing and whether retention was sufficient to reconstruct distributed low-and-slow activity.

Frequently asked questions

What is the difference between API abuse and an API attack?

An API attack may exploit a software vulnerability, while API abuse often uses valid endpoints and valid-looking requests for a harmful purpose. Credential stuffing and inventory hoarding are abuse even when the API behaves exactly as designed.

Can rate limiting stop API abuse?

Rate limiting is an important layer, but it is not sufficient by itself. Distributed bots can stay below per-IP limits, and legitimate users may have very different usage patterns. Combine rate limits with bot detection, identity-aware limits, validation, and business-level controls.

How do bots avoid API abuse detection?

Bots rotate IP addresses, imitate browser headers, distribute requests across accounts, and keep traffic below obvious thresholds. Detection should therefore use multiple signals and enforce policy with user, session, route, and request context.

Application security in your code

Protect your application with Arcjet

Arcjet runs inside your application, where it can use request and identity context to enforce rate limits, detect bots, and block common attacks.