IPAbuse Developers

SDKs & Libraries

SDK packages are available for Node.js/TypeScript, PHP, and Python. The examples below use each client's full IP lookup method. Some other SDK methods still target legacy API paths or request fields. For report submission, use the API request in the Quickstart until those methods are updated.

Node.js / TypeScript Official

Install

cURL
npm install @ipabuse/sdk

Quick start

TypeScript
import { IPAbuseClient } from "@ipabuse/sdk";

const client = new IPAbuseClient({ apiKey: process.env.IPABUSE_API_KEY });

// IP reputation
const rep = await client.ip.get("1.2.3.4");
console.log(rep.riskLevel, rep.reputationScore);

PHP Official

Install

cURL
composer require ipabuse/sdk

Quick start

PHP
<?php
use IPAbuse\Client;

$client = new Client(['api_key' => getenv('IPABUSE_API_KEY')]);

$rep = $client->ip->get('1.2.3.4');
echo $rep->riskLevel . PHP_EOL;

Python Official

Install

cURL
pip install ipabuse

Quick start

Python
from ipabuse import Client

client = Client(api_key="YOUR_API_KEY")

rep = client.ip.get("1.2.3.4")
print(rep.risk_level, rep.reputation_score)

Community libraries

Have you built a library for another language? Open a PR to add it here or let us know.

Next steps