I was not able to fetch the area names directly from the pincode.
Instead I am doing this.
I fetch the lat and lng of the pincode using Geocoding API.
Using that lat and lng, I am hitting the same geocode but with the latlong this time and getting the list of area names. Here is the implementation.
https://maps.googleapis.com/maps/api/geocode/json?address=india&components=postal_code:600100&sensor=false&key={YOUR_KEY_HERE}
gave me the response of
"lat" : 12.9171412,
"lng" : 80.1940972
I hit the same geocode API now by passing the lat and lng in it.
https://maps.googleapis.com/maps/api/geocode/json?latlng=12.9171412,80.1940972&sensor=true&key={YOUR_KEY_HERE}
I got the response of all the area names associated with it from the key "formatted_address".
- No.20, Adhi sami Nagar Main Road, Pallikarani, Medavakkam, Chennai, Tamil Nadu 600100, India
- 502, Pallikaranai, Chennai, Tamil Nadu 600100, India
- 209, Velachery Main Rd, Medavakkam, Chennai, Tamil Nadu 600100, India
- 209-879, Velachery Main Rd, Medavakkam, Chennai, Tamil Nadu 600100, India
- Medavakkam, Chennai, Tamil Nadu, India
- Chennai, Tamil Nadu 600100, India
- Chennai, Tamil Nadu, India
- Kanchipuram, Tamil Nadu, India
- Tamil Nadu, India
- India
- W58V+VJ Chennai, Tamil Nadu, India
P.S Kind of works for me but still looking for a single API in google geocoding API's itself to solve the problem