check_abuseipdb_keys.py python script
Overview
AbuseIPDB API Keys Quota Checker is a small, fast Python utility that shows the real-time status, daily limit and remaining queries of several AbuseIPDB API keys in parallel. Handy when your other tools rotate through a pool of keys and you want to know how much quota is left.
Key features
- Concurrent checks with
ThreadPoolExecutor: results for every key in seconds. - Quota metrics read from the
X-RateLimit-Limit,X-RateLimit-RemainingandX-RateLimit-Resetheaders. - Total capacity pool: sum of the remaining queries across every working key.
- Key masking in the output (e.g.
4c9a12...98f1) so secrets are never shown in full. - Corporate proxy ready: works behind SSL/TLS inspection.
How it works
- Lightweight probe: one
/checkrequest per key against a public resolver (1.1.1.1). - Header inspection: daily limit, remaining requests and reset time.
- Status: Active (valid key with quota), Exhausted (429) or Unauthorized (401).
- Console table sorted by key order, with the total available pool at the bottom.
text
[Load API_KEYS] -> [ThreadPoolExecutor]
├─► Worker 1: /check (1.1.1.1) with key #1
├─► Worker 2: /check (1.1.1.1) with key #2
└─► Worker N: /check (1.1.1.1) with key #N
│
▼
[Parse X-RateLimit-* headers] -> [Active | Exhausted (429) | Unauthorized (401)]
│
▼
[Color-coded table + total remaining pool]Requirements
- Python 3.8+ (standard Python or Anaconda).
- Libraries:
requests,urllib3. - One or more AbuseIPDB API keys.
Installation
bash
pip install requests urllib3Configuration
Open check_abuseipdb_keys.py and fill the API_KEYS list near the top:
python
API_KEYS = [
"YOUR_FIRST_API_KEY",
"YOUR_SECOND_API_KEY",
"YOUR_THIRD_API_KEY"
]Usage
bash
python check_abuseipdb_keys.pytext
[+] Checking API keys status concurrently against AbuseIPDB...
# | Key (Masked) | Status | Limit | Remaining | Used % | Reset Time (UTC)
1 | 4c9a12...98f1 | Active | 1000 | 842 | 15.8% | 2026-10-20 00:00:00 UTC
2 | e10bf4...a12c | Active | 1000 | 990 | 1.0% | 2026-10-20 00:00:00 UTC
3 | f038de...51ab | Exhausted (429) | 1000 | 0 | 100.0% | 2026-10-20 00:00:00 UTC
TOTAL AVAILABLE POOL: 1832 / 3000 queries remaining across all keys.Output fields
| Column | Description |
|---|---|
| # | Position of the key in the API_KEYS list. |
| Key (Masked) | First 6 and last 4 characters only. |
| Status | Active, Exhausted (429) or Unauthorized (401). |
| Limit | Maximum daily queries for the key tier. |
| Remaining | Requests left before hitting the limit. |
| Used % | Share of the daily quota already used. |
| Reset Time (UTC) | When AbuseIPDB resets the counter. |
| TOTAL AVAILABLE POOL | Sum of remaining queries across working keys. |
Corporate proxy & SSL
Behind a corporate proxy doing SSL/TLS inspection, Python HTTPS calls can fail with CERTIFICATE_VERIFY_FAILED. The script handles it by silencing urllib3 warnings and using verify=False on outbound requests:
python
import urllib3
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
requests.get(url, headers=headers, verify=False)