senapati
Documentation index

ASN Info

Who runs a network. Give an AS number and get the registry's record for it; give an IP address and get the AS that announces it, the route that covers it, and the provider range lists (AWS, Google Cloud, Cloudflare, Apple relay and the rest) that claim it. Either way the holder is classified as hosting, ISP or business, and networks with a record of abuse-tolerant hosting are flagged.

POST/api/asn-infoCosts 1 creditAPI key

Describe an autonomous system, by number or by IP (1 credit)

Two kinds of query

  • An AS number, written AS15169 or 15169. The regional registry's RDAP record gives the name, holder, country, status, dates and abuse contact.
  • An IP address. The origin AS comes from routing data (a local database when present, otherwise Team Cymru's DNS zones), then the registry record is fetched for it. Private and reserved addresses are rejected with a 422.

Reading the report

  • type is classified from the holder's name: hosting (cloud, data centre, VPS providers), isp (telecoms, broadband, mobile) or business for everything else. It is the same heuristic the IP report uses for is_hosting.
  • is_suspicious_hosting is true for the networks on our list of bulletproof or abuse-tolerant hosters, the list the domain report uses for its suspicious_hosting_check engine.
  • provider_ranges lists every provider-published range that contains the address, most specific first, with the service and region the provider labels it with.

Issue codes

codetypeMeans
LOOKUP_FAILEDerrorThe registry did not answer
SUSPICIOUS_HOSTINGwarningThe AS is on the abuse-tolerant hosting list
NO_ORIGIN_ASinfoNo AS announces the address, or the origin lookup did not answer
ASN_NOT_ALLOCATEDinfoThe number is private-use, reserved or unassigned

Request

JSON body
FieldTypeDescription
query*stringAn AS number (AS15169 or 15169), or a public IP address to find the AS that announces it

Authenticate with API key. Send it as the X-API-Key header.

curl -X POST "https://api.senapati.io/api/asn-info" \
  -H "X-API-Key: $SENAPATI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query":"8.8.8.8"}'

Response

Every success is wrapped in { "data": … } with a request_id; the fields below describe data. See Errors for the failure shape.

response: 200 OKASNInfoData
{
"request_id": "req_ef7099eb",
"timestamp": "2026-10-28T07:39:12.664853+00:00",
"data": {
"query": "8.8.8.8",
"ip": "8.8.8.8",
"asn": 15169,
"asn_text": "AS15169",
"name": "GOOGLE",
"organization": "Google LLC",
"country": "US",
"registry": "arin",
"type": "business",
"abuse_email": "[email protected]",
"registration_date": "2000-03-30T05:00:00+00:00",
"updated_date": "2012-02-24T14:44:34+00:00",
"status": [
"active"
],
"asn_range": null,
"announced_prefix": "8.8.8.0/24",
"provider_ranges": [
{
"source": "google",
"prefix": "8.8.8.0/24",
"service": null,
"region": null
}
],
"is_suspicious_hosting": false,
"lookup_status": "ok",
"lookup_failed": false,
"issues_found": [],
"elapsed_ms": 1536
}
}

announced_prefix and provider_ranges are filled only when the query is an address; for an AS number they are null and empty.

data · ASNInfoData
FieldTypeDescription
query*string
ip*string | nullSet when the query was an IP address
asn*integer | null
asn_text*string | nulle.g. AS15169
name*string | nullThe AS name, e.g. GOOGLE
organization*string | nullThe holder's organisation
country*string | null
registry*string | nullRegional registry: arin, ripe, apnic, lacnic or afrinic
type*"hosting" | "isp" | "business" | nullClassified from the holder's name
abuse_email*string | null
registration_date*string | null
updated_date*string | null
status*string[]
asn_range*string | nullSet when the registry answered with a block of AS numbers
announced_prefix*string | nullThe route that covers the IP, when the query was an address
provider_ranges*ProviderRangeMatch[]Provider range lists that contain the IP, when one was given
↳ source*stringRange list id, e.g. aws, gcp, cloudflare
↳ prefix*string
↳ service*string | null
↳ region*string | null
is_suspicious_hosting*booleanThe AS is on our list of abuse-tolerant hosting networks
lookup_status*"ok" | "not_found" | "error" | null
lookup_failed*booleanTrue when the registry did not answer
issues_found*Finding[]
↳ code*stringStable machine-readable code, e.g. CERT_EXPIRED
↳ type*"error" | "warning" | "info"error: clients or browsers reject it; warning: it works but is weaker than it should be; info: a note, not a defect
↳ message*stringWhat was found and why it matters
elapsed_msintegerdefault 0

Errors

  • 401missing or invalid API key / token
  • 402not enough credits on the account
  • 422the request body or a parameter failed validation
  • 429plan rate limit exceeded

Nested objects

data.provider_ranges[] · ProviderRangeMatch
FieldTypeDescription
source*stringRange list id, e.g. aws, gcp, cloudflare
prefix*string
service*string | null
region*string | null
data.issues_found[] · Finding
FieldTypeDescription
code*stringStable machine-readable code, e.g. CERT_EXPIRED
type*"error" | "warning" | "info"error: clients or browsers reject it; warning: it works but is weaker than it should be; info: a note, not a defect
message*stringWhat was found and why it matters

Notes

  • asn_range is set when the registry answers with a block of numbers rather than one; asn is still the one you asked for.
  • The prefixes an AS announces are not listed: that needs BGP data this service does not hold. announced_prefix is the one route covering the queried address.
  • A report with lookup_failed: true got no answer from the registry or the routing lookup; retry it before acting on it.