IPAbuse Developers
Intermediate12 min

Integrating a Blocklist

Retrieve IP reputation entries and apply your own risk policy before using them in a firewall or application.

1

Fetch reputation entries

Use the authenticated plugin endpoint. The min_score parameter selects entries whose reputation score is at least that value; this is not a high-risk-only list.

cURL
curl "https://api.ipabuse.org/v1/plugin/blocklist?category=SPAM&min_score=0" \
  -H "X-API-Key: YOUR_READ_SCOPE_API_KEY"
2

Filter by risk level

The JSON response contains reputation scores and risk levels. Filter those fields according to your tolerance for false positives before adding an address to a firewall deny list.

filter-risk.js
const { data } = await fetch(
  "https://api.ipabuse.org/v1/plugin/blocklist?category=SPAM&min_score=0",
  { headers: { "X-API-Key": process.env.IPABUSE_API_KEY } }
).then((response) => response.json());

const highRisk = data.ips
  .filter((entry) => ["HIGH", "CRITICAL"].includes(entry.riskLevel))
  .map((entry) => entry.ipAddress);