Is it possible to get the main level of subdivision of a country using google places API? By subdivisions, I mean, for example, in the country of Uruguay obtaining its 19 departments or, for example, in the country of Mexico, obtaining its 31 states + the federal district. I'm getting these subdivision numbers from this wiki
In order to achieve this I am first trying the Autocomplete service in this way
https://maps.googleapis.com/maps/api/place/autocomplete/json\?input\=Spain\&types\=\(regions\)\&components\=country:es\&key\=API-KEY
But here I have the following problems, first the number of results that a query returns using autocomplete that is limited to 5 according to the documentation, the other drawback is the types parameter that as far as I understand allows me to use (regions) that contains administrative_area_level_1 and administrative_area_level_2, here I would prefer to use administrative_area_level_1
And the Place Search in this way
https://maps.googleapis.com/maps/api/place/textsearch/json\?query\=spain\&type\=administrative_area_level_1\&key\=API-KEY
here I generally do not get results ZERO_RESULTS status, and in the countries where I occasionally find results are incomplete for example Nicaragua returns 9 results, but must be 15 departments and 2 autonomous regions
About the type administrative_area_level_1 I read in the documentation
Not all nations exhibit these administrative levels
What I described above is what I have tried, I thank you if you can give me your comments on whether this possible
Please note that it is currently not supported for the Google Places API to show an exhaustive list of addresses by a certain filter such as by country.
Places Autocomplete is designed to return place predictions based on the user input and perceived relevance. While Place Searches like Text Search returns information about a set of places that matches a given string.
There is also a related feature request for this functionality, it's marked as Infeasible/Intended behavior but you can still star it to receive updates: https://issuetracker.google.com/issues/64769088
If you are interested to have this feature, you may also file this as feature request in the Public Issue Tracker.