API reference

A small REST API to check addresses before you trust them, report the ones attacking you and download a blocklist. Every response is JSON, every timestamp is ISO 8601 in UTC, and every check includes the country of the address and RIPE network data.

Base URLhttps://abusedb.sh/api/v1Get an API key

Authentication#

Create an API key in your account settings. Keys are shown once, so store them somewhere safe. Send the key with every request in one of these headers:

headers
Authorization: Bearer YOUR_API_KEY
Key: YOUR_API_KEY          # also accepted
X-Api-Key: YOUR_API_KEY    # also accepted

Keys carry permissions: read allows checks, report listings and blocklist downloads, report allows submitting and removing reports. Use a read-only key on machines that only need to look things up.

Rate limits & quotas#

Requests are limited to 120 per minute per account. Lookups and blocklist downloads also have a daily quota per account, shared by all of its keys. Reporting has no daily quota.

BucketEndpointsPer 24 hours
checkcheck, check-block, reports1,000
blocklistblocklist24

Responses from quota-limited endpoints carry X-Quota-Limit and X-Quota-Remaining headers. Once a quota is used up you receive 429 Too Many Requests with a Retry-After header. You can report the same address at most once every 15 minutes.

Errors#

Errors use conventional HTTP status codes and a JSON body with a human-readable message. Validation errors (422) also include an errors object keyed by field.

StatusMeaning
401Missing or invalid API key
403The key lacks the required permission
404Unknown endpoint
422Invalid input, or the address is still in its report cooldown
429Rate limit or daily quota exceeded
422 response
{
  "message": "Unknown category \"99\". See /api/v1/categories for valid ids and slugs.",
  "errors": {
    "categories.0": ["Unknown category \"99\". See /api/v1/categories for valid ids and slugs."]
  }
}

Check an address

GET/api/v1/check· requires the read permission

Returns the abuse score, report statistics, the country the address is located in, a category breakdown and RIPE network data (prefix, ASN, registry, abuse contact, reverse DNS and geolocation) for any address, including addresses nobody has reported yet. Countries come from IP Geolocation by DB-IP (CC BY 4.0); credit DB-IP where you show them.

ParameterTypeDescription
iprequiredstringIPv4 or IPv6 address.
verbosebooleanInclude the 25 most recent reports.
request
curl -G https://abusedb.sh/api/v1/check \
  -H "Authorization: Bearer $ABUSEDB_KEY" \
  --data-urlencode "ip=193.0.6.139"
response
{
  "data": {
    "ip": "193.0.6.139",
    "version": 4,
    "is_public": true,
    "country_code": "NL",
    "is_whitelisted": false,
    "abuse_score": 0,
    "risk_level": "clean",
    "risk_label": "Clean",
    "total_reports": 0,
    "distinct_reporters": 0,
    "first_reported_at": null,
    "last_reported_at": null,
    "categories": [],
    "network": {
      "prefix": "193.0.0.0/21",
      "asn": 3333,
      "as_name": "RIPE-NCC-AS Reseaux IP Europeens Network Coordination Centre (RIPE NCC)",
      "announced": true,
      "rir": "RIPE NCC",
      "country_code": "NL",
      "network_name": "RIPE-NCC",
      "organization": "RIPE Network Coordination Centre",
      "abuse_contacts": ["[email protected]"],
      "hostnames": ["www.ripe.net"],
      "source": "ripestat"
    },
    "url": "https://abusedb.sh/ip/193.0.6.139"
  }
}

Report an address

POST/api/v1/reports· requires the report permission

Records a report and immediately returns the updated score. POST /report is accepted as an alias. Private and reserved ranges are rejected.

ParameterTypeDescription
iprequiredstringThe abusive public IPv4 or IPv6 address.
categoriesrequiredarray | stringCategory ids or slugs, as an array or comma-separated string, e.g. ssh,brute-force or 2,1.
commentstringEvidence such as a log line, up to 1024 characters. Comments are public, so strip personal data.
timestampISO 8601When the abuse happened. Defaults to now, may be up to 365 days old.
request
curl https://abusedb.sh/api/v1/reports \
  -H "Authorization: Bearer $ABUSEDB_KEY" \
  -d ip=203.0.113.42 \
  -d categories=ssh,brute-force \
  -d comment="sshd: 64 failed password attempts in 60s"
response
{
  "data": {
    "id": 1138,
    "ip": "203.0.113.42",
    "categories": [1, 2],
    "reported_at": "2026-10-09T13:01:37+00:00",
    "abuse_score": 33,
    "risk_level": "suspicious",
    "url": "https://abusedb.sh/ip/203.0.113.42"
  }
}

List reports

GET/api/v1/reports· requires the read permission

The reports for an address, newest first.

ParameterTypeDescription
iprequiredstringIPv4 or IPv6 address.
pageintegerPage number, starting at 1.
per_pageintegerBetween 1 and 100, default 25.
request
curl -G https://abusedb.sh/api/v1/reports \
  -H "Authorization: Bearer $ABUSEDB_KEY" \
  -d ip=203.0.113.42 -d per_page=10
response
{
  "data": [
    {
      "id": 1138,
      "categories": [1, 2],
      "comment": "sshd: 64 failed password attempts in 60s",
      "source": "api",
      "reported_at": "2026-10-09T13:01:37+00:00",
      "created_at": "2026-10-09T13:01:37+00:00",
      "reporter": { "id": 1, "name": "honeypot-fra1", "trusted": false }
    }
  ],
  "links": { "first": "…", "last": "…", "prev": null, "next": null },
  "meta": { "current_page": 1, "last_page": 1, "per_page": 10, "total": 1 }
}

Remove your reports

DELETE/api/v1/reports· requires the report permission

Deletes every report your account filed for an address, for example after a false positive. The score is recalculated right away.

ParameterTypeDescription
iprequiredstringIPv4 or IPv6 address.
request
curl -X DELETE -G https://abusedb.sh/api/v1/reports \
  -H "Authorization: Bearer $ABUSEDB_KEY" \
  -d ip=203.0.113.42
response
{
  "data": { "ip": "203.0.113.42", "deleted": 1, "abuse_score": 0 }
}

Check a network

GET/api/v1/check-block· requires the read permission

Lists the reported addresses inside a CIDR block, worst first (up to 1,000).

ParameterTypeDescription
networkrequiredCIDRA block such as 198.51.100.0/24 or 2001:db8::/48 (at most /16 for IPv4 and /32 for IPv6).
request
curl -G https://abusedb.sh/api/v1/check-block \
  -H "Authorization: Bearer $ABUSEDB_KEY" \
  --data-urlencode "network=198.51.100.0/24"
response
{
  "data": {
    "network": "198.51.100.0/24",
    "version": 4,
    "first_address": "198.51.100.0",
    "last_address": "198.51.100.255",
    "size": 256,
    "reported_total": 30,
    "reported_addresses": [
      {
        "ip": "198.51.100.3",
        "abuse_score": 100,
        "total_reports": 52,
        "last_reported_at": "2026-10-09T12:15:18+00:00",
        "country_code": "BR"
      }
    ],
    "truncated": false
  }
}

Blocklist

GET/api/v1/blocklist· requires the read permission

Every non-whitelisted address at or above the given score, worst first. Downloading once an hour is plenty.

ParameterTypeDescription
min_scoreintegerMinimum abuse score, 1–100. Default 75.
limitintegerMaximum number of addresses, up to 100,000. Default 10,000.
version4 | 6Only IPv4 or only IPv6 addresses.
formatjson | plainplain returns one address per line, ready for ipset or nftables. Sending Accept: text/plain works too.
request
curl -G https://abusedb.sh/api/v1/blocklist \
  -H "Authorization: Bearer $ABUSEDB_KEY" \
  -d min_score=90 -d format=plain
response
198.51.100.3
198.51.100.156
2001:db8:2000::fcd0:1c00
192.0.2.18

Categories

GET/api/v1/categories

All report categories. This endpoint needs no API key.

request
curl https://abusedb.sh/api/v1/categories
response
{
  "data": [
    {
      "id": 2,
      "slug": "ssh",
      "name": "SSH",
      "description": "SSH login attempts, brute-force or exploitation of SSH services.",
      "severity": 90,
      "group": "Intrusion"
    }
  ]
}

Account & quota

GET/api/v1/me

The account behind the key and its remaining daily quota. Handy to verify a new key.

request
curl https://abusedb.sh/api/v1/me -H "Authorization: Bearer $ABUSEDB_KEY"
response
{
  "data": {
    "account": { "id": 1, "name": "honeypot-fra1", "reports": 27 },
    "api_key": {
      "name": "fail2ban on web-01",
      "abilities": ["read", "report"],
      "created_at": "2026-10-09T13:01:13+00:00",
      "last_used_at": "2026-10-09T13:01:38+00:00"
    },
    "quota": {
      "check": { "limit": 1000, "used": 3, "remaining": 997, "resets_in": 86390 },
      "report": { "limit": 1000, "used": 4, "remaining": 996, "resets_in": 86399 },
      "blocklist": { "limit": 24, "used": 1, "remaining": 23, "resets_in": 86400 }
    }
  }
}

How the abuse score works#

Every address has a score between 0 and 100. It is computed from the reports of the last 90 days:

  1. Each report is weighted by the severity of its worst category (a port scan counts 0.5, malware 1.0) and decays exponentially with a half-life of 14 days.
  2. Reports are grouped per reporter. A reporter’s evidence saturates (1 − e−x), so one account repeating itself cannot push an address to 100. It is then multiplied by the reporter’s trust.
  3. The evidence of all reporters is summed and mapped to 0–100 with 100 · (1 − e−total / 1.5).

One fresh, severe report scores about 34, three independent reporters about 72, and ten or more over 95. Whitelisted addresses always score 0.

Clean0No recent abuse reported.
Low risk1–24A few older or isolated reports.
Suspicious25–49Reported recently by at least one reporter.
High risk50–74Multiple recent reports from several reporters.
Malicious75–100Heavily and recently reported. Block it.

Categories#

Use either the numeric id or the slug when reporting. Severity weights the abuse score.

IDSlugNameSeverityDescription
1brute-forceBrute-Force90Password guessing or credential stuffing against any login (FTP, SMTP, RDP, web forms, ...).
2sshSSH90SSH login attempts, brute-force or exploitation of SSH services.
3port-scanPort Scan50Scanning for open ports or vulnerable services.
4ddosDDoS100Participating in a (distributed) denial-of-service attack.
5web-attackWeb App Attack90Exploit attempts against web applications: RCE, LFI, path traversal, XSS, CMS probing.
6sql-injectionSQL Injection100SQL injection attempts.
7phishingPhishing100Hosting phishing pages or sending phishing messages.
8email-spamEmail Spam70Unsolicited bulk email or spam relay.
9web-spamWeb Spam60Comment, forum, blog or contact-form spam.
10bad-botBad Bot50Abusive crawlers and scrapers ignoring robots.txt or rate limits.
11malwareMalware100Distributing or hosting malware, droppers or exploit kits.
12botnetBotnet / C2100Botnet node or command-and-control infrastructure.
13exploited-hostExploited Host80A compromised host being used to launch attacks.
14open-proxyOpen Proxy50Open proxy, open relay or anonymizer being abused for attacks.
15fraudFraud80Payment fraud, fake orders or account takeover attempts.
16dns-abuseDNS Abuse80DNS amplification, cache poisoning or abused open resolvers.
17iotIoT Targeted80Attacks targeting IoT devices (Telnet, Mirai-style exploits, default credentials).
18voipVoIP Abuse80SIP scanning, registration hijacking or toll fraud.
19spoofingSpoofing70Spoofed sender addresses, headers or source IPs.
20hackingHacking90Other intrusion attempts that fit no more specific category.

fail2ban integration#

Report every ban automatically. Save this action and add it to any jail with the categories that fit:

/etc/fail2ban/action.d/abusedb.conf
[Definition]
actionban = curl -fsS --retry 2 -o /dev/null <abusedb_url>/reports \
              -H "Authorization: Bearer <abusedb_key>" \
              --data-urlencode "ip=<ip>" \
              --data-urlencode "categories=<abusedb_categories>" \
              --data-urlencode "comment=fail2ban <name>: <failures> failures"

[Init]
abusedb_url = https://abusedb.sh/api/v1
abusedb_key = YOUR_API_KEY
abusedb_categories = brute-force
/etc/fail2ban/jail.local
[sshd]
enabled = true
action  = %(action_)s
          abusedb[abusedb_categories="ssh,brute-force"]