IpinfoDeveloper SDK
IPinfo.io OpenAPI Specification client, generated from the OpenAPI spec.
This is an unofficial SDK for the IPinfo.io OpenAPI Specification public API, generated by Voxgig with @voxgig/sdkgen. It is not affiliated with, endorsed by, or sponsored by the upstream API provider.
TypeScript, Python, PHP, Golang, Ruby, Lua SDKs, a CLI, an interactive REPL, and an MCP server for AI agents — all generated from one OpenAPI spec by @voxgig/sdkgen.
Entities, not endpoints
This SDK exposes the API as a small set of semantic entities — Abuse, Asn, Carrier, Company, Core, Domain, General, GetCurrentInformation, GetInformationByIp, IpinfoCore, IpinfoLite, IpinfoPlus, Lite, Max, Men, Place, Plus, Privacy, PrivacyExtended, Range, ResidentialProxy, Single, WhoisAsn, WhoisDomain, WhoisIp, WhoisNetId, WhoisOrg and WhoisPoc — that you
call directly, instead of assembling URL paths and query strings. Entities are
Capitalised to mark them as the primary surface, each with the operations they
support (list, load, create):
const client = new IpinfoDeveloperSDK()
const abuse = await client.Abuse().load()
Thinking in entities keeps the mental model small — for people and AI agents alike — rather than reasoning about raw HTTP routes and query parameters.
Packages
| Language | Package | Install |
|---|---|---|
| TypeScript | @voxgig-sdk/ipinfo-developer | publish pending — install from git tag |
| Python | voxgig-sdk-ipinfo-developer | publish pending — install from git tag |
| PHP | voxgig-sdk/ipinfo-developer | publish pending — install from git tag |
| Golang | github.com/voxgig-sdk/ipinfo-developer-sdk/go | go get github.com/voxgig-sdk/ipinfo-developer-sdk/go@latest |
| Ruby | voxgig-sdk-ipinfo-developer | publish pending — install from git tag |
| Lua | voxgig-sdk-ipinfo-developer | publish pending — install from git tag |
Quickstart
TypeScript
import { IpinfoDeveloperSDK } from '@voxgig-sdk/ipinfo-developer'
const client = new IpinfoDeveloperSDK({
apikey: process.env.IPINFO_DEVELOPER_APIKEY,
})
// Load abuse data (returns a Abuse)
const abuse = await client.Abuse().load()
console.log(abuse)
See the TypeScript README for the full guide.
Surfaces
| Surface | Path |
|---|---|
| SDK (TypeScript, Python, PHP, Golang, Ruby, Lua) | ts/ py/ php/ go/ rb/ lua/ |
| CLI | go-cli/ |
| MCP server | go-mcp/ |
Use it from an AI agent (MCP)
The generated MCP server exposes every operation in this SDK as an MCP tool that Claude, Cursor or Cline can call directly. Build and register it:
cd go-mcp && go build -o ipinfo-developer-mcp .
Then add it to your agent’s MCP config (Claude Desktop, Cursor, etc.):
{
"mcpServers": {
"ipinfo-developer": {
"command": "/abs/path/to/ipinfo-developer-mcp"
}
}
}
Entities
The API exposes 28 entities:
| Entity | Description | API path |
|---|---|---|
| Abuse | The Abuse entity (load). | /{ip}/abuse |
| Asn | The Asn entity (list). | /AS{asn} |
| Carrier | The Carrier entity (load). | /{ip}/carrier |
| Company | The Company entity (load). | /{ip}/company |
| Core | The Core entity (load). | /lookup/{ip} |
| Domain | The Domain entity (load). | /domains/{ip} |
| General | The General entity (create). | /tools/map |
| GetCurrentInformation | The GetCurrentInformation entity (load). | / |
| GetInformationByIp | The GetInformationByIp entity (load). | /{ip} |
| IpinfoCore | The IpinfoCore entity (load). | /lookup/{ip}/{field} |
| IpinfoLite | The IpinfoLite entity (load). | /lite/{ip}/{field} |
| IpinfoPlus | The IpinfoPlus entity (load). | /plus/{ip}/{field} |
| Lite | The Lite entity (load). | /lite/me |
| Max | The Max entity (load). | /max/{ip} |
| Men | The Men entity (load). | /me |
| Place | The Place entity (load). | /places/{ip} |
| Plus | The Plus entity (load). | /plus/{ip} |
| Privacy | The Privacy entity (load). | /{ip}/privacy |
| PrivacyExtended | The PrivacyExtended entity (list). | /{ip}/privacy_extended |
| Range | The Range entity (load). | /ranges/{domain} |
| ResidentialProxy | The ResidentialProxy entity (load). | /{ip}/resproxy |
| Single | The Single entity (load). | /{ip}/city |
| WhoisAsn | The WhoisAsn entity (list). | /whois/net/AS{asn} |
| WhoisDomain | The WhoisDomain entity (load). | /whois/net/{domain} |
| WhoisIp | The WhoisIp entity (load). | /whois/net/{whoisip} |
| WhoisNetId | The WhoisNetId entity (load). | /whois/net/{whoisnetid} |
| WhoisOrg | The WhoisOrg entity (load). | /whois/org/{whoisorgid} |
| WhoisPoc | The WhoisPoc entity (load). | /whois/poc/{whoispoc} |
The operations available across these entities are load, list, create — see each entity’s own list above for exactly which it supports.
Quickstart in other languages
Python
import os
from ipinfodeveloper_sdk import IpinfoDeveloperSDK
client = IpinfoDeveloperSDK({
"apikey": os.environ.get("IPINFO_DEVELOPER_APIKEY"),
})
# Load a specific abuse (returns the record, raises on error)
abuse = client.Abuse().load()
print(abuse)
PHP
<?php
require_once 'ipinfodeveloper_sdk.php';
$client = new IpinfoDeveloperSDK([
"apikey" => getenv("IPINFO_DEVELOPER_APIKEY"),
]);
// Load a specific abuse (returns the bare record; throws on error)
$abuse = $client->Abuse()->load();
print_r($abuse);
Golang
import sdk "github.com/voxgig-sdk/ipinfo-developer-sdk/go"
client := sdk.NewIpinfoDeveloperSDK(map[string]any{
"apikey": os.Getenv("IPINFO_DEVELOPER_APIKEY"),
})
// Load abuse data
abuse, err := client.Abuse(nil).Load(map[string]any{}, nil)
fmt.Println(abuse)
Ruby
require_relative "IpinfoDeveloper_sdk"
client = IpinfoDeveloperSDK.new({
"apikey" => ENV["IPINFO_DEVELOPER_APIKEY"],
})
# Load a specific abuse (returns the bare record; raises on error)
abuse = client.Abuse.load()
puts abuse
Lua
local sdk = require("ipinfo-developer_sdk")
local client = sdk.new({
apikey = os.getenv("IPINFO_DEVELOPER_APIKEY"),
})
-- Load a specific abuse
local abuse, err = client:Abuse():load()
print(abuse)
Unit testing in offline mode
Every SDK ships a test mode that swaps the HTTP transport for an in-memory mock, so unit tests run offline.
TypeScript
const client = IpinfoDeveloperSDK.test()
const abuse = await client.Abuse().load()
// abuse is a bare Abuse populated with mock data
console.log(abuse)
Python
client = IpinfoDeveloperSDK.test()
abuse = client.Abuse().load()
print(abuse)
PHP
// Seed fixture data so offline calls resolve without a live server.
$client = IpinfoDeveloperSDK::test([
"entity" => ["abuse" => ["test01" => []]],
]);
$abuse = $client->Abuse()->load();
Golang
client := sdk.Test()
result, err := client.Abuse(nil).Load(
nil, nil,
)
Ruby
# Seed fixture data so offline calls resolve without a live server.
client = IpinfoDeveloperSDK.test({
"entity" => { "abuse" => { "test01" => {} } },
})
abuse = client.Abuse.load()
Lua
local client = sdk.test()
local result, err = client:Abuse():load()
Direct and prepare
For endpoints the entity model doesn’t cover, use the low-level methods:
direct(fetchargs)— build and send an HTTP request in one step.prepare(fetchargs)— build the request without sending it.
Both accept a map with path, method, params, query,
headers, and body. See the How-to guides below.
How-to guides
Make a direct API call
When the entity interface does not cover an endpoint, use direct:
TypeScript:
const result = await client.direct({
path: '/api/resource/{id}',
method: 'GET',
params: { id: 'example' },
})
if (result instanceof Error) {
throw result
}
console.log(result.data)
Python:
result = client.direct({
"path": "/api/resource/{id}",
"method": "GET",
"params": {"id": "example"},
})
PHP:
$result = $client->direct([
"path" => "/api/resource/{id}",
"method" => "GET",
"params" => ["id" => "example"],
]);
Go:
result, err := client.Direct(map[string]any{
"path": "/api/resource/{id}",
"method": "GET",
"params": map[string]any{"id": "example"},
})
Ruby:
result = client.direct({
"path" => "/api/resource/{id}",
"method" => "GET",
"params" => { "id" => "example" },
})
Lua:
local result, err = client:direct({
path = "/api/resource/{id}",
method = "GET",
params = { id = "example" },
})
Advanced
Everyday use only needs the sections above. This explains the internals behind every call — relevant when writing custom features.
Every SDK call runs the same five-stage pipeline:
- Point — resolve the API endpoint from the operation definition.
- Spec — build the HTTP specification (URL, method, headers, body).
- Request — send the HTTP request.
- Response — receive and parse the response.
- Result — extract the result data for the caller.
A feature hook fires at each stage (e.g. PrePoint, PreSpec,
PreRequest), so features can inspect or modify the pipeline without
forking the SDK.
Features
| Feature | Purpose |
|---|---|
| TestFeature | In-memory mock transport for testing without a live server |
Pass custom features via the extend option at construction time.
Per-language documentation
Upstream API
This SDK is generated from the upstream OpenAPI specification. It is an unofficial client and is not affiliated with the API provider.
- Upstream API: https://ipinfo.io/
Security
Please report security issues to security@voxgig.com. See SECURITY.md. Do not open public issues for suspected vulnerabilities.
Generated from the IPinfo.io OpenAPI Specification OpenAPI spec by @voxgig/sdkgen.