Official Client Libraries

Thin, deliberately-tiny reference clients for the ipinsights.io REST API. Each implementation is roughly 100 lines, depends only on the standard library of its language where possible, and exists so you can drop the API into a pipeline before lunch.

All four clients cover the same surface area:

  • lookup(ip) — single IP / ASN / CIDR enrichment (authenticated).
  • bulk_lookup(ips) — up to 100 IPs per call (authenticated).
  • teaser(ip) — unauthenticated evaluation lookup, tight per-IP rate limit.
  • report(ip, category) — submit observed attackers back into the platform.

Need a different language? The canonical OpenAPI 3.1 spec will generate a client in just about anything via openapi-generator-cli, swagger-codegen or oapi-codegen.

Python

PyPI: ipinsights

Pure-standard-library client. Works on Python 3.9+ with no third-party dependencies.

Install & use
pip install ./ipinsights-python
from ipinsights import Client

client = Client(api_key="YOUR_KEY")
print(client.lookup("8.8.8.8"))
Download .zip (~6 KB)

Go

module: ipinsights

Standard-library Go module. Drop into any project with go mod.

Install & use
unzip ipinsights-go.zip
cd go && go build ./...
import ipinsights "./go"

c := ipinsights.New("YOUR_KEY")
res, _ := c.Lookup(ctx, "8.8.8.8")
Download .zip (~5.1 KB)

Node.js

npm: @ipinsights/client

Zero-dependency Node.js client. ESM + CommonJS, ships TypeScript declarations.

Install & use
npm install ./ipinsights-nodejs
import { Client } from '@ipinsights/client';

const c = new Client({ apiKey: 'YOUR_KEY' });
console.log(await c.lookup('8.8.8.8'));
Download .zip (~5.9 KB)

PowerShell

Gallery: IPInsights

PowerShell 7+ module. Single .psm1 with Get-IPInsight and friends.

Install & use
Expand-Archive ipinsights-powershell.zip
Import-Module ./powershell/IPInsights.psd1
Import-Module IPInsights
Get-IPInsight -ApiKey 'YOUR_KEY' -IP '8.8.8.8'
Download .zip (~5.4 KB)

Authentication

Every authenticated call expects an X-API-Key header. Get a free key by registering for an account; the default quota is 100 requests/hour with per-account overrides available on request.

Further reading