Skip to content

Support addressdetails param in /reverse search #3885

@daishu0000

Description

@daishu0000

Currently, when using the /reverse endpoint to perform a reverse geocoding query, we can only get a simple formatted address, e.g., "Tunnel Avenue, Greenwich Peninsula, Royal Borough of Greenwich, Greater London, England, SE10 0QH, United Kingdom".

However, if we want to obtain detailed information for each administrative level (country, state, city, neighborhood, etc.), we have to first call /reverse to get the OSM ID and then call /details separately.

I believe there is a valid use case for obtaining detailed administrative-level information directly from coordinates. Therefore, I propose adding support for the addressdetails parameter to the /reverse endpoint, so that it can return detailed address components just like the /details endpoint.

This would streamline workflows and reduce the need for multiple API calls.

A possible application:

I want to create a feature (either on the OSM website or as a browser extension) where users can click on any part of an address and open the corresponding administrative object in OSM.

Image

Below is what I want to show in /reverse API when addressdetails=1
Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions