How to customize Pelias autocomplete service response to include additional properties?

31 views Asked by At

I am using the Pelias autocomplete service to search for places and addresses in my application. The service works correctly and returns the expected results with the data I previously imported from OpenStreetMap (OSM). However, I need to access specific properties of the OSM nodes, such as the "amenity" type, but it seems that these properties are not included in the default response of the autocomplete service.

I would like to know if there is a way to customize the Pelias autocomplete service response to include these additional properties, such as 'amenity'. Is there a configuration or parameter I can use to accomplish this?

{
  ...
  "properties": {
    "id": "node/4779944922",
    "gid": "openstreetmap:venue:node/4779944922",
    "layer": "venue",
    "source": "openstreetmap",
    "source_id": "node/4779944922",
    "addendum": {
      "osm": {
        "amenity": "restaurant",
        "website": "http://www.restaurantexample.com",
        "phone": "+123456789",
        "opening_hours": "mon-fri: 9am-10pm"
      }
    }
  }
  ...
}

I appreciate any help or suggestions you can offer me. Thank you.

0

There are 0 answers