IP Geolocation
Get geolocation data for any IP address including country, city, ISP, and VPN detection. Use this endpoint to enrich user data with location information for personalization, fraud detection, or content localization.
Overview
Use Cases
- User location personalization
- Fraud detection and risk scoring
- Content localization and geo-targeting
- Analytics and user insights
- Compliance and regulatory requirements
Features
API Endpoints
Get IP Info (Caller IP)
Get geolocation and network information for the requesting client's IP address. Useful when you want information about the user making the request without specifying an IP explicitly.
https://requiems.xyz/v1/networking/ip
Try it out
Live DemoRequest
Response Fields
| Field | Type | Description |
|---|---|---|
| ip | string |
The IP address that was looked up (the requesting client's IP) |
| country | string |
Country name where the IP is located |
| country_code | string |
Two-letter ISO country code (e.g., "US", "GB", "DE") |
| city | string |
City name where the IP is located |
| isp | string |
Internet Service Provider providing the IP |
| is_vpn | boolean |
True when the IP belongs to a known VPN |
Code Examples
curl "https://requiems.xyz/v1/networking/ip" \
-H "requiems-api-key: YOUR_API_KEY"
import requests
url = "https://requiems.xyz/v1/networking/ip"
headers = {"requiems-api-key": "YOUR_API_KEY"}
response = requests.get(url, headers=headers)
print(response.json())
const response = await fetch('https://requiems.xyz/v1/networking/ip', {
headers: { 'requiems-api-key': 'YOUR_API_KEY' }
});
const data = await response.json();
console.log(data.data.country, data.data.city);
require 'net/http'
uri = URI('https://requiems.xyz/v1/networking/ip')
request = Net::HTTP::Get.new(uri)
request['requiems-api-key'] = 'YOUR_API_KEY'
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) do |http|
http.request(request)
end
puts JSON.parse(response.body)
Error Responses
Unexpected server error
Get IP Info for IP
Get geolocation and network information for a specific IP address.
https://requiems.xyz/v1/networking/ip/{ip}
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| ip | string |
Required | The IP address to look up (supports IPv4 and IPv6) |
Try it out
Live DemoRequest
The IP address to look up (supports IPv4 and IPv6)
Response Fields
| Field | Type | Description |
|---|---|---|
| ip | string |
The IP address that was looked up |
| country | string |
Country name where the IP is located |
| country_code | string |
Two-letter ISO country code (e.g., "US", "GB", "DE") |
| city | string |
City name where the IP is located |
| isp | string |
Internet Service Provider providing the IP |
| is_vpn | boolean |
True when the IP belongs to a known VPN |
Code Examples
curl "https://requiems.xyz/v1/networking/ip/8.8.8.8" \
-H "requiems-api-key: YOUR_API_KEY"
import requests
url = "https://requiems.xyz/v1/networking/ip/8.8.8.8"
headers = {"requiems-api-key": "YOUR_API_KEY"}
response = requests.get(url, headers=headers)
print(response.json())
const response = await fetch('https://requiems.xyz/v1/networking/ip/8.8.8.8', {
headers: { 'requiems-api-key': 'YOUR_API_KEY' }
});
const data = await response.json();
console.log(data.data.country, data.data.city);
require 'net/http'
uri = URI('https://requiems.xyz/v1/networking/ip/8.8.8.8')
request = Net::HTTP::Get.new(uri)
request['requiems-api-key'] = 'YOUR_API_KEY'
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) do |http|
http.request(request)
end
puts JSON.parse(response.body)
Error Responses
The IP address is invalid
Unexpected server error
Batch IP Geolocation
Look up geolocation data for up to 50 IP addresses in a single request. Results are returned in input order. Per-item errors are reported inline.
https://requiems.xyz/v1/networking/ip/info/batch
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| ips | array<string> |
Required | List of IP addresses to look up (1β50 items, each must be a valid IPv4 or IPv6 address). |
Try it out
Live DemoRequest
List of IP addresses to look up (1β50 items, each must be a valid IPv4 or IPv6 address).
Response Fields
| Field | Type | Description |
|---|---|---|
| results | array<object> |
Per-item results in input order. |
| results[].ip | string |
The IP address that was looked up. |
| results[].result | object |
Geolocation data (omitted on error). Same fields as the single-item endpoint. |
| results[].error | string |
Error message if the lookup failed (omitted on success). |
| total | integer |
Total number of items processed. |
Code Examples
curl -X POST https://requiems.xyz/v1/networking/ip/info/batch \
-H "requiems-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"ips": ["8.8.8.8", "1.1.1.1"]}'
import requests
url = "https://requiems.xyz/v1/networking/ip/info/batch"
headers = {
"requiems-api-key": "YOUR_API_KEY",
"Content-Type": "application/json"
}
payload = {"ips": ["8.8.8.8", "1.1.1.1"]}
response = requests.post(url, headers=headers, json=payload)
for item in response.json()["data"]["results"]:
if item.get("result"):
print(item["ip"], item["result"]["country"])
const response = await fetch('https://requiems.xyz/v1/networking/ip/info/batch', {
method: 'POST',
headers: {
'requiems-api-key': 'YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({ ips: ['8.8.8.8', '1.1.1.1'] })
});
const { data } = await response.json();
data.results.forEach(item => {
if (item.result) console.log(item.ip, item.result.country);
});
require 'net/http'
require 'json'
uri = URI('https://requiems.xyz/v1/networking/ip/info/batch')
request = Net::HTTP::Post.new(uri)
request['requiems-api-key'] = 'YOUR_API_KEY'
request['Content-Type'] = 'application/json'
request.body = { ips: ['8.8.8.8', '1.1.1.1'] }.to_json
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) do |http|
http.request(request)
end
data = JSON.parse(response.body)['data']
data['results'].each do |item|
puts "#{item['ip']}: #{item['result']['country']}" if item['result']
end
Error Responses
The ips array is missing, empty, exceeds 50 items, or contains an invalid IP address.
The request body is missing or malformed.