One of the great outgrowths of the Web 2.0 phenomenon has been an increased availability of Web APIs -- Internet-based services with an HTTP-based programming interface. Gone are the days when developers would furtively "scrape" HTML pages for data or useful information. Now major Web services make easier, stabler, and more open ways to read and modify data on their servers.
Many APIs are simply formalized interfaces to a user-centric application. The Flickr API, for example, is an elegant and convenient interface that's a great example for anyone thinking of providing an API. But for developers, if you're not making a Flickr client or building a Flickr mashup, it's not really that useful.
Here are some of the more interesting and important APIs that you can use for real programming problems, either in Web applications or in desktop or server software.
1. Google Maps API
It's possible to use competitors to the API, including Yahoo's Map API and Microsoft's Virtual Earth. In time we'll see more alternatives, such as integrating the cool OpenLayers map widget with data services that support the standardized Open Geospatial Consortium APIs. But today Google Maps is the best of the mapping APIs. If you're interested in future-proofing your application, you can use Mapstraction, a toolkit that gives a single interface layer to Google and Yahoo as well as the OpenStreetMap user-generated mapping service.
One of the key parts of any geographical application is geocoding -- turning feature names like "Mountain View, California" or "Lake Baikal" into latitude/longitude pairs that can be put on a map or compared with other map points. Google and Yahoo both have geocoding APIs, but they have some heavy restrictions on use and confusing copyright rules.
I prefer the data from Geonames.org, which has a simple REST service for geocoding names, finding locations close to each other, and some other great geographical backend calculations. The Geonames database is one of the best available, based on multiple data sets, and it uses a liberal Creative Commons Attribution license for its data output. It's also quick and responsive.
No, Web APIs aren't just about maps and map data -- they can be about people, too. OpenID is a new service created by blogging company Six Apart and adopted by many other sites. The API lets you offload the tasks of registering and managing user accounts from your application to an identity provider. Users like it because they can use one user account on several different Web sites. Conversely, identity providers can use the API so their users can use other Web sites without having to maintain separate accounts.
The API is interesting in that it depends on HTTP redirects to and from the identity provider Web site. This allows logon systems that depend on browser state, such as cookies or certificates. Parameters are passed back and forth through URL parameters, including digital signatures for validation. A great set of open source libraries in Perl, Python, Ruby and PHP from JanRain, makes integrating this API relatively painless.