API Documentation

High-performance IP geolocation API with <50ms response times

v2 API
Production Ready
Multi-Region
Overview

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.

<50ms
Average Response Time
99.9%
Uptime SLA
IPv4 & IPv6
Full 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
Authentication

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

  1. Go to your Dashboard
  2. Navigate to the Account Settings section
  3. Find the CORS Configuration panel
  4. Add your domain(s) to the allowed origins list (e.g., https://example.com)
  5. Save your changes

CORS Examples

https://example.com- Production domain
https://staging.example.com- Staging environment
http://localhost:3000- Local development

Server-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.

Endpoints
GET
/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

ParameterTypeRequiredDescription
ipstring
Yes
IPv4 or IPv6 address to lookup
tokenstring
Yes
Your API authentication token
GET
/api/v2/status

Get API status, health information, and regional configuration. No authentication required.

Example Request

GET https://iprating.net/api/v2/status
Response Structure

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
}
Field Reference

Detailed description of all fields in the API response.

Root Level

success
boolean

Indicates whether the API request was successful. Always true for successful requests.

data
object

Contains the main response data with geolocation information.

statusCode
number

HTTP status code. 200 for successful requests.

Location Object

location.country
string

Full country name (e.g., “Poland”, “United States”).

location.countryCode
string

ISO 3166-1 alpha-2 country code (e.g., “PL”, “US”).

location.region
string

Region, state, or province name (e.g., “Subcarpathia”, “California”).

location.city
string

City name (e.g., “Krosno”, “Mountain View”).

location.timezone
object

Timezone information with three fields:

  • name - Timezone name
  • offset - UTC offset (e.g., “+01:00”)
  • iana - IANA timezone identifier

Proxy Object

proxy.isProxy
boolean

Indicates whether the IP is a known proxy, VPN, or hosting provider.

proxy.proxyType
string

Type of proxy detected or “none” if not a proxy.

proxy.threat
string

Threat level assessment (e.g., “high”, “medium”, “low”, “none”).

Commerce Object

commerce.languages
object

Language information with arrays for official, regional, and language codes.

commerce.currency
object

Currency information with official and online commerce currencies. Each contains name, symbol, and ISO 4217 code.

commerce.is_eu
boolean

Indicates whether the country is a member of the European Union.

Metas Object

metas.responseTime
string

Total response time including user network latency (e.g., “129ms”).

metas.apiResponseTime
string

API response time only, excluding user network (e.g., “3ms”).

metas.version
string

API version used to generate the response.

metas.provider
string

Data provider name (“iprating” for v2 API).

metas.region
string

Active API region (e.g., “EU”, “US”, “ASIA”).

Code Examples

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"
IPrating - Enterprise Geolocation API