7

I have tried to find a lot over the Internet but I am unable to get a perfect utility/API for my requirement.

I am looking for a utility that, given a city name, provides all the localities/regions of that city. (Would be great if alongwith the regions, the pincodes of every area/region could also be provided).

P.S - I have been wondering if Google Maps, open-street maps provide such data, as their maps are already very data exhaustive and they virtually have every data point in their system?

Remi Guan
  • 21,506
  • 17
  • 64
  • 87
ayan_2587
  • 833
  • 2
  • 11
  • 21

4 Answers4

5

To get the list of localities in an Indian city, I have used two resources. It's not an API and there are no codes involved.By following the steps mentioned below, you can get the list of localities in excel for a particular city.So, if someone is interested in manual listing of the localities, it might be helpful.

1) India Post Website:-

a) Go to http://cept.gov.in/lbpsd/placesearch.aspx

b) Press F12 to open developer tools. It will open a parallel window along with India Post website screen.

c) In developer tools,clear all the logs by pressing "Clear" button.

d) On Indian post website,select state,city,town.

e) In developer tools window,you will see a log entry with name "picasasearch.aspx"

f) Click on the check-box next to it.

g) A new window tab will open. Click on "responses"

h) There will be a lot of code.Scroll down the code.

i) You will find the list of states, list of towns for your selected state and then list of locaities for your selected town.

j) Copy and paste the list of localities in excel and use "text to columns" feature to get only locality names.

2) Dominos Website:- It will give the localities in the cities Dominos operates

a) Go to dominos.co.in.

b) Click on Order online.

c) Press F12 to open developer tools. It will open a parallel window along with Dominos website screen.

d) In developer tools,clear all the logs by pressing "Clear" button.

e) On Dominos website,select city e.g. "Ludhiana".

f) Upon selecting city, you will find that in logs,a new entry has listed up with name "?city_id=LUDHIANA"

g) Click on the checkbox adjacent to it.

h) A new window will open.Click on "responses"

i) You will find the list of localities in json format there after "data" in curly brackets

j) Copy the list and use a JSON formatter to process it. I used https://jsonformatter.curiousconcept.com/

k) Copy the processed result in an excel sheet and use "text to columns" feature to get only locality list.

dpurbey
  • 76
  • 1
  • 4
4

GeoNames. They have both a web API and a free downloadable database.

Greg Oschwald
  • 1,716
  • 2
  • 11
  • 14
1

You may want to check the Google geocoding API, https://developers.google.com/maps/documentation/geocoding/. It will provide you the return of geolocation information of a given city/address.

Chris Lim
  • 424
  • 4
  • 9
0

I was in need of a similar data for my website and after lot of research I opted for openstreetmaps data. The reason is that their terms and conditions are very lenient. I extracted the data from their pbf, did some programming and finally got what i needed. I created an open source project with the data so that it can be made available for everyone to download. Check http://www.listofcitynames.com/. I did not include pincode in that. If you are looking to implement an autocomplete or calculate distance between users, I hope this might be helpful.

coder231
  • 453
  • 2
  • 14