Skip to content

Instantly share code, notes, and snippets.

@diegodfsd
Created December 1, 2020 18:30
Show Gist options
  • Save diegodfsd/8b5c68d7fcd430453008f765e74ece95 to your computer and use it in GitHub Desktop.
Save diegodfsd/8b5c68d7fcd430453008f765e74ece95 to your computer and use it in GitHub Desktop.
Response to google places api
// response to this request: https://maps.googleapis.com/maps/api/place/autocomplete/json?input=itaim%20bibi&types[]=(cities)&types[]=establishment&types[]=geocode&language=br&key={key}
{
"predictions" : [
{
"description" : "Itaim Bibi, São Paulo - State of São Paulo, Brazil",
"matched_substrings" : [
{
"length" : 10,
"offset" : 0
}
],
"place_id" : "ChIJKSqDvEJXzpQR22Q4QxM_Mqk",
"reference" : "ChIJKSqDvEJXzpQR22Q4QxM_Mqk",
"structured_formatting" : {
"main_text" : "Itaim Bibi",
"main_text_matched_substrings" : [
{
"length" : 10,
"offset" : 0
}
],
"secondary_text" : "São Paulo - State of São Paulo, Brazil"
},
"terms" : [
{
"offset" : 0,
"value" : "Itaim Bibi"
},
{
"offset" : 12,
"value" : "São Paulo"
},
{
"offset" : 24,
"value" : "State of São Paulo"
},
{
"offset" : 44,
"value" : "Brazil"
}
],
"types" : [ "sublocality_level_1", "sublocality", "political", "geocode" ]
},
{
"description" : "Itaim Bibi - Rua Joaquim Floriano - Itaim Bibi, São Paulo - State of São Paulo, Brazil",
"matched_substrings" : [
{
"length" : 10,
"offset" : 0
}
],
"place_id" : "ChIJkZMu2WNXzpQRnXAI-TO1VBo",
"reference" : "ChIJkZMu2WNXzpQRnXAI-TO1VBo",
"structured_formatting" : {
"main_text" : "Itaim Bibi",
"main_text_matched_substrings" : [
{
"length" : 10,
"offset" : 0
}
],
"secondary_text" : "Rua Joaquim Floriano - Itaim Bibi, São Paulo - State of São Paulo, Brazil"
},
"terms" : [
{
"offset" : 0,
"value" : "Itaim Bibi"
},
{
"offset" : 13,
"value" : "Rua Joaquim Floriano"
},
{
"offset" : 36,
"value" : "Itaim Bibi"
},
{
"offset" : 48,
"value" : "São Paulo"
},
{
"offset" : 60,
"value" : "State of São Paulo"
},
{
"offset" : 80,
"value" : "Brazil"
}
],
"types" : [ "point_of_interest", "establishment" ]
},
{
"description" : "Itaim Bibi Dentista - Rua João Cachoeira - Itaim Bibi, São Paulo - State of São Paulo, Brazil",
"matched_substrings" : [
{
"length" : 10,
"offset" : 0
}
],
"place_id" : "ChIJjdqXV1xXzpQRYffjcnPGCQI",
"reference" : "ChIJjdqXV1xXzpQRYffjcnPGCQI",
"structured_formatting" : {
"main_text" : "Itaim Bibi Dentista",
"main_text_matched_substrings" : [
{
"length" : 10,
"offset" : 0
}
],
"secondary_text" : "Rua João Cachoeira - Itaim Bibi, São Paulo - State of São Paulo, Brazil"
},
"terms" : [
{
"offset" : 0,
"value" : "Itaim Bibi Dentista"
},
{
"offset" : 22,
"value" : "Rua João Cachoeira"
},
{
"offset" : 43,
"value" : "Itaim Bibi"
},
{
"offset" : 55,
"value" : "São Paulo"
},
{
"offset" : 67,
"value" : "State of São Paulo"
},
{
"offset" : 87,
"value" : "Brazil"
}
],
"types" : [ "doctor", "dentist", "health", "point_of_interest", "establishment" ]
},
{
"description" : "Itaim Bibi Idiomas - Rua Santo Américo - Jardim Colombo, São Paulo - State of São Paulo, Brazil",
"matched_substrings" : [
{
"length" : 10,
"offset" : 0
}
],
"place_id" : "ChIJVXTtocBWzpQRBvWOf8UiSyQ",
"reference" : "ChIJVXTtocBWzpQRBvWOf8UiSyQ",
"structured_formatting" : {
"main_text" : "Itaim Bibi Idiomas",
"main_text_matched_substrings" : [
{
"length" : 10,
"offset" : 0
}
],
"secondary_text" : "Rua Santo Américo - Jardim Colombo, São Paulo - State of São Paulo, Brazil"
},
"terms" : [
{
"offset" : 0,
"value" : "Itaim Bibi Idiomas"
},
{
"offset" : 21,
"value" : "Rua Santo Américo"
},
{
"offset" : 41,
"value" : "Jardim Colombo"
},
{
"offset" : 57,
"value" : "São Paulo"
},
{
"offset" : 69,
"value" : "State of São Paulo"
},
{
"offset" : 89,
"value" : "Brazil"
}
],
"types" : [ "point_of_interest", "establishment" ]
},
{
"description" : "Itaim Bibi Parking - Avenida Cidade Jardim 125 - Itaim Bibi - Jardim Europa, São Paulo - State of São Paulo, Brazil",
"matched_substrings" : [
{
"length" : 10,
"offset" : 0
}
],
"place_id" : "ChIJXxyvzWhXzpQRwpgvoQO0LdM",
"reference" : "ChIJXxyvzWhXzpQRwpgvoQO0LdM",
"structured_formatting" : {
"main_text" : "Itaim Bibi Parking",
"main_text_matched_substrings" : [
{
"length" : 10,
"offset" : 0
}
],
"secondary_text" : "Avenida Cidade Jardim 125 - Itaim Bibi - Jardim Europa, São Paulo - State of São Paulo, Brazil"
},
"terms" : [
{
"offset" : 0,
"value" : "Itaim Bibi Parking"
},
{
"offset" : 21,
"value" : "Avenida Cidade Jardim 125 - Itaim Bibi"
},
{
"offset" : 62,
"value" : "Jardim Europa"
},
{
"offset" : 77,
"value" : "São Paulo"
},
{
"offset" : 89,
"value" : "State of São Paulo"
},
{
"offset" : 109,
"value" : "Brazil"
}
],
"types" : [ "parking", "point_of_interest", "establishment" ]
}
],
"status" : "OK"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment