One endpoint enriches any IPv4 or IPv6 address with geolocation, ASN, mobile/satellite, VPN/proxy/Tor, cloud, crawler, spam, anycast/multicast, and RIPE network data.
Prefer to see it first? Try the API live — no signup — then come back for the details. The full field list is in the API reference.
GET https://ipquery.info/api
Prefer an Authorization: Bearer API_KEY header. Create and manage keys on the API Keys page. URL-only clients may use ?apiKey=API_KEY when query-key compatibility is enabled; use a dedicated restricted key rather than a primary server key. For public/client-side use, enable Record-Only mode plus an origin allowlist.
| Parameter | Required | Description |
|---|---|---|
ip | No | A single IPv4/IPv6 address. Omit all selectors to query the caller's own IP. |
ipList | No | Comma-separated batch of addresses (whitespace stripped). The same list can be sent in a POST body for larger batches. |
fields | No | Comma-separated response fields to include, for example country_iso_code,is_vpn,risk_score. query_ip_address is always returned. |
tag | No | Arbitrary label (max 20 chars) recorded with successful lookups for analytics segmentation. |
ua | No | User-Agent string to use for crawler detection instead of the request header. Only meaningful with ip. |
reverse | No | Set to true to request bounded reverse-DNS enrichment. |
curl -H "Authorization: Bearer YOUR_API_KEY" "https://ipquery.info/api?ip=8.8.8.8&tag=signup-flow"
const res = await fetch(
"https://ipquery.info/api?ip=8.8.8.8",
{ headers: { Authorization: "Bearer YOUR_API_KEY" } }
);
const data = await res.json();
console.log(data[0].country, data[0].is_vpn);
import requests
r = requests.get("https://ipquery.info/api",
headers={"Authorization": "Bearer YOUR_API_KEY"},
params={"ip": "8.8.8.8"})
result = r.json()[0]
print(result["country"], result["asn_name"])
const https = require("https");
const options = {
hostname: "ipquery.info",
path: "/api?ip=8.8.8.8",
headers: { Authorization: "Bearer YOUR_API_KEY" }
};
https.get(options, (res) => {
let body = "";
res.on("data", (chunk) => (body += chunk));
res.on("end", () => {
const result = JSON.parse(body)[0];
console.log(result.country, result.is_vpn);
});
});
<?php
$query = http_build_query([
"ip" => "8.8.8.8",
]);
$context = stream_context_create(["http" => [
"header" => "Authorization: Bearer YOUR_API_KEY\r\n",
]]);
$json = file_get_contents("https://ipquery.info/api?$query", false, $context);
$result = json_decode($json, true)[0];
echo $result["country"] . " " . $result["asn_name"];
package main
import (
"encoding/json"
"fmt"
"net/http"
)
func main() {
req, _ := http.NewRequest("GET", "https://ipquery.info/api?ip=8.8.8.8", nil)
req.Header.Set("Authorization", "Bearer YOUR_API_KEY")
resp, _ := http.DefaultClient.Do(req)
defer resp.Body.Close()
var results []map[string]interface{}
json.NewDecoder(resp.Body).Decode(&results)
fmt.Println(results[0]["country"], results[0]["asn_name"])
}
require "net/http"
require "json"
require "uri"
uri = URI("https://ipquery.info/api")
uri.query = URI.encode_www_form(ip: "8.8.8.8")
request = Net::HTTP::Get.new(uri)
request["Authorization"] = "Bearer YOUR_API_KEY"
result = JSON.parse(Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request).body }).first
puts "#{result['country']} #{result['asn_name']}"
import java.net.URI;
import java.net.http.*;
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://ipquery.info/api?ip=8.8.8.8"))
.header("Authorization", "Bearer YOUR_API_KEY")
.build();
HttpResponse<String> response =
client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text.Json;
using var client = new HttpClient();
client.DefaultRequestHeaders.Authorization =
new AuthenticationHeaderValue("Bearer", "YOUR_API_KEY");
var json = await client.GetStringAsync("https://ipquery.info/api?ip=8.8.8.8");
using var doc = JsonDocument.Parse(json);
var first = doc.RootElement[0];
Console.WriteLine(first.GetProperty("country").GetString());
Pass a comma-separated ipList, or send a POST body containing a JSON array, JSON object with ips, or plain text/CSV list. The response is an array with one object per address, in order. Batch lookups are capped at 1,000 addresses, consume one unit of quota per successfully enriched address, and are recorded in your analytics charts.
curl -H "Authorization: Bearer YOUR_API_KEY" "https://ipquery.info/api?ipList=8.8.8.8,1.1.1.1,2606:4700:4700::1111"
curl -X POST "https://ipquery.info/api?fields=country_iso_code,is_vpn,risk_score" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '["8.8.8.8","1.1.1.1"]'