# Using googlemaps geocoding API for address-\>geopoint

**URL:** <https://discuss.elastic.co/t/using-googlemaps-geocoding-api-for-address-geopoint/61555>\
**Category:** Logstash\
**Created:** [September 27, 2016, 5:03am UTC](https://discuss.elastic.co/t/using-googlemaps-geocoding-api-for-address-geopoint/61555 "2016-09-27T05:03:36Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Meenal.Luktuke](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/meenal.luktuke/32/7795_2.png) [@Meenal.Luktuke](https://discuss.elastic.co/u/Meenal.Luktuke)\
**Post date:** [September 27, 2016, 5:03am UTC](https://discuss.elastic.co/t/using-googlemaps-geocoding-api-for-address-geopoint/61555/1 "2016-09-27T05:03:36Z")

</div>

Hi,

I have a dataset which contains address, city etc. Using google's geocoding API in runtime, I would like to get geo-coordinates so that I can plot this on tilemap.

But how to invoke this command in Logstash?

For example:  
Step-1: Parse event in Logstash  
#input  
Logstash event:  
Place: Bangalore  
Country: India  
\<\>

#using kv filter, get place and country

# Pass this to google API

[https://maps.googleapis.com/maps/api/geocode/json?address=Bangalore+India&key=](https://maps.googleapis.com/maps/api/geocode/json?address=Bangalore+India&key=)\<YOUR\_API\_KEY\>

#Response gives lat, long  
#Store below information in Elasticsearch

Place: Bangalore  
Country: India  
Location:12.9715987, 77.5945627  
\<\>

I saw [Convert my address book into Geohash to display data in Kibana Tile Map Visualization](https://discuss.elastic.co/t/convert-my-address-book-into-geohash-to-display-data-in-kibana-tile-map-visualization/1988/4) But geolite is now legacy, no updates recently.

Please let me know if this is possible in ES/Logstash.

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [September 27, 2016, 5:30am UTC](https://discuss.elastic.co/t/using-googlemaps-geocoding-api-for-address-geopoint/61555/2 "2016-09-27T05:30:29Z")

</div>

There's no stock filter for doing specifically this or more generically making REST lookups on one or more fields and storing the results. However, writing a custom filter for this should be easy.

---

<div class="post-metadata">

**Author:** ![Meenal.Luktuke](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/meenal.luktuke/32/7795_2.png) [@Meenal.Luktuke](https://discuss.elastic.co/u/Meenal.Luktuke)\
**Post date:** [September 27, 2016, 5:31am UTC](https://discuss.elastic.co/t/using-googlemaps-geocoding-api-for-address-geopoint/61555/3 "2016-09-27T05:31:30Z")

</div>

Okay, will give it a try 🙂

---

<div class="post-metadata">

**Author:** ![laptop\_data](https://avatars.discourse-cdn.com/v4/letter/l/3e96dc/32.png) [@laptop\_data](https://discuss.elastic.co/u/laptop_data)\
**Post date:** [March 29, 2017, 1:15pm UTC](https://discuss.elastic.co/t/using-googlemaps-geocoding-api-for-address-geopoint/61555/4 "2017-03-29T13:15:38Z")

</div>

Hi @Meenal.Luktuke, I am phasing same issue now to get latitude and logitude from the location.  
Can you please help me out here if you find any solution.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 4:27am UTC](https://discuss.elastic.co/t/using-googlemaps-geocoding-api-for-address-geopoint/61555/5 "2017-07-06T04:27:28Z")

</div>


