IP-Geolokalisierung - JSON-Endpunkt

Der API-Basis-Pfad ist

https://i.pn/json/{query}

{query} kann eine einzelne IPv4-Adresse sein. Wenn Sie keine Abfrage angeben, wird die aktuelle IP-Adresse verwendet.

Parameter

Abfrageparameter (wie benutzerdefinierte Felter) werden als GET-Anfrageparameter angehängt, zum Beispiel:

https://i.pn/json/18.97.14.91?fields=61439

FelderAntwortfelder optional

Es wird kein API-Schlüssel benötigt.

Schnelltest

Sie können diese Abfrage bearbeiten und mit den Optionen experimentieren

GET
Antwort

Zurückgegebene Daten

Die API kann die folgenden Felder und Werte zurückgeben

Wenn Sie nicht alle zurückgegebenen Felder benötigen, verwenden Sie den GET-Parameter fields, um anzugeben, welche Daten zurückgegeben werden sollen. Trennen Sie die Felder durch Komma (fields=status,query,country,city) oder verwenden Sie einen generierten numerischen Wert (um Bandbreite zu sparen)

name
description
example
type
query
IP used for the query
202.202.202.202
string
status
success or fail
success
string
type
Residential(1), mobile(3) or hosting(4)
1
int
country
Country name
United States
string
countryCode
Two-letter country code
US
string
countryTier
Country tier
1
string
regionName
Region/state
California
string
city
City
Los Angeles
string
cityId
City id
123
int
stateId
State id
123
int
asn
AS number (RIR)
15169
int
as
AS number and organization, separated by space (RIR). Empty for IP blocks not being announced in BGP tables.
AS15169 Google Inc.
string
mobile
Mobile (cellular) connection
true
bool
proxy
Proxy, VPN or Tor exit address
true
bool
hosting
Hosting, colocated or data center
true
bool
blacklists
IP found in blacklists
["spam","abuse"]
string[]
continent
Continent name
North America
string
continentCode
Two-letter continent code
NA
string
region
Region/state short code (FIPS or ISO)
CA
string
asName
AS name (RIR). Empty for IP blocks not being announced in BGP tables.
GOOGLE
string
zip
Zip code
12345
string
lat
Latitude
27.123
float
lon
Longitude
-27.123
float
timezone
Timezone (tz)
America/Los_Angeles
string
offset
Timezone UTC DST offset in seconds
2000
int
currency
National currency
USD
string
isp
ISP name
Google
string
org
Organization name
Google
string
reverse
Reverse DNS of the IP (can delay response)
ip-01.rip.net
string
district
District (subdivision of city)
Farm District
string
generierte Felder
query,status,country
generierte numerische
11