API-documentatie

RESTful API voor IP-geolocatie

Gebruik

Om de API te gebruiken, stuur een HTTP-verzoek naar de opgegeven Query-URL met een Accept: application/json of Accept: application/xml/Accept: text/xml Header.

Het statusveld is of success of fail. message wordt alleen ingesteld als de status fail is.

JSON-voorbeeld

Verzoek:

$ curl -L -H "Accept: application/json" https://utrace.me/?query=216.73.216.22

Antwoord:

{
    "status": "success",
    "country": "United States",
    "countryCode": "US",
    "region": "OH",
    "regionName": "Ohio",
    "city": "Columbus",
    "zip": "43215",
    "lat": 39.9625,
    "lon": -83.0061,
    "timezone": "America\/New_York",
    "isp": "Amazon.com",
    "org": "Anthropic, PBC",
    "as": "AS16509 Amazon.com, Inc.",
    "reverse": "",
    "query": "216.73.216.22",
    "message": null,
    "continent": "North America",
    "continentCode": "NA",
    "district": "",
    "offset": -14400,
    "currency": "USD",
    "asname": "AMAZON-02",
    "mobile": false,
    "proxy": false,
    "hosting": true,
    "abuse": null
}

XML-voorbeeld

Verzoek:

$ curl -L -H "Accept: text/xml" https://utrace.me/?query=216.73.216.22

Antwoord: