All cities in a given country Google-map - web-services

Is it possible to use the services of Google-Map to get all the cities in a given country?

No, all the Google services are limited. Try looking at geonames, they have services that may do what you need or possibly you can download the data you need from there and serve it locally.
Disclaimer, it is not possible now. Often if I make an absolute statement like this, the functionality becomes available later. You can try adding an enhancement request to the issues list.

Take a look at the Google Places API

Related

get info from london2012 like do google

I'm trying develop some app related to the Olympic Games.
Does anybody know how get info from the page www.london2012.com, like google does in results?
Does an API exist? Where can I find an API?
I'd suppose, maybe it could be done with a url like:
www.london2012.com?country=12
(This isn't real, just what I suppose an API might look like)
When I search "london olympics" for example, I see a "gadget" which shows some results, and I believe that these come from www.london2012.com. Does anyone know if that's true?
I'm not sure which programming language you are using, making it hard to provide an appropriate answer. I doubt www.london2012.com has produced an API just for access, so you will need to make queries (like you said in your post). For example, if you are using Python, you can use the urllib module to write your requests.
However, be warned. I just read over the www.london2012.com Terms of Service (http://www.london2012.com/terms-of-use/) , and you may not use this information for non-personal use.
It is possible though probably not allowed (see terms of service of the website).
You need your app to make a HTTP call to the page URL and parse the HTML response. Obviously the way to do it depends heavily on the language/technology you use, which you did not indicate in your question.
The Olympics use a system called ODF - Olympic Data Feed to distribute real time statistics from games to authorized parties, usually in XML format. These authorized parties consist of accredited world news organizations (so, yeah, google counts), Rights holding broadcasters (broadcasters that pay to have the rights to distrute Olympics content - NBC in US, BBC in UK, etc, etc) and international sports federations. They have dictionaries listed here - but you can't access it unless you are one of the authorized parties above. So perhaps going the python or some other web scraping route is best.

Finding latitude and longitude of many places once

I have a long list of towns and cities, and I'd like to add latitude and longitude information to each of them.
Does anyone know the easiest way to generate this information once?
See also Geocode multiple addresses
The first part of the third video shows how to get latitude and Longitude using Google Refine and geocoding. No need to write a new script. Ideal for doing this kind of change once.
http://code.google.com/p/google-refine/
Or use www.geonames.org - there's language APIs for that. Or Open Street Map's Nominatim: http://wiki.openstreetmap.org/wiki/Nominatim - google have slightly more restrictive terms of service.
You can use the Google Geocoding API. Check the API at this URL: http://code.google.com/apis/maps/documentation/geocoding/
What follows next is writing some code. I am doing something similar in C# and it is quite easy here.
Most geocoding services can handle queries with only administrative names which is what you're after, e.g., municipality and region. So I'd choose one you like that also handles batch or bulk requests, e.g., the Bing Spatial Data API (here's an article on batch geocoding with it.)
An alternative approach that might be useful if you're on a budget and have a lot of these to do would be to download the Geonames database and write a bit of code to import it into your database or index it; then query it however and how often you like, e.g., if you put your places in another table you could SELECT [...] FROM my_places LEFT JOIN geonames [...]. I used to import Geonames DB into a vanilla PostgreSQL nightly and probably still have the code in a git repo somewhere if that's a route you want to try (comment and I'll find it and attach.)
For a service that uses google, which I find most accurate.
Look at http://www.torchproducts.com/tools/geocode

Web API to get a list of all religions

I am working for a health foundation. We are creating a great app to track everything related to nutrition, activity, milestones, etc. For the profile section, we need to add a list of all religions. Is there an API on the web to retrieve such a list?
It doesn't appear that anything like this exists. ProgrammableWeb has catalogued virtually every usable API.
An API would be too much to have. I suggest hardcode the major religions in this list from wikipedia. (I don't think religions are created often enough to need an API :)
This is the closest that I've found so far. Not exactly a web service but it'll do nicely for some easy copy and paste work, or parsing if you're really dedicated.

How can I use Google's Geocoding to normalize addresses without violating the terms of service?

I'm working on a API that will accept addresses in searches. We would like to use Google's geocoding service to normalize the addresses before submitting the search criteria to our search engine.
This caught my attention:
http://code.google.com/apis/maps/documentation/geocoding/index.html#Limits
"Note: the Geocoding API may only be used in conjunction with a Google map; geocoding results without displaying them on a map is prohibited. For complete details on allowed usage, consult the Maps API Terms of Service License Restrictions."
Does this mean we can't use the Geocoding service for this purpose? Having used libraries that access Google's geocoding service before, I know it's technically possible to do this but it sounds like a violation of the terms of service.
Are there other options for what we're trying to do?
Edit:
It turns out our company does have a license with Google to use the addresses that come back, and they will eventually be displayed on a Google Map to the end user, satisfying the terms of our agreement.
Short answer: You can't. The terms of service seem pretty clear-cut that geocoding using their API is not in line with their terms, unless you display them on a Google Map.
If you need this for other purposes, you should consider licensing a Geocoding library and dataset(s) for your regions of interest. There are quite a few companies which sell these for commercial purposes.
Update on this really old post:
#Cerin pointed out something important on this answer.
USPS Web Tools API are only free if you're using them to ship
via USPS
So be legal.
You are correct: you can't use the Google Geocoder for address cleaning.
You can use this wrapper to access USPS's Web Tools.
Another inexpensive solution is Semaphore, but you'll have to write your own wrapper class to call the DLLs.
The USPS has a free service to validate addresses. It's in a fairly easy-to-use API that you can curl information to and receive a valid response back. The only rub is that they're a little slow when it comes to registering, and they require you to run several tests before they'll open it up. Regardless, once you've jumped through the hoops, it does a great job. It's been keeping addresses in my app clean for quite a while now without any hiccups.

Little known or useful Web Services we all should know about

Web services and web APIs have managed to increase the accessibility of the information stored and catalogued on the internet. They have also opened up a vast array of enterprise power functionality for smaller thin client applications.
By taping into these services developers can provide functionality that would have taken them months perhaps years to set up. They can combine them into single applications that make life generally easier for its users.
Whether displaying information about the music being played, finding items of interest in the locale of the user or just simply tweeting and blogging from the same application - the possibilities are growing everyday.
I want to know about the most interesting or useful services that are out there, especially ones that most of us may not have heard about yet. Do you maintain an API or service? or do you have a clever mash up that provides even more benefits than the originals?
YQL - Yahoo provide a tool that lets you query many different API's across the web, even for sites that don't provide an API as such.
From the site:
The Yahoo! Query Language is an
expressive SQL-like language that lets
you query, filter, and join data
across Web services.
...
With YQL, developers can access and
shape data across the Internet through
one simple language, eliminating the
need to learn how to call different
APIs.
The World Bank API is pretty cool. Google uses it in search results. My favourite implementations are the cartograms at worldmapper.
(source: worldmapper.org)
It's very niche, but I happen to think the OpenCongress API is amazing.
Less niche: Google Translate has an API which will guess the language of something. You'd be AMAZED how frequently this comes in handy (even though it's not as tweakable as you'd like and is not trained on small samples).
I was just about to have a stab at using the SoundCloud API
I know many people who already use for sharing their musical masterpieces and its a pretty good site. Hopefully the api will be as well!
I like the RESTful API for weather.com. It's free and very useful for the new age of location-aware apps: https://registration.weather.com/ursa/xmloap/step1
It does require registration, but they don't spam you or anything - it's just to provide you a key to use the API.
Ah yes - here's another one I've been meaning to check out but haven't tried yet
The BBC offer a bunch of apis/feeds that look very promising
http://ideas.welcomebackstage.com/data
They include apis for accessing schedule data for both TV and Radio listings along with all kinds of news searches. It even looks like they'll be offering some sort of geo-location service soon so it will be interesting to see what that has to offer
Another interesting one for liberal brits! ;)
The Guardian news paper have their own api
http://www.guardian.co.uk/open-platform
MuiscBrainz
Excellent service for music mashups.
Not so many knows that Last.FM initial database was scraped from this service.
The United States Postal Service offers a web service that does address standardization. Quite useful in reducing clutter and cleaning data before it gets put into your database.