# API Reference

This is the full reference for the RIPE IPmap API. For a higher-level overview of the API, consult the manual.

The RIPE IPmap API is divided into three sections:

  • Locate API, the main API used for finding geographical locations for IP addresses.
  • Worlds API, a support API that provides geographical locations based on the inputs from the other APIs.
  • Crowdsource API, which allows you to input and lookup for externally contributed geolocation data.

# locate

locate uses various geolocation engines to provide locations for IP addresses. For details on the different engines, see the engines section in the manual.

GET /v1/locate/193.0.20.1/

Get a list of possible geolocations for the provided IP address. The geolocations are the result of the computation of all the geolocation engines. Each geolocation has a score and can be at city level or country level.

GET /v1/locate/193.0.20.1/best

Get the geolocation with the highest score for the provided IP address.

GET /v1/locate/all?resources=193.0.20.1,198.20.0.1

Get the best geolocation for each of the provided IP addresses. The IP addresses are provided in a comma-separated list.

GET /v1/locate/193.0.20.1/partials

Provides a list of geolocation engines for the given IP address, including the possible locations returned by each of them.

GET /v1/locate/193.0.20.1/partials/crowdsourced

Get the list of possible geolocations for the provided IP address, produced by the specified geolocation engine.

GET /v1/locate/193.0.20.1/best?engines=crowdsourced,latency

It is possible to filter by (multiple) geolocation engines in two ways: by engine name (e.g. "single-radius"). Multiple engines can be selected by providing a comma separated list.

# worlds

worlds provides information on cities and countries. It is used by the geolocation engines to provide suggested locations for IP addresses.

GET /v1/worlds/reverse/52.37/4.90

Provides a list of locations for the given latitude/longitude.

# crowdsource

GET /v1/crowdsource/193.0.20.1/

Get the best location based on crowdsourced information for the given IP address.

GET /v1/crowdsource/193.0.20.1/all

Get best location based on crowdsourced information for the given IP address.

POST /v1/crowdsource/{ip}/

Crowdsource a geolocation for the specified IP address.

Possible formats:

{
    "latitude": 1.1,
    "longitude": 1.1
}
{
    "id": "HAARLEM-NL-07-U173CX8KTBR196ECJF92",
    "type": "city"
}
{
    "cityName": "Amsterdam",
    "country": "NL",
    "state": null
}
Last Updated: 11/18/2021, 4:37:59 PM