title: Get city place id from Google Places API
body: <p>My app has a search for cities, but when the user enters the full address, he gets <code>placeId</code> that is more specific than a city -- for an address, or a business. I want the <code>placeId</code> for the city to store in my database.</p>
  
  <p>I'm using Geocomplete <a href="http://ubilabs.github.io/geocomplete/" rel="nofollow noreferrer">http://ubilabs.github.io/geocomplete/</a></p>
  
  <pre><code>$('input[name="address"]').geocomplete().bind('geocode:result', function(event, result){
      console.log(result.place_id)
  });
  </code></pre>
  
  <p>I need to get <code>place_id</code> city from <code>place_id</code> address and check validity in PHP.</p>