Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need to get a list of valid addresses in 4 or 5 clusters (cities) in both the UK and US. It's to generate sample data for an application that will do geolocation and searching. At the moment I'm generating the addresses more or less randomly, which means I hit postcodes that don't exist and obviously the street and number never match the postcode.

Any recommendations on how to programatically obtain a list of addresses to build test data?

share|improve this question
up vote 6 down vote accepted

Random valid addresses are easy. Go to the website for a big organization, like the post office, McDonald's, Federal Express, and scrape store locations from their webpage.

You could also use local government sites for schools, recreation centers, red light cameras...

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.