AbuseIPDB-compatible API
If your tool already speaks AbuseIPDB APIv2, there is no code to rewrite. Change the base URL and the key: same request, same field names, same error format. A way out for servers that keep hitting the daily cap, or simply a second opinion.
Change two things
Find the AbuseIPDB address and key in your tool's settings or script and replace both. The path (/api/v2/…), the parameters and the Key header stay as they are.
| What | Before | After |
|---|---|---|
| Base URL | https://api.abuseipdb.com/api/v2 | https://ip-db.com/api/v2 |
| Key | your AbuseIPDB key | your IP-DB key (ipdb_…) |
Ready-made recipes
Check an address · curl
curl -G https://ip-db.com/api/v2/check \ --data-urlencode "ipAddress=185.220.101.1" \ -d maxAgeInDays=90 \ -H "Key: YOUR_IPDB_KEY" \ -H "Accept: application/json" # {"data": {"ipAddress": "185.220.101.1", "isPublic": true, "ipVersion": 4, # "isWhitelisted": false, "abuseConfidenceScore": 100, "countryCode": "DE", # "usageType": "Data Center/Web Hosting/Transit", "isp": "…", "domain": "…", # "hostnames": [], "isTor": true, "totalReports": 0, "numDistinctUsers": 0, # "lastReportedAt": null, "ipdb": {"scoreLabel": "critical", "blacklistSources": […], …}}}
Report an address · curl
curl https://ip-db.com/api/v2/report \ --data-urlencode "ip=203.0.113.7" \ -d categories=18,22 \ --data-urlencode "comment=SSH login attempts" \ -H "Key: YOUR_IPDB_KEY" \ -H "Accept: application/json" # {"data": {"ipAddress": "203.0.113.7", "abuseConfidenceScore": 12}}
Python · requests
import requests
r = requests.get(
"https://ip-db.com/api/v2/check", # was https://api.abuseipdb.com/api/v2/check
params={"ipAddress": "185.220.101.1", "maxAgeInDays": 90},
headers={"Key": "YOUR_IPDB_KEY", "Accept": "application/json"},
timeout=10,
)
score = r.json()["data"]["abuseConfidenceScore"]
fail2ban: report what it bans
# /etc/fail2ban/action.d/ipdb.conf [Definition] norestored = 1 actionstart = actionstop = actioncheck = actionban = curl -sSf "https://ip-db.com/api/v2/report" -H "Accept: application/json" -H "Key: <ipdb_apikey>" --data-urlencode "comment=fail2ban: <name>" --data-urlencode "ip=<ip>" --data "categories=<ipdb_category>" actionunban = [Init] ipdb_apikey = ipdb_category = 18 # /etc/fail2ban/jail.local [sshd] enabled = true action = %(action_)s ipdb[ipdb_apikey="YOUR_IPDB_KEY", ipdb_category="18,22"] # sudo fail2ban-client reload
What matches exactly
| Paths | GET /api/v2/check and POST /api/v2/report |
| Parameters | ipAddress, maxAgeInDays, verbose; ip, categories, comment |
| Authentication | the Key header |
| Envelope | {"data": …} and {"errors": [{detail, status}]} |
| Field names | abuseConfidenceScore, countryCode, usageType, isp, domain, isTor, totalReports, numDistinctUsers, lastReportedAt… |
| Status codes | 401, 422, 429 |
| Headers | X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, Retry-After |
| Report categories | AbuseIPDB's numeric ids (e.g. 18,22) are accepted |
| The same address can be reported once in 15 minutes | |
What differs
The format is compatible; the data is not the same data. What to know before you switch:
| The score is our score | abuseConfidenceScore is on the same 0–100 scale but is computed from 44 threat feeds, community reports and DNSBL listings. It will not equal AbuseIPDB's number; watch your threshold (say 75) for a few days and adjust. |
| maxAgeInDays does not change the answer | The parameter is validated (1–365), but the score always reflects the current listings. |
| verbose returns no report list | countryName is added; reports is always an empty list. We do not hand out individual reports through the API. |
| hostnames is empty | Reverse DNS is not part of this answer. |
| Two categories have no counterpart | 13 (VPN IP) and 17 (Spoofing) do not exist here; a report carrying only those is refused with 422. |
| Only check and report | blacklist, check-block, bulk-report and clear-address are not offered under /api/v2. For a blocklist, use /api/v1/feed.txt. |
| Extras live under data.ipdb | Source lists, network type, ASN, the RDAP abuse contact and the address's public page. A client written for AbuseIPDB never looks there. |
Daily limits
| Account | Checks / day | Reports / day | Price |
|---|---|---|---|
| IP-DB, new account | 1,000 | 1,000 | Free |
| IP-DB, email verified | 10,000 | 10,000 | Free |
| IP-DB, contributor (runs a sensor or Shield) | 30,000 | 30,000 | Free |
| AbuseIPDB, free (Individual) | 1,000 | 1,000 | Free |
Start in a minute
Create an account, verify your email, generate a key in the panel. For every field of our own API and the blocklist feed, see the docs.
Frequently Asked Questions
Does my AbuseIPDB key work here?
Will the scores match AbuseIPDB's?
Can I use both at once?
Does it cost anything?
Do /api/v1 and /api/v2 have separate quotas?
AbuseIPDB is a trademark of its owner. IP-DB is an independent service and is not affiliated with or endorsed by AbuseIPDB.