A full-featured REST API to check IP addresses for abuse reputation, country, and usage type using AbuseIPDB, with built-in API key management, rate limiting, caching, and analytics dashboard.
Includes: Dockerfile, modular project structure, SQLite stats, real-world endpoints, and quick setup.
π Buy it on Gumroad
A modern Flask REST API that lets you instantly check single or bulk IPs, with caching, daily rate limits per key, and easy integration into your stack. Great for SaaS, web tools, fraud prevention, and sysadmins.
- π API key management with daily rate limits (per user)
- π§ Built-in caching (reduces AbuseIPDB calls, free tier ready)
- π Analytics endpoints (top countries, usage types, stats)
- π Bulk IP checks (POST with array)
- π‘ Real AbuseIPDB reputation & usage type
- π SQLite storage: cache, users, statistics
- β‘ Fast: avoids double-charging for same IPs
- π³ Docker-ready
GET /check?ip=1.2.3.4
Headers: X-API-KEY: your_key
(or as ?api_key param)
Response: { "ip": "1.2.3.4", "isPublic": true, "abuseConfidenceScore": 67, "countryCode": "US", "isWhitelisted": false, "usageType": "Data Center/Web Hosting/Transit" }
POST /check_bulk
Headers: X-API-KEY: your_key
Body:
{"ips": ["1.2.3.4", "8.8.8.8", "185.199.111.153"]}
Response:
{"results": [ {...}, {...}, {...} ]}
- Each API key is limited to 100 checks/day by default.
- Returns 429 if you exceed your quota.
GET /stats
Shows total checks, unique IPs, top countries, and usage types.
{"error": "Missing API key"} {"error": "No IP provided"} {"error": "Invalid IP address"} {"error": "Daily limit exceeded"} {"error": "External API error: ..."}
pip install -r requirements.txt
- Flask
- requests
- python-dotenv
python IP\ Reputation\ Checker\ API.py
Or use Docker:
docker build -t ip-rep-api . docker run -p 5000:5000 ip-rep-api
- β
GET
/check?ip=1.2.3.4
- β
POST
/check_bulk
- β
GET
/stats
β οΈ Error cases- See
/screens/
for UI and result examples.
Get the ZIP with the full project, Docker, and docs:
π Buy it on Gumroad
- Email: [email protected]
- Telegram: @talabovali
Need this in another language/stack (Node.js, Go, etc)?
Custom dev available β just reach out.