// v2 · ip-location

Finds IP attributes for a batch of IP addresses.

POSThttps://<tenant>.<api>.fastah.net/ip/batch

Finds IP attributes for a batch of IP addresses.

Authorizations

Authorizationstring · headerrequired

Every request needs a Fastah API key sent as a bearer token or as a query parameter. Keys are issued in the Fastah console.

format: Bearer <token>

Body

application/json · required

ipsstring[]required

1 to 1000 IPv4/IPv6 addresses.

min items: 1 · max items: 1000

Response

200application/json

Ordered per-IP batch results.

resultsrestIpElement[]required

Per-IP lookup results, in the same order as the input `ips` array.

Show child attributes (6)
ipstringrequired

The IP address described by this response.

isGeolocatablebooleanrequired

Indicates whether the IP address can be geolocated. False for non-globally-routable IPs and for infrastructure IPs without a meaningful location.

default: true
approxGeoapproxGeo

Approximate geographic location for this IP address. An accuracy radius in kilometers around the longLat coordinates is provided to indicate confidence in the location estimate.

Show child attributes (15)
countryNamestringrequired

Country name as a display string

countryCodestringrequired

ISO 3166-1 alpha-2 country code

flagEmojistringrequired

The flag emoji corresponding to the country code (e.g. 🇺🇸 for US, 🇮🇳 for IN)

sovereignCountryCodestringrequired

ISO 3166-1 alpha-2 code of the sovereign country. Equals countryCode for independent nations. Differs for dependent territories, e.g. 'US' when countryCode is 'UM' (US Minor Outlying Islands), or 'GB' when countryCode is 'IO' (British Indian Ocean Territory).

min length: 2
stateNamestringrequired

Name of the state, province, or top-level administrative subdivision of a country. May be empty for smaller countries without a commonly-used subdivision, or when placeType is 'country'.

stateCodestringrequired

ISO 3166-2 code, if available, of the state, province, or top-level administrative subdivision. May be empty for countries without a commonly-used subdivision code.

placeNamestringrequired

Name of the resolved location, which may be a city, region, or country depending on placeType

placeTypeenumrequired

The geographic granularity of this location result. A 'city' is the most precise, 'region' indicates a state or province, and 'country' means a country or territory.

allowed: city, region, country
longLatnumber · double[]required

Longitude, Latitude representing the approximate geographical center, to be interpreted together with accuracyRadius - the radius in kilometers around this point as a confidence region.

min items: 2 · max items: 2
boundingBoxnumber · double[]required

The rectangular bounding box of the matched place as [minLong, minLat, maxLong, maxLat], providing the geographic extent of the resolved location.

min items: 4 · max items: 4
accuracyRadiusKmintegerrequired

Confidence radius in kilometers around the center point geo-coordinates in longLat

minimum: 10
tzstringrequired

IANA time zone identifier for this location. May be empty for large-area regions or countries that span multiple time zones.

h3Cellsstring[]required

Array of Uber H3 hexagonal cell indices that cover the geographic extent of this matched place, enabling efficient spatial indexing and hierarchical geofencing.

min items: 0
placeIdGeonamesinteger · int64required

A stable place ID - in this case within the Geonames.org place names database

default: 0
continentCodestringrequired

2-letter continent code

min length: 2
routingDetailsroutingDetails

Details about the routing information for the subnet containing the IP address.

Show child attributes (2)
subnetstring

The CIDR notation of the most specific subnet containing the IP address.

originsorigins[]

Ordered CAIDA RouteViews routing-origin components for the matched prefix. Separate items are multi-origin (MOAS) components in CAIDA's observed-frequency order; an item with asSet=true is one BGP AS set. This is observed routing data, not ownership or registration data.

Show child attributes (2)
asnsasnDetails[]

ASNs in this routing-origin component. For an individual origin the array has one ASN; for asSet=true it contains the members of one BGP AS set.

Show child attributes (4)
asninteger · uint32

The autonomous system number (ASN).

asnNamestring

AS name from CAIDA's AS Organizations snapshot, when available.

orgIdstring

Organization ID associated with this ASN by CAIDA's AS Organizations snapshot, when available.

orgNamestring

Organization name associated with this ASN by CAIDA's AS Organizations snapshot, when available. This is not an ownership claim.

originTypeenum

Indicates whether the origin is an individual ASN or a BGP AS set.

allowed: asn, as_set
explanationstring

Human-readable explanation, including an error message when the lookup failed.

expiresAtinteger · int64required

Cache TTL: do not use or cache this response after this Unix epoch time in milliseconds.

400application/json

Batch validation failure.

ipstring

The IP address which is described in this response

messagestringrequired

A description of what went wrong