Skip to main content

Response Format

All LimesIndex API responses follow a consistent JSON structure. This page documents the complete response schema and field definitions.

Response Structure

All successful API responses follow this structure:

{
"data": { ... },
"meta": { ... }
}
FieldTypeDescription
dataobjectThe response payload
metaobjectRequest metadata

Meta Object

The meta object is included in every response and contains request metadata:

{
"meta": {
"request_id": "550e8400-e29b-41d4-a716-446655440000",
"processing_time_ms": 5,
"cache_status": "HIT",
"dataset_version": 1
}
}
FieldTypeDescription
request_idstring (UUID)Unique identifier for the request (useful for support)
processing_time_msintegerServer-side processing time in milliseconds
cache_statusstringCache status: HIT (served from cache) or MISS (fresh lookup)
dataset_versionintegerVersion of the dataset used for this lookup

IP Lookup Response

Single IP Lookup

{
"data": {
"ip": "8.8.8.8",
"prefix": "8.8.8.0/24",
"asn": 15169,
"asn_name": "Google LLC",
"country": "US",
"rir": "ARIN",
"connection_type": "datacenter",
"detection": {
"is_datacenter": true,
"is_tor_exit": false,
"is_proxy": false,
"is_vpn": false,
"is_residential": false,
"is_mobile": false,
"is_ai_crawler": false,
"cloud_provider": "Google Cloud"
},
"threat": {
"score": 0,
"level": "low"
}
},
"meta": { ... }
}

IP Lookup Fields

FieldTypeRequiredDescription
ipstringYesThe queried IP address (normalized)
prefixstringYesCIDR prefix containing this IP
asnintegerYesAutonomous System Number
asn_namestringNoName of the organization owning the ASN
countrystringYesISO 3166-1 alpha-2 country code
rirstringNoRegional Internet Registry
connection_typestringNoType of connection
detectionobjectNoDetection flags
threatobjectNoThreat information

Connection Types

ValueDescription
residentialHome/consumer internet connection
datacenterServer/cloud hosting provider
mobileMobile carrier network
businessBusiness/enterprise network
educationEducational institution

Regional Internet Registries (RIR)

ValueRegion
ARINNorth America
RIPEEurope, Middle East, Central Asia
APNICAsia-Pacific
LACNICLatin America, Caribbean
AFRINICAfrica

Detection Object

The detection object contains boolean flags for various IP classifications:

{
"detection": {
"is_datacenter": true,
"is_tor_exit": false,
"is_proxy": false,
"is_vpn": false,
"is_residential": false,
"is_mobile": false,
"is_ai_crawler": false,
"ai_company": "OpenAI",
"cloud_provider": "AWS"
}
}
FieldTypeDescription
is_datacenterbooleanIP belongs to a datacenter or hosting provider
is_tor_exitbooleanIP is a known Tor exit node
is_proxybooleanIP is a known proxy server
is_vpnbooleanIP belongs to a VPN provider
is_residentialbooleanIP is a residential/home connection
is_mobilebooleanIP is from a mobile carrier
is_ai_crawlerbooleanIP is used by an AI company for web crawling
ai_companystringName of the AI company (only if is_ai_crawler is true)
cloud_providerstringName of the cloud provider (only if detected)

Known AI Crawlers

When is_ai_crawler is true, the ai_company field may contain:

  • OpenAI - GPTBot, ChatGPT-User
  • Anthropic - ClaudeBot
  • Google - Google-Extended
  • Meta - Meta-ExternalAgent
  • Cohere - cohere-ai
  • Common Crawl - CCBot
  • And others...

Known Cloud Providers

When detected, the cloud_provider field may contain:

  • AWS - Amazon Web Services
  • Google Cloud - Google Cloud Platform
  • Azure - Microsoft Azure
  • Cloudflare - Cloudflare
  • DigitalOcean - DigitalOcean
  • Linode - Linode/Akamai
  • OVH - OVHcloud
  • Hetzner - Hetzner
  • And others...

Threat Object

The threat object provides risk assessment for the IP:

{
"threat": {
"score": 75,
"level": "high",
"explanation": [
"Known malicious IP range",
"Associated with spam activity"
]
}
}
FieldTypeDescription
scoreintegerThreat score from 0 (safe) to 100 (high risk)
levelstringHuman-readable threat level
explanationarrayReasons contributing to the score

Threat Levels

LevelScore RangeDescription
low0-24No significant risk detected
medium25-49Some risk factors present
high50-74Significant risk factors
critical75-100Known malicious activity

Threat Explanations

Common explanations include:

  • "Known malicious IP range"
  • "Associated with spam activity"
  • "Part of botnet infrastructure"
  • "Scanning activity detected"
  • "Previous abuse reports"
  • "Tor exit node"
  • "Open proxy"

Batch Lookup Response

Batch lookups return a map of IP addresses to their results:

{
"data": {
"8.8.8.8": {
"ip": "8.8.8.8",
"prefix": "8.8.8.0/24",
"asn": 15169,
"asn_name": "Google LLC",
"country": "US",
"detection": { ... },
"threat": { ... }
},
"1.1.1.1": {
"ip": "1.1.1.1",
"prefix": "1.1.1.0/24",
"asn": 13335,
"asn_name": "Cloudflare, Inc.",
"country": "US",
"detection": { ... },
"threat": { ... }
}
},
"meta": { ... }
}
Missing IPs

If an IP is not found in the database, it will be omitted from the results. Always check if an IP exists in the response.

ASN Lookup Response

{
"data": {
"asn": 15169,
"name": "Google LLC",
"country": "US",
"rir": "ARIN",
"allocation_date": "2000-03-30"
},
"meta": { ... }
}

ASN Fields

FieldTypeDescription
asnintegerAutonomous System Number
namestringOrganization name
countrystringISO 3166-1 alpha-2 country code
rirstringRegional Internet Registry
allocation_datestringDate of ASN allocation (YYYY-MM-DD)

ASN with Prefixes

When include_prefixes=true:

{
"data": {
"asn": 15169,
"name": "Google LLC",
"country": "US",
"rir": "ARIN",
"allocation_date": "2000-03-30",
"prefixes": [
{
"prefix": "8.8.8.0/24",
"country": "US",
"is_datacenter": true,
"threat_score": 0
}
],
"total_prefixes": 1234
},
"meta": { ... }
}
FieldTypeDescription
prefixesarrayList of IP prefixes
total_prefixesintegerTotal number of prefixes for this ASN

Error Response

All error responses follow this format:

{
"data": {
"error": "invalid IP address",
"code": "INVALID_IP",
"details": "Expected IPv4 or IPv6 format"
},
"meta": {
"processing_time_ms": 0
}
}

Error Fields

FieldTypeDescription
errorstringHuman-readable error message
codestringMachine-readable error code
detailsstringAdditional error details (optional)

Error Codes

CodeHTTP StatusDescription
MISSING_IP400IP parameter is required but missing
INVALID_IP400IP address format is invalid
INVALID_JSON400Request body is not valid JSON
MISSING_IPS400IPs array is required for batch lookup
BATCH_TOO_LARGE400Batch size exceeds limit
INVALID_ASN400ASN parameter is invalid
UNAUTHORIZED401Missing or invalid API key
NOT_FOUND404No data found for the IP or ASN
RATE_LIMIT_EXCEEDED429Rate limit exceeded
LOOKUP_ERROR500Internal lookup error
NOT_CONFIGURED503Service not properly configured

Statistics Response

{
"data": {
"version": 1,
"total_ranges": 1500000,
"total_asns": 75000,
"cache_size": 50000,
"cache_hit_rate": 0.85,
"lookups_total": 1000000,
"lookups_cached": 850000
},
"meta": { ... }
}
FieldTypeDescription
versionintegerCurrent dataset version
total_rangesintegerNumber of IP ranges in the dataset
total_asnsintegerNumber of ASNs in the dataset
cache_sizeintegerMaximum cache entries
cache_hit_ratefloatCache hit rate (0.0 to 1.0)
lookups_totalintegerTotal lookups performed
lookups_cachedintegerLookups served from cache

TypeScript Definitions

For TypeScript users, here are the complete type definitions:

interface Meta {
request_id: string;
processing_time_ms: number;
cache_status?: 'HIT' | 'MISS';
dataset_version?: number;
}

interface Detection {
is_datacenter: boolean;
is_tor_exit: boolean;
is_proxy: boolean;
is_vpn: boolean;
is_residential: boolean;
is_mobile: boolean;
is_ai_crawler: boolean;
ai_company?: string;
cloud_provider?: string;
}

interface Threat {
score: number;
level: 'low' | 'medium' | 'high' | 'critical';
explanation?: string[];
}

interface IPLookupResult {
ip: string;
prefix: string;
asn: number;
asn_name?: string;
country: string;
rir?: 'ARIN' | 'RIPE' | 'APNIC' | 'LACNIC' | 'AFRINIC';
connection_type?: 'residential' | 'datacenter' | 'mobile' | 'business' | 'education';
detection?: Detection;
threat?: Threat;
}

interface IPLookupResponse {
data: IPLookupResult;
meta: Meta;
}

interface BatchLookupResponse {
data: Record<string, IPLookupResult>;
meta: Meta;
}

interface ASNInfo {
asn: number;
name: string;
country: string;
rir: 'ARIN' | 'RIPE' | 'APNIC' | 'LACNIC' | 'AFRINIC';
allocation_date: string;
}

interface ASNPrefix {
prefix: string;
country: string;
is_datacenter: boolean;
threat_score: number;
}

interface ASNInfoWithPrefixes extends ASNInfo {
prefixes: ASNPrefix[];
total_prefixes: number;
}

interface ASNLookupResponse {
data: ASNInfo | ASNInfoWithPrefixes;
meta: Meta;
}

interface ErrorData {
error: string;
code: string;
details?: string;
}

interface ErrorResponse {
data: ErrorData;
meta: Meta;
}

Content Types

Request Content-Type

For POST requests (batch lookup), set:

Content-Type: application/json

Response Content-Type

All API responses use:

Content-Type: application/json; charset=utf-8

Accept Header

While optional, you can explicitly request JSON:

Accept: application/json

Encoding

  • All responses are UTF-8 encoded
  • IP addresses are normalized (e.g., IPv6 addresses are fully expanded)
  • Dates are in ISO 8601 format (YYYY-MM-DD)
  • Timestamps are Unix epoch (seconds since 1970-01-01 00:00:00 UTC)