ASN + IP geolocation

$0.001 per call · USDC via x402 · POST /api/asn-info

Look up the Autonomous System (ASN), prefix, country, registry, and allocation date for an IPv4 address - or for a hostname (which is resolved first). Send POST /api/asn-info with no required fields (2 optional) and pay $0.001 per call over x402 or MPP (there is no free tier). It returns a JSON object with ip, asn, owner, prefix, country and 3 more.

Uses Team Cymru's free DNS-based IP→ASN mapping; no HTTPS upstream, no auth, no rate-limit headaches.

Category: Network & domains · Tags: security network geolocation asn · Also found as: ip-geolocation geoip ip-lookup geolocate-ip ip-location

TRY IN PLAYGROUND →

Parameters

NameTypeRequiredDescription
ipstringnoIPv4 address to look up (mutually exclusive with host)
hoststringnoHostname to resolve first (also accepts hostname/domain/url/email)

Example request

curl -i -X POST https://agent402.tools/api/asn-info \
  -H "Content-Type: application/json" \
  -d '{"ip":"8.8.8.8"}'

Without payment this returns HTTP 402 Payment Required with the exact price for asn-info; any x402 v2 or MPP client pays it and retries.

Example response

{
  "ip": "8.8.8.8",
  "asn": "AS15169",
  "owner": "GOOGLE",
  "prefix": "8.8.8.0/24",
  "country": "US",
  "registry": "arin",
  "allocationDate": "1992-12-01",
  "queriedAt": "2026-06-19T22:00:00.000Z"
}
FieldTypeAlways presentIn the example
ipstringyes8.8.8.8
asnstringyesAS15169
ownerstringyesGOOGLE
prefixstringyes8.8.8.0/24
countrystringyesUS
registrystringyesarin
allocationDatestringyes1992-12-01
queriedAtstringyes2026-06-19T22:00:00.000Z

From an MCP client

catalog.call {
  "slug": "asn-info",
  "params": {
    "ip": "8.8.8.8"
  }
}

The hosted connector at https://agent402.tools/mcp needs a payment for asn-info; the stdio package pays it from a wallet or from AGENT402_CREDITS_KEY. Local install: npx -y agent402-mcp.

Errors and behavior

Paid call (JavaScript agent)

import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { registerExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

const client = new x402Client();
client.setSpendControls?.(false); // keep your own spending ceiling in code
registerExactEvmScheme(client, { signer: privateKeyToAccount(KEY) });
const payFetch = wrapFetchWithPayment(fetch, client);

const res = await payFetch("https://agent402.tools/api/asn-info", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    "ip": "8.8.8.8"
  }),
});

Part of these workflows

ASN + IP geolocation is one step in these 2 skill packs, each sold as a single call:

Related tools

Certificate transparency search

$0.005 · POST /api/cert-transparency

Search public Certificate Transparency logs for every cert issued to a domain. Two independent public CT search services…

DNS lookup

$0.002 · POST /api/dns-lookup

Resolve any DNS record type for a host: A, AAAA, MX, TXT, CNAME, NS, SOA, CAA, SRV, PTR. Returns the records plus a coun…

DNS propagation check

$0.002 · POST /api/dns-propagation

Resolve the same DNS record against 4 public resolvers (Google, Cloudflare, Quad9, OpenDNS) in parallel; surface diverge…

Gravatar existence check

$0.002 · POST /api/gravatar-check

Check whether an email address has a Gravatar: hashes the normalized email (MD5, pure CPU - the raw address is never sen…

HTTP headers + security analysis

$0.003 · POST /api/http-headers

Fetch a URL and return every response header plus a security analysis: HSTS, CSP, X-Frame-Options, X-Content-Type-Option…

Tech stack detection

$0.005 · POST /api/tech-stack

Detect the technology stack of a public website: CDN, web server, language/runtime, frontend framework (Next.js, Nuxt, S…