Skip to content
This repository has been archived by the owner on May 23, 2019. It is now read-only.

NYCPlanning/labs-geosearch-api

Repository files navigation

labs-geosearch-api

An express.js api that proxies requests to a pelias instance, appending metadata to the response. Part of the NYC Geosearch Geocoder Project.

This api exists as a workaround for a current limitation in the Pelias open source geocoder. It's not possible to add custom metadata to Pelias responses, even if you can get the data into the Pelias database.

How it works

When a request comes in, it is forwarded, along with its query params, to the Pelias API. The Pelias response is intercepted, and if the response contains features, the ids are used to query the Pelias database directly for the original documents. The responses from Pelias contain a meta object that includes custom data about the source of the address record. This meta object is assigned to its respective feature's prperties, and the response is sent back to the client.

Routes

  • /search - proxy requests to pelias' /search endpoint
  • /autocomplete - proxy requests to pelias' /autocomplete endpoint

About

proxy api for the geosearch pelias instance

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published