API Documentation
Access IP geolocation and ASN data programmatically with our free REST API.
Authentication required
All API requests require a valid API key. You can pass it as a Bearer token or query parameter.
Via Authorization header (recommended)
Authorization: Bearer YOUR_API_KEY
Via query parameter
https://ipmeu.ro/api/lookup?key=YOUR_API_KEY&ip=8.8.8.8
Create a free account to get your API key: Create account
Base URL
https://ipmeu.ro/api
All endpoints are relative to this base URL. HTTPS is required.
/api/lookup
Look up geolocation and network information for any IP address.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| key | string | Required | Your API key. Get one by registering a free account. |
| ip | string | Optional | IP address to look up. If omitted, uses the requester's IP. |
Example Request
curl -H "Authorization: Bearer YOUR_API_KEY" \
"https://ipmeu.ro/api/lookup?ip=8.8.8.8"
Example Response
{
"status": "success",
"data": {
"ip": "8.8.8.8",
"version": 4,
"hostname": "dns.google",
"geo": {
"country": "United States",
"country_code": "US",
"region": "California",
"region_code": "CA",
"city": "Mountain View",
"postal_code": "94043",
"latitude": 37.386,
"longitude": -122.0838,
"timezone": "America/Los_Angeles",
"continent": "North America",
"continent_code": "NA"
},
"asn": {
"number": 15169,
"name": "Google LLC",
"description": "Google LLC - AS15169",
"country": "United States",
"country_code": "US",
"registry": "ARIN",
"allocated": "2000-03-30",
"total_ips": 16777216
},
"whois": {
"net_range": "8.8.8.0/24",
"net_name": "GOGL",
"org_name": "Google LLC",
"org_id": "GOGL",
"country": "US",
"abuse_email": "network-abuse@google.com",
"registered": "2000-03-30",
"updated": "2014-12-01"
},
"security": {
"vpn": false,
"proxy": false,
"tor": false,
"threat_score": 0
}
}
}
Response Fields
All fields and their types returned by the API.
ip
string
The queried IP address (IPv4 or IPv6).
version
integer
IP version: 4 for IPv4, 6 for IPv6.
hostname
string
Reverse DNS hostname. Empty string if no PTR record exists.
geo object
country
string
Full country name.
country_code
string
ISO 3166-1 alpha-2 country code (e.g. "US", "RO").
region
string
Region or state name.
region_code
string
ISO region code (e.g. "CA", "AB").
city
string
City name.
postal_code
string
Postal or ZIP code.
latitude
float
Latitude coordinate (approximate).
longitude
float
Longitude coordinate (approximate).
timezone
string
IANA timezone identifier (e.g. "America/Los_Angeles").
continent
string
Continent name.
continent_code
string
Two-letter continent code (e.g. "EU", "NA").
asn object
number
integer
Autonomous System Number (integer).
name
string
ASN organization name.
description
string
Full ASN description string.
country
string|null
Country where the ASN is registered. null if unknown.
country_code
string|null
ISO country code of the ASN. null if unknown.
registry
string|null
Regional Internet Registry: ARIN, RIPE NCC, APNIC, LACNIC, or AFRINIC. null if unknown.
allocated
string|null
Date the network block was first allocated (YYYY-MM-DD). Derived from WHOIS when available. null if unknown.
total_ips
integer|null
Total number of IP addresses in the network block. Calculated from the CIDR prefix. null if unknown.
whois object
net_range
string|null
Network range or CIDR block (e.g. "8.8.8.0/24" or "2a04::/32").
net_name
string|null
Short network name as registered in the RIR database.
org_name
string|null
Full organization name of the network owner.
org_id
string|null
Organization ID or handle in the RIR database.
country
string|null
ISO country code from the WHOIS record.
abuse_email
string|null
Abuse contact email address. Use this to report network abuse.
registered
string|null
Network registration date (ISO 8601 format).
updated
string|null
Date the WHOIS record was last updated.
security object
vpn
boolean
true if the IP is associated with a known VPN provider or hosting network.
proxy
boolean
true if the IP is detected as an open proxy.
tor
boolean
true if the IP is a known Tor exit node (IPv4 only).
threat_score
integer
Threat score from 0 (clean) to 100 (high risk). Combines VPN, proxy and Tor signals.
HTTP Status Codes
Error response format
{
"status": "error",
"error": "API key is required."
}
Rate Limits
The free API is rate-limited to ensure fair usage for all users.
Limits reset at midnight UTC. Exceeding the limit returns HTTP 429.
Code Examples
$ cURL
curl -s -H "Authorization: Bearer YOUR_API_KEY" \
"https://ipmeu.ro/api/lookup?ip=8.8.8.8" | python3 -m json.tool
P PHP
$response = file_get_contents('https://ipmeu.ro/api/lookup?ip=8.8.8.8&key=YOUR_API_KEY');
$data = json_decode($response, true);
echo $data['data']['geo']['country']; // "United States"
echo $data['data']['asn']['name']; // "Google LLC"
echo $data['data']['security']['vpn']; // false
Py Python
import requests
resp = requests.get(
"https://ipmeu.ro/api/lookup",
params={"ip": "8.8.8.8"},
headers={"Authorization": "Bearer YOUR_API_KEY"}
)
data = resp.json()["data"]
print(data["geo"]["country"]) # United States
print(data["asn"]["registry"]) # ARIN
print(data["whois"]["abuse_email"]) # network-abuse@google.com
JS JavaScript (fetch)
const res = await fetch(
"https://ipmeu.ro/api/lookup?ip=8.8.8.8",
{ headers: { "Authorization": "Bearer YOUR_API_KEY" } }
);
const { data } = await res.json();
console.log(data.geo.country); // "United States"
console.log(data.asn.registry); // "ARIN"
console.log(data.whois.abuse_email); // "network-abuse@google.com"
console.log(data.security.threat_score); // 0