IP address lookup
Resolve one IPv4 or IPv6 address into its best matching route, allocation, ASN, and location.
This is the primary service for IP intelligence. The compact response keeps the best route, best allocation, ASN number, location, and source booleans together without exposing every raw candidate by default.
GET/v1/ip/{address}
Parameters
| Parameter | In | Required | Description |
|---|---|---|---|
address | Path | Yes | IPv4 or IPv6 address. |
details | Query | No | Return raw matched allocation, route, and geofeed candidates. |
Scroll for all columns
curl -sS "https://bgp-api.mehrnet.com/v1/ip/1.1.1.1"const response = await fetch("https://bgp-api.mehrnet.com/v1/ip/1.1.1.1");
const data = await response.json();
$json = file_get_contents("https://bgp-api.mehrnet.com/v1/ip/1.1.1.1");
$data = json_decode($json, true);from urllib.request import urlopen
import json
data = json.load(urlopen("https://bgp-api.mehrnet.com/v1/ip/1.1.1.1"))resp, err := http.Get("https://bgp-api.mehrnet.com/v1/ip/1.1.1.1")
if err != nil {
log.Fatal(err)
}
defer resp.Body.Close()
var data map[string]any
json.NewDecoder(resp.Body).Decode(&data){
"meta": {"dataset": {"release_tag": "db-2026.07.27-0913-11"}},
"ip": "1.1.1.1", "version": 4, "registry": "apnic",
"allocation_status": "ASSIGNED PORTABLE",
"network": {"cidr": "1.1.1.0/24", "asn": "AS13335", "name": "APNIC-LABS"},
"allocation": {"country_code": "AU", "registry": "apnic"},
"location": {"country_code": "AU", "region": null, "city": null},
"sources": {"allocation": true, "route": true, "geofeed": false}
}