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
Country and city lookup
ISP identification
VPN detection
Support for both IPv4 and IPv6 addresses
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.
GET
https://api.requiems.xyz/v1/tech/ip
Try it out
Live DemoRequest
Sending request...
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://api.requiems.xyz/v1/tech/ip" \
-H "requiems-api-key: YOUR_API_KEY"
import requests
url = "https://api.requiems.xyz/v1/tech/ip"
headers = {"requiems-api-key": "YOUR_API_KEY"}
response = requests.get(url, headers=headers)
print(response.json())
const response = await fetch('https://api.requiems.xyz/v1/tech/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://api.requiems.xyz/v1/tech/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
internal_error
Unexpected server error
Get IP Info for IP
Get geolocation and network information for a specific IP address.
GET
https://api.requiems.xyz/v1/tech/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)
Sending request...
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://api.requiems.xyz/v1/tech/ip/8.8.8.8" \
-H "requiems-api-key: YOUR_API_KEY"
import requests
url = "https://api.requiems.xyz/v1/tech/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://api.requiems.xyz/v1/tech/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://api.requiems.xyz/v1/tech/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
bad_request
The IP address is invalid
internal_error
Unexpected server error
Frequently Asked Questions
Accuracy varies by IP type. ISP and hosting provider IPs typically have city-level accuracy (80-95% accurate), while residential IPs can be accurate to within a few kilometers. Mobile IPs are generally less accurate.
The is_vpn field indicates whether the IP is known to belong to a VPN. This is useful for fraud detection β users hiding behind VPNs may pose higher risk for certain use cases.
Yes, both IPv4 and IPv6 addresses are fully supported.
Private IP addresses (like 192.168.x.x, 10.x.x.x, 172.16-31.x.x) do not have geolocation data publicly assigned. The API returns the IP with empty location fields for private addresses.