12 APIs every programmer should know about

These emerging and under-the-radar APIs add sizzle to your website, from geographical data to financial insights to content analysis

12 APIs every programmer should know about

Was it just yesterday that the API was going to take over the Internet and turn every site into an endless remix of data from hundreds of freely available data stores? The world is a bit more mature now. The APIs are still proliferating, but they're not wide open and ready for anyone. Most of the better tools are following the lead of Google and imposing a fee on serious usage. Experimenting is usually free, but making more than a smattering of calls to the API requires an account and a commitment to pay.

Here's a collection of 12 APIs that caught our attention. They're modern tools for adding a little oomph or pizzazz to your site.


Where in the world is Carmen San Diego? Or just plain San Diego? GeoNames turns strings of characters into latitudes and longitudes. The database includes both geographic names and political entities. Looking for "San Diego," for instance, returns the cities in California, Guatamala, and Mexico as well as lakes like Laguna San Diego. In fact, there are 7,159 entries for San Diego.

The free service is limited to 2,000 queries per hour. Premium services offering better availability and a service-level agreement begin at 40 euros.


Travel is the lifeblood of sales, and the airport is the major gateway for much of this travel. FlightStats tracks the thousands of planes moving through the air, watching for the delays and reroutings that can scuttle plans. The API can answer whether a flight is on time, canceled, or being sent to a different airport. They also aggregate the results and let you watch particular airlines or cities.

An evaluation license offers 20,000 free queries; after that, prices begin at 0.08 cents for basic queries and rise based on the complexity of the query.


"All the President's Men" introduced the famous quote "follow the money" to the study of politics, and now the API with the same name offers the data to allow everyone to do this. The nonpartisan National Institute on Money in State Politics gathers public disclosures of donations to politicians and aggregates it where anyone can search the records. In the past, the database collected information on more than 3.2 million donations to more than 16,000 candidates.

Search by state, year, candidate, party, office, and many other fields. Content is available under a Creative Commons license and is not to be used for commercial purposes.


The world is full of fakes, and the social media world does not reflect the very best. This is why the U.S. government created a definitive list of official social media accounts. The USDA Animal and Plant Health Inspection Service, for instance, posts information on Facebook on the page http://www.facebook.com/asianlonghornbeetle. If you see something on a page like AsianShorthornBeetle, be suspicious.

Paid for with your tax dollars.


Economists like to say that the stock markets are just a conversation conducted with numbers instead of words. StockTwits is a collection of words written about the stocks. It's full of people expressing their opinions about a company -- opinions that are often strikingly correlated with their bets on the direction of the market. It's a big mosh pit of opinions populated by day traders and everyone interested in the flow of the marketplace.

The API offers a wide range of open and premier queries on the stocks, forex, and bonds. There are also widgets for integrating the conversation with your blog.

Yahoo Content Analysis

Yahoo offers 50-plus APIs that cover a wide range of topics, but one of the deeper tools may be the "content analysis" that takes apart a block of text to identify the most significant parts, often called "entities." You can take large blocks of raw text and boil it down to the people, places, and things that are most important. It turns what they call "unstructured content" into structure. The results can include pointers to wiki entries and location information like latitude and longitude.

The API requires use of Yahoo Query Language and is limited to 5,000 queries a day for noncommercial purposes.


When mobile phones started coming with cameras, developers started trying to program the phones to do something intelligent with the camera image. Moodstocks will compare the camera image with a collection of images stored in its server farm. Users can search for posters, photos from magazines, barcodes, or QR codes.

Moodstocks offers a full-featured library for iOS and Android developers, as well as tools for uploading images to the server that performs all computational matching. Free accounts are limited to 1,000 images per month, and small-business plans start at 299 euros per month.


MusixMatch has collected the lyrics to more than 5.6 million songs from more than 500,000 artists. You can comb through the lyrics by artist, album, or track. All of the songs are licensed with the major companies, thereby avoiding copyright issues.

MusixMatch offers an API with basic searching, as well as a PHP library, an Android plug-in, Perl, Ruby, and more. Prices begin at $1.40 per 1,000 views on a mobile device and rise from there.


The major mapping APIs from Google, Yahoo, Microsoft, and MapQuest have their advantages, but only OpenStreetMap is a collection built by the world. It's like a wiki, but with maps instead of words. Not only are you encouraged to use their map data, you're welcome to add to their collection. They offer an API for editing the map data and another one for displaying the data in a Web page.


One of the side effects of putting a camera in a cellphone is that geotagging information is added to all of the photos created by the so-called phone. Searching through the images for the ones linked to a particular place offers a chance to find photos of a location through the years. Panoramio offers an API for searching geo-linked photos along with a widget for displaying them.

API users must comply with the terms of service, which include displaying the site's name and a link to the photo.

3D Geo Stats

Still in alpha, 3D Geo Stats is like the classic map API, but the data is drawn on top of a 3D globe in a Flex component. If your marketing data spans the globe, it's a nice way to plot it so that people can spin the map around. They'll discover that data, like the world, isn't flat.

New York Public Library

Sure you could travel to New York and enjoy a Broadway show on the side, but it's cheaper and faster to just browse the stacks of the New York Public Library through its API. In goes a keyword, and out comes a list of books, pictures, and other ephemera. The only downside is that you won't encounter any of the ghosts in the stacks like the ones that made their debut in "Ghostbusters."

Copyright © 2013 IDG Communications, Inc.