2
votes

I need to deal with all that comes from Google Places API and save in a MySQL database.

With that purpose, I need to know all address components types because they will be column in my address table, but after look at documentation and tried to google it, I didn't find a thing.

Is there this information somewhere?

In Documentation example there are those types:

  • floor
  • street_number
  • route
  • locality
  • political
  • administrative_area_level_2
  • administrative_area_level_1
  • country
  • postal_code

But when I request the API with other address, those types change. Example:

  • postal_code
  • route
  • political
  • sublocality
  • sublocality_level_1
  • administrative_area_level_2
  • administrative_area_level_1
  • country
1

1 Answers

2
votes

I found it, it was at intro, not in Google Place Search or Google Place Detail section:

https://developers.google.com/maps/documentation/geocoding/intro#Types