Photon reverse geocoding - coordinates to address

GET /v1/photon/reverse
Base URL: https://capi.busmaps.com:8443

Reverse geocoding using Photon (Komoot). Returns the nearest OSM object as a GeoJSON FeatureCollection. The nearest object may be a street, building or POI, not necessarily a house address. The endpoint is a pass-through to the upstream Photon instance, so any Photon parameter is forwarded as-is; only the parameters most relevant to typical use are documented here. Complete upstream documentation: https://github.com/komoot/photon#api.

Response fields and units

FieldFormat / unitMeaning
features[].geometry.coordinates [longitude, latitude] in decimal degrees GeoJSON point coordinates
features[].properties.extent [minLon, maxLat, maxLon, minLat] in decimal degrees Feature bounds when present

Parameters

ParameterTypeRequiredDescriptionExample
lat number Yes Latitude coordinate 51.5
lon number Yes Longitude coordinate -0.1
lang string No Response language (e.g., en, de, fr, it, ru) en

Try It Out

Required parameters only

curl -H "capi-key: Bearer YOUR_API_KEY" \
     -H "capi-host: busmaps.com" \
     "https://capi.busmaps.com:8443/v1/photon/reverse?lat=51.5&lon=-0.1"

Popular parameters

curl -H "capi-key: Bearer YOUR_API_KEY" \
     -H "capi-host: busmaps.com" \
     "https://capi.busmaps.com:8443/v1/photon/reverse?lat=51.5&lon=-0.1&lang=en"

Response Example

{
    "features": [
        {
            "geometry": {
                "coordinates": [
                    -0.0998967,
                    51.5001944
                ],
                "type": "Point"
            },
            "properties": {
                "city": "London",
                "country": "United Kingdom",
                "countrycode": "GB",
                "district": "Elephant and Castle",
                "extent": [
                    -0.1002233,
                    51.5004093,
                    -0.099547,
                    51.5000175
                ],
                "name": "Belvedere Buildings",
                "osm_id": 31765736,
                "osm_key": "highway",
                "osm_type": "W",
                "osm_value": "cycleway",
                "postcode": "SE1 0DQ",
                "state": "England",
                "type": "street"
            },
            "type": "Feature"
        }
    ],
    "type": "FeatureCollection"
}

Response Schema

View JSON Schema
{
    "$schema": "http://json-schema.org/draft-07/schema#",
    "title": "Photon Reverse Geocoding Response",
    "type": "object",
    "properties": {
        "features": {
            "type": "array",
            "items": {
                "type": "object",
                "properties": {
                    "type": {
                        "type": "string",
                        "description": "GeoJSON object type: Feature"
                    },
                    "properties": {
                        "type": "object",
                        "properties": {
                            "city": {
                                "type": "string",
                                "description": "City name"
                            },
                            "locality": {
                                "type": "string",
                                "description": "Sub-district / quarter / named area within a district"
                            },
                            "state": {
                                "type": "string",
                                "description": "State or region name"
                            },
                            "osm_type": {
                                "type": "string",
                                "description": "OSM element type letter: N (node), W (way), R (relation)"
                            },
                            "postcode": {
                                "type": "string",
                                "description": "Postal code"
                            },
                            "osm_key": {
                                "type": "string",
                                "description": "OSM key (e.g., place, highway, building)"
                            },
                            "countrycode": {
                                "type": "string",
                                "description": "ISO 3166-1 alpha-2 country code"
                            },
                            "country": {
                                "type": "string",
                                "description": "Country name"
                            },
                            "name": {
                                "type": "string",
                                "description": "Name of the matched object"
                            },
                            "district": {
                                "type": "string",
                                "description": "District or neighborhood"
                            },
                            "housenumber": {
                                "type": "string",
                                "description": "House number (for house-type results)"
                            },
                            "type": {
                                "type": "string",
                                "description": "OSM place type such as city, street, or house"
                            },
                            "extent": {
                                "type": "array",
                                "items": {
                                    "type": "number"
                                },
                                "description": "Bounding box of the feature in [minLon, maxLat, maxLon, minLat] order, in decimal degrees"
                            },
                            "osm_id": {
                                "type": "integer",
                                "description": "OpenStreetMap element ID"
                            },
                            "osm_value": {
                                "type": "string",
                                "description": "OSM value (e.g., residential, cycleway, footway)"
                            },
                            "street": {
                                "type": "string",
                                "description": "Street name"
                            }
                        },
                        "required": [
                            "city",
                            "type",
                            "state",
                            "osm_type",
                            "postcode",
                            "osm_key",
                            "countrycode",
                            "osm_id",
                            "osm_value",
                            "country",
                            "district"
                        ],
                        "description": "Place attributes (fields vary by result type)"
                    },
                    "geometry": {
                        "type": "object",
                        "properties": {
                            "coordinates": {
                                "type": "array",
                                "items": {
                                    "type": "number"
                                },
                                "description": "Coordinate pair in [longitude, latitude] order, in decimal degrees"
                            },
                            "type": {
                                "type": "string",
                                "description": "GeoJSON geometry type: Point"
                            }
                        },
                        "required": [
                            "coordinates",
                            "type"
                        ],
                        "description": "GeoJSON Point geometry with [lon, lat] coordinates"
                    }
                },
                "required": [
                    "geometry",
                    "properties",
                    "type"
                ]
            },
            "description": "Array containing the nearest matching OSM object as a GeoJSON Feature"
        },
        "type": {
            "type": "string",
            "description": "GeoJSON object type: FeatureCollection"
        }
    },
    "required": [
        "features",
        "type"
    ]
}

Response Codes

200 Reverse geocoding completed successfully
400 Invalid coordinates
500 Upstream Photon error or invalid JSON