-1

How can I fetch sub localities or sub sub localities through geocoding API by passing zip code of that area? Currently I am only getiing postal_localities.

I tried this GET https://maps.googleapis.com/maps/api/geocode/json?address=122001

I got localities through it, but I also want it to return sub localities

1 Answer 1

0

That feature is not available in the Geocoding API; you can file a feature request here.

The postcode_localities in the Geocoding API offer a way to "disambiguate" the relationship between postal codes and localities which are kind of adjacent types; in most places postal codes are contained by a single locality, but in some places the relationship is reversed or there is no containment relation but instead an overlap relation, and in those cases postcode_localities help.

Sublocalities are contained by localities, which means they are "2 levels under" those postal codes (that contain/overlap localities), so the relation is not direct. Based on that, I don't think it would make sense to expose that in the same way.

Besides, the Geocoding API is a search kind of API, not a database, so it doesn't really support the find all places of type X under condition Y kind of queries.

answered Feb 29, 2024 at 7:47
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.