API Documentation
High-performance IP geolocation API with <50ms response times
The IPrating.net API v2 provides lightning-fast IP geolocation data with comprehensive information about location, proxy detection, languages, currencies, and more. Built on our internal high-performance infrastructure with multi-region support.
Base URL
https://iprating.net/api/v2
Features
- High-performance direct API with <50ms response times
- Multi-region support (EU, US, ASIA) with automatic failover
- Comprehensive geolocation data including city, region, country
- Proxy and threat detection
- Language and currency information
- Timezone data with IANA identifiers
- User-configurable CORS and rate limiting
All API requests require authentication using your API key. You can obtain your API key from your dashboard.
Authentication Methods
1. Query Parameter (Recommended)
?token=ipr_your_api_key
2. Authorization Header
Authorization: Bearer ipr_your_api_key
3. X-API-Key Header
X-API-Key: ipr_your_api_key
Note: You need to be logged in to see your personal API key.Go to Dashboard
CORS Configuration
If you're making API requests from a browser (client-side), you must configure CORS (Cross-Origin Resource Sharing) to allow requests from your domain. Without proper CORS configuration, browser requests will be blocked by the same-origin policy.
Important: Configure CORS Before Making Browser Requests
Browser-based API requests will fail unless you add your domain to the allowed CORS origins in your account settings.
How to Configure CORS
- Go to your Dashboard
- Navigate to the Account Settings section
- Find the CORS Configuration panel
- Add your domain(s) to the allowed origins list (e.g.,
https://example.com
) - Save your changes
CORS Examples
https://example.com
- Production domainhttps://staging.example.com
- Staging environmenthttp://localhost:3000
- Local developmentServer-Side Requests: If you're making API requests from a server (Node.js, Python, etc.), CORS configuration is not required. CORS only applies to browser-based requests.
/api/v2/{ip}
Get comprehensive geolocation information for any IPv4 or IPv6 address.
Example Request
GET https://iprating.net/api/v2/55.184.117.203?token=ipr_your_api_key
Parameters
Parameter | Type | Required | Description |
---|---|---|---|
ip | string | Yes | IPv4 or IPv6 address to lookup |
token | string | Yes | Your API authentication token |
/api/v2/status
Get API status, health information, and regional configuration. No authentication required.
Example Request
GET https://iprating.net/api/v2/status
All successful responses follow a consistent JSON structure with nested data objects.
Success Response
{ "success": true, "data": { "success": true, "ip": "109.243.146.31", "location": { "country": "Poland", "countryCode": "PL", "region": "Subcarpathia", "city": "Krosno", "timezone": { "name": "Europe/Warsaw", "offset": "+01:00", "iana": "Europe/Warsaw" } }, "proxy": { "isProxy": false, "proxyType": "none", "threat": "none" }, "commerce": { "languages": { "official": ["Polish"], "regional": ["Polish"], "codes": ["pol"] }, "currency": { "official": { "name": "Polish złoty", "symbol": "zł", "code": "PLN" }, "online": { "name": "Polish złoty", "symbol": "zł", "code": "PLN" } }, "is_eu": false }, "ipRating": 0, "metas": { "responseTime": "129ms", "apiResponseTime": "3ms", "version": "v2", "architecture": "high-performance", "provider": "iprating", "region": "EU", "lastUpdated": "2025-10-07T08:35:47.717Z" } }, "statusCode": 200 }
Error Response
{ "success": false, "error": "Invalid API token", "statusCode": 401 }
Detailed description of all fields in the API response.
Root Level
success
Indicates whether the API request was successful. Always true
for successful requests.
data
Contains the main response data with geolocation information.
statusCode
HTTP status code. 200
for successful requests.
Location Object
location.country
Full country name (e.g., “Poland”, “United States”).
location.countryCode
ISO 3166-1 alpha-2 country code (e.g., “PL”, “US”).
location.region
Region, state, or province name (e.g., “Subcarpathia”, “California”).
location.city
City name (e.g., “Krosno”, “Mountain View”).
location.timezone
Timezone information with three fields:
name
- Timezone nameoffset
- UTC offset (e.g., “+01:00”)iana
- IANA timezone identifier
Proxy Object
proxy.isProxy
Indicates whether the IP is a known proxy, VPN, or hosting provider.
proxy.proxyType
Type of proxy detected or “none” if not a proxy.
proxy.threat
Threat level assessment (e.g., “high”, “medium”, “low”, “none”).
Commerce Object
commerce.languages
Language information with arrays for official, regional, and language codes.
commerce.currency
Currency information with official and online commerce currencies. Each contains name, symbol, and ISO 4217 code.
commerce.is_eu
Indicates whether the country is a member of the European Union.
Metas Object
metas.responseTime
Total response time including user network latency (e.g., “129ms”).
metas.apiResponseTime
API response time only, excluding user network (e.g., “3ms”).
metas.version
API version used to generate the response.
metas.provider
Data provider name (“iprating” for v2 API).
metas.region
Active API region (e.g., “EU”, “US”, “ASIA”).
Ready-to-use code examples in popular programming languages.
JavaScript / Node.js
// Using fetch API const response = await fetch( 'https://iprating.net/api/v2/55.184.117.203?token=ipr_your_api_key' ); const result = await response.json(); if (result.success) { const { data } = result; console.log('Country:', data.location.country); console.log('City:', data.location.city); console.log('Is Proxy:', data.proxy.isProxy); console.log('Currency:', data.commerce.currency.official.code); }
Python
import requests response = requests.get( 'https://iprating.net/api/v2/55.184.117.203', params={'token': 'ipr_your_api_key'} ) result = response.json() if result['success']: data = result['data'] print(f"Country: {data['location']['country']}") print(f"City: {data['location']['city']}") print(f"Is Proxy: {data['proxy']['isProxy']}") print(f"Currency: {data['commerce']['currency']['official']['code']}")
cURL
curl "https://iprating.net/api/v2/55.184.117.203?token=ipr_your_api_key"