Single AS lookup
Look up one Autonomous System by its number.
https://api.ipregistry.co/AS1?key=YOUR_API_KEY Append an AS number, prefixed with AS, to the API base URL.
- Cost
- 1 credit
- Call from
- Server Keeps your API key private
The Ipregistry API looks up IP addresses and Autonomous Systems and parses User-Agent strings. Each resource can be queried one value at a time, in batches, or for the client making the request.
8 endpoints under https://api.ipregistry.co. Every request needs your API key.
Autonomous System
IP address
Look up one Autonomous System by its number.
https://api.ipregistry.co/AS1?key=YOUR_API_KEY Append an AS number, prefixed with AS, to the API base URL.
Look up to 16 Autonomous Systems in one request.
https://api.ipregistry.co/AS7,AS42?key=YOUR_API_KEY Append several comma-separated AS numbers to the API base URL, or POST them as a JSON array. AS numbers and IP addresses can be mixed in the same batch.
JSON array as POST body
curl --data '["AS1", "AS6", "AS42"]' \
--header "Content-Type: application/json" \
--request POST "https://api.ipregistry.co/?key=YOUR_API_KEY" results array, one AS data object per requested value. XML responses wrap <result> elements in a <results> element.Look up the Autonomous System of the address making the request.
https://api.ipregistry.co/AS?key=YOUR_API_KEY Returns the Autonomous System of the calling address, so you can look up your own network, or a visitor's, without knowing the IP address or AS number in advance.
Calling from the browser or an app exposes your API key to anyone who opens it. Origin filtering does not prevent that: it is enforced by browsers only, so scripts can still use the key. To keep the key private, read the visitor's IP address on your server and call the Single IP lookup: its connection.asn field gives the Autonomous System.
Look up one IPv4 or IPv6 address.
https://api.ipregistry.co/66.165.2.7?key=YOUR_API_KEY The primary Ipregistry endpoint. Append any IPv4 or IPv6 address to the API base URL.
Look up to 1,024 IP addresses in one request.
https://api.ipregistry.co/66.165.2.7,2a01:e35:2f22:e3d0::2,1.1.1.1?key=YOUR_API_KEY Append several comma-separated addresses to the API base URL, or POST them as a JSON array. IPv4 and IPv6 addresses can be mixed, which makes bulk processing much faster.
JSON array as POST body
curl --data '["66.165.2.7", "2a01:e35:2f22:e3d0::2", "1.1.1.1"]' \
--header "Content-Type: application/json" \
--request POST "https://api.ipregistry.co/?key=YOUR_API_KEY" results array, one IP data object per requested value. XML responses wrap <result> elements in a <results> element.Look up the address making the request, plus its parsed User-Agent.
https://api.ipregistry.co/?key=YOUR_API_KEY Returns data for the calling address, so you can look up your own address, or a visitor's, without knowing it in advance. The response also includes User-Agent fields for the client that made the request.
Calling from the browser or an app exposes your API key to anyone who opens it. Origin filtering does not prevent that: it is enforced by browsers only, so scripts can still use the key. To keep the key private, read the visitor's IP address and User-Agent header on your server and call the Single IP lookup and User-Agent parsing endpoints.
Parse up to 256 User-Agent strings in one request.
https://api.ipregistry.co/user_agent?key=YOUR_API_KEY Detect the browser, device and operating system behind any User-Agent string, for native app download prompts, tailored content, crawler protection and more. POST a JSON array of strings.
Request
curl --data '["Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:88.0) Gecko/20100101 Firefox/88.0"]' \
--header "Content-Type: application/json" \
--request POST "https://api.ipregistry.co/user_agent?key=YOUR_API_KEY" Parse the User-Agent of the client making the request.
https://api.ipregistry.co/user_agent?key=YOUR_API_KEY Call it from the browser or app to get the parsed User-Agent of that client, with no extra step. Add a ua query parameter to parse a specific value instead.
Calling from the browser or an app exposes your API key to anyone who opens it. Origin filtering does not prevent that: it is enforced by browsers only, so scripts can still use the key. To keep the key private, forward the visitor's User-Agent header from your server to the User-Agent parsing endpoint.
ua, the response describes your server's HTTP client.