title: Google maps APIs to return place' type based on latitude & longitude
body: <p>I am trying to build an application in which I need to retrieve location's type based on latitude and longitude. I tried using google's places API but not getting satisfied results.</p>
  
  <p>For eg, if I want to know if the user searches for SFSU, it should be stored as  'university'. I can get its latitude/longitude from geocoding APIs.</p>
  
  <p><a href="https://maps.googleapis.com/maps/api/geocode/json?address=SFSU&amp;key=YOUR_KEY" rel="nofollow">https://maps.googleapis.com/maps/api/geocode/json?address=SFSU&amp;key=YOUR_KEY</a></p>
  
  <p>But from places API, I cannot get the exact type, I mostly get it as street or establishment:</p>
  
  <p><a href="https://maps.googleapis.com/maps/api/geocode/json?latlng=37.7244047,-122.4760196&amp;key=YOUR_KEY" rel="nofollow">https://maps.googleapis.com/maps/api/geocode/json?latlng=37.7244047,-122.4760196&amp;key=YOUR_KEY</a></p>
  
  <p>Similarly, I wanted to get cafe for any starbucks or mall/shopping-center for any mall.</p>
  
  <hr>
  
  <p>Edit:</p>
  
  <p>I got confused between geocode API and places API as geocode API also returns place' type.
  I found that places API returns multiple results even if we provide correct latitude and longitude. So if we need the perfect result, we need to provide sort filter with Places API.</p>
  
  <p><a href="https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=(lat),(long)&amp;rankby=distance&amp;key=YOUR_API_KEY" rel="nofollow">https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=(lat),(long)&amp;rankby=distance&amp;key=YOUR_API_KEY</a></p>