Enjoy unlimited access to all forum features for FREE! Optional upgrade available for extra perks.

Area look-up using postcode and Google

Status
Not open for further replies.
Joined
May 10, 2007
Posts
1,990
Reaction score
303
Hi,

Looking for some advice on how to do the following:

I have some postcodes, and I need to find the area for each of them.

For example, if I type HD8 8NS into Google Maps, it gives the area of Upper Cumberworth. It is these 'area' names that I want to get for each postcode.

If you know how I could speed up this process to do multiple postcode lookups and grab these area names, then please PM me.

Free or paid services. Unfortunately I can't program, so that isn't an option.

Thanks,
 
Thanks for that.

Unfortunately, it doesn't provide the data from Google - therefore the areas aren't a specific as I'd like.

Anyone on here a real pro in Google maps? Happy to pay...
 
There is the Google Places autocomplete, which would give you the same data (well, a bit more, I suppose). You can retrieve it through XML (an allowance of 1000 requests for free each day)

https://developers.google.com/places/documentation/autocomplete?hl=en

For the postcode you mention, this is an extract from what is returned in the XML file:

Code:
<description>Upper Cumberworth HD88NS, United Kingdom</description>

Something like that would be simple to trim down (if you didn't want the postcode and country in there).

I take it you want this integrated into a web page?
 
There is a UK postcode disk with information that can be bought, legally I mean, for businesses.
 
To be 100% legal on this you should not be ripping data from anywhere that does not specifically state that you can re-use the information commercially. The data you are looking for is expensive to put together, if done well, and even then there are commercial products that struggle to get the depth that you'll probably want.

The Postal Address File (Royal Mail) is an example, it is expensive yet still does not get down to all of the localities that you probably want. That can be excused as they are dealing with postal addresses, so localities are not important, but their data forms the backbone of many other products.

I work with this type of data all of the time and can say it's a nightmare and you have to accept the limitations of available datasets (otherwise you'll never get a "perfect" dataset).

There are many further issues that complicate the matter (e.g. Traditional County names versus Unitary Authority names - some people get offended by the use of one or another). Expect to get complaints about your geo data from pedants even if you take extreme care, hence don't get down if you get people complaining.

I've found that the free data available is pretty poor for what you want to do, many times the precision is not high enough (e.g. 1KM resolution is no good for many areas such as cities with many recognised geo indicators). There's also data which is plain wrong, add to this the fact that you don't get population indicators (hence making it difficult to figure out which area is the most popular if several share the same name) and you've got a real issue.

I'm sure that Google will have invested quite a bit in getting to where they are (I know we have, and it's taken years to get to a stage where we're happy with our data).

The issue you need to consider is how much do you want to spend on a dataset, you'll find two extreme of options. Do it for very little and you'll have to expect lots of compromises, pay a lot and expect less problems but be prepared to be tied into a contract that has you paying for continued use of the data.

If I was in your position (assuming you are using the data for a UK Business Directory, given your domain request) I'd be wary of spending a lot as you'll probably find it much more difficult (than a few years ago) to get a good amount of traffic to justify the spend (it can be done but Google is putting extreme pressure of the Local Search market so you need to have something special and be lucky).

I might be able to help, but as a competitor you may not want to do business with me. I'm not going to sell licences to our data but I do know how to put together a decent set of data that will not incur any ongoing licensing fees (as it's derived from several sources of free data). There would be costs involved in creating this dataset, PM me if you want to know more.
 
Doing a quick test with the postcodes you provided it looks like it was given in line 1 of addressLines[] using the Google Local Search API (which is what I used last time I needed something similar), but it's been deprecated and so has a very small usage limit - won't be much use for the numbers of postcodes you have Phil.

You could probably knock up something using the Google Geocoding API and Scraperwiki. It would be subject to the 2,500 usage limit per day (unless you were to get your own verified API key - it is free, but they want your credit card details to verify identity and doing this is scraping Google data, and hence against their terms).

You just need to scrape the Locality data from a request such as this.

As stated before though, it may be missing or just incorrect for many post codes. This fails to state Pontcana (it also fails on your autocomplete example), whilst this does show Leckwith.
 
Status
Not open for further replies.

The Rule #1

Do not insult any other member. Be polite and do business. Thank you!

Featured Services

Sedo - it.com Premiums

IT.com

Premium Members

AucDom
UKBackorder
Register for the auction
Acorn Domains Merch
MariaBuy Marketplace

Domain Forum Friends

Other domain-related communities we can recommend.

Our Mods' Businesses

Perfect
Service
Laskos
*the exceptional businesses of our esteemed moderators
Top Bottom