API Docs
Quickstart
1
Get your API Key
You'll need an API key to make requests. Sign up for a free account to get one.
2
Make your first request
Make a GET request to the lookup endpoint.
Header Authentication
curl
curl -s "https://api.ipasis.com/v1/lookup?ip=8.8.8.8" -H "X-API-Key: <your_api_key>"
Query Params
curl
curl -s "https://api.ipasis.com/v1/lookup?ip=8.8.8.8&key=<your_api_key>"
Try It
Examples
JavaScript (fetch)
javascript
fetch('https://api.ipasis.com/v1/lookup?ip=8.8.8.8', {
headers: { 'X-API-Key': '<your_api_key>' }
}).then(r => r.json()).then(console.log)Python (requests)
python
import requests
r = requests.get('https://api.ipasis.com/v1/lookup', params={'ip':'8.8.8.8'}, headers={'X-API-Key':'<your_api_key>'})
print(r.json())Go (net/http)
go
package main
import (
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
endpoint := "https://api.ipasis.com/v1/lookup"
u, _ := url.Parse(endpoint)
q := u.Query()
q.Set("ip", "8.8.8.8")
u.RawQuery = q.Encode()
req, _ := http.NewRequest("GET", u.String(), nil)
req.Header.Set("X-API-Key", "<your_api_key>")
resp, err := http.DefaultClient.Do(req)
if err != nil { panic(err) }
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}Java (HttpClient)
java
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Main {
public static void main(String[] args) throws Exception {
String url = "https://api.ipasis.com/v1/lookup?ip=8.8.8.8";
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create(url))
.header("X-API-Key", "<your_api_key>")
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Response Fields
The API returns a JSON object with the following fields:
| Field | Type | Description |
|---|---|---|
| ip | string | The query IP address. |
| city | string | City name. |
| region | string | Region or state name. |
| country | string | Two-letter ISO 3166-1 country code (e.g., US). |
| loc | string | Latitude and Longitude (comma separated). |
| postal | string | Postal or ZIP code. |
| timezone | string | Timezone (IANA format). |
| asn.ASN | string | Autonomous System Number (e.g. AS15169). |
| asn.Name | string | Name of the ASN owner. |
| asn.Route | string | The BGP route block for this IP. |
| asn.Type | string | ASN type (isp, hosting, business, etc). |
| asn.Domain | string | Domain associated with the ASN. |
| company.Name | string | Company name associated with the IP range. |
| company.Domain | string | Company domain name. |
| company.Type | string | Company type. |
| privacy.vpn | boolean | True if the IP belongs to a commercial VPN provider. |
| privacy.proxy | boolean | True if the IP is a known public proxy. |
| privacy.tor | boolean | True if the IP is a Tor exit node. |
| privacy.relay | boolean | True if the IP is an iCloud Private Relay or similar privacy network. |
| privacy.hosting | boolean | True if the IP belongs to a hosting provider/datacenter (non-residential). |
| privacy.AI | boolean | True if the IP belongs to an AI provider like OpenAI etc. |
| privacy.abuse | boolean | True if the IP has been reported for abuse recently. |
| privacy.crawler | boolean | True if the IP is a known crawler (e.g., Googlebot, Bingbot). |
| privacy.Service | string | Specific service name if identified (e.g. "NordVPN"). |
| abuse.Address | string | Abuse contact address. |
| abuse.Country | string | Abuse contact country. |
| abuse.Email | string | Abuse contact email. |
| abuse.Name | string | Abuse contact name. |
| abuse.Network | string | Network CIDR involved in abuse reports. |
| abuse.Phone | string | Abuse contact phone. |
| domains.Total | number | Total number of domains hosted on this IP. |
| domains.Page | number | Current page number for domain pagination. |
| domains.Domains | string[] | List of domains hosted on this IP (may be null/empty). |
Errors
Standard HTTP status codes are used to indicate success or failure.
| Code | Meaning | Description |
|---|---|---|
| 400 | Bad Request | The IP address provided was invalid. |
| 401 | Unauthorized | Missing or invalid API key. |
| 403 | Forbidden | Quota exceeded or account inactive. |
| 429 | Too Many Requests | Rate limit exceeded. |
| 500 | Internal Error | Something went wrong on our end. |
Rate Limits
We limit the number of requests you can make to ensure fair usage and stability.
- Free Plan: 1,000 requests per day.
- Starter: 100,000 requests per month.
- Pro 250k: 250,000 requests per month.
- Pro 500k: 500,000 requests per month.
- Scale: 1,000,000 requests per month.
- Enterprise: 2,000,000 requests per month.
- Enterprise XL: 5,000,000 requests per month.
If you exceed the limit, you will receive a 429 Too Many Requests response. Check the X-RateLimit-Limit and X-RateLimit-Remaining response headers to track your usage.
MMDB Snapshot
We provide an ipasis.mmdb snapshot compatible with the included GeoAPI.