API Endpoints

/reverse

Description: Convert a pair of geographic coordinates to a human-readable address. (Reverse Geocode)

Endpoint: GET https://geocode.maps.co/reverse

Parameters

ParameterDescriptionDefault / Notes
api_keyYour API KeyRequired.
Security Note: You can also send your API key via the Authorization: Bearer YOUR_SECRET_API_KEY HTTP Header
latLatitudeRequired
lonLongitudeRequired
addressdetailsInclude structured address fragmants in result (0/1)Optional. Default: 1
extratagsInclude extra OSM tags (0/1)Optional. Default: 1
namedetailsInclude name variants (0/1)Optional. Default: 1
zoomDetail level (3-18)Optional
formatResponse format (xml, json, jsonv2, geojson, geocodejson)Default: json
accept-languageSet language of returned results, e.g. en, fr, it, pl, etc.Optional

Example JSON Response

{
  "place_id": 287295616,
  "osm_type": "relation",
  "osm_id": "7340078",
  "lat": "40.7033",
  "lon": "-74.0105",
  "display_name": "Manhattan, New York, United States",
  "address": {
    "city": "Manhattan",
    "state": "New York",
    "country": "United States",
    "country_code": "us"
  }
}

Usage Notes

  • Reverse geocoding returns the nearest OSM object to a coordinate.
  • Only one result is returned.
  • For object IDs, use the /lookup endpoint instead.

/lookup

Description: Get the details for one or more objects by OSM ID.

Endpoint: GET https://geocode.maps.co/lookup

Parameters

ParameterDescriptionDefault / Notes
api_keyYour API KeyRequired.
Security Note: You can also send your API key via the Authorization: Bearer YOUR_SECRET_API_KEY HTTP Header
osm_idsComma-separated OSM IDs with type prefix (N, W, R), e.g. R253832Required
addressdetailsInclude structured address fragmants in result (0/1)Optional. Default: 1
extratagsInclude extra OSM tags (0/1)Optional. Default: 1
namedetailsInclude name variants (0/1)Optional. Default: 1
polygon_geojsonOutput polygon shape in geojson format (0/1)Optional. Default: 0
polygon_kmlOutput polygon shape in kml format (0/1)Optional. Default: 0
polygon_svgOutput polygon shape in svg format (0/1)Optional. Default: 0
polygon_textOutput polygon shape in text format (0/1)Optional. Default: 0
formatResponse format (xml, json, jsonv2, geojson, geocodejson)Default: json
accept-languageSet language of returned results, e.g. en, fr, it, pl, etc.Optional

Example JSON Response

[
  {
    "place_id": 235405672,
    "osm_type": "R",
    "osm_id": 175905,
    "type": "administrative",
    "localname": "New York",
    "centroid": {"type":"Point","coordinates":[-74.006,40.7127]}
  }
]

Usage Notes

  • Use when you already know OSM object IDs.
  • Multiple IDs can be requested at once (comma-separated).
  • Geometry fields can be large; include only if needed.

Alert