jeanpaul62
jeanpaul62

Reputation: 10581

Reverse Geo with Algolia

Does Algolia provide a reverse geocoding like GeoNames or Google? I.e. find address from lat/lng?

I didn't find anything in the Algolia Places doc.

Upvotes: 0

Views: 536

Answers (2)

Raphi
Raphi

Reputation: 121

Since recently, you can use directly the /reverse endpoint like this:

curl -X GET 'https://places-dsn.algolia.net/1/places/reverse?hitsPerPage=1&aroundLatLng=48.876599,2.124843'

See more info in the documentation: https://community.algolia.com/places/rest.html#reverse-geocoding

Upvotes: 0

Ervin Ruci
Ervin Ruci

Reputation: 929

According to their doc https://community.algolia.com/places/documentation.html#api-options-type you can get any the following types:

-city
-country
-address
-busStop
-trainStation
-townhall
-airport

The do return quite a bit of data with their reverse geocoding API:

curl -X POST 'https://places-dsn.algolia.net/1/places/query' --data '{"aroundLatLng": "48.876599,2.124843"}'

Sometimes too little data can be a problem, as can be too much data. You'll have to sort through it yourself.

With a lot of players in the reverse geocoding API field these days, it will all depend on what type of data you want to get back.

If you just want one matching address and a couple of nearby streets try:

curl 'https://geocode.xyz/48.876599,2.124843?geoit=json'

Upvotes: 1

Related Questions