March 5, 2012

If your news site isn’t using APIs, you’re missing out.

APIs represent one of the fastest and most effective ways to enhance the quality of your site. They let you build on the work of others and provide your readers and viewers with a premium browsing experience.

Once the bailiwick of hard-boiled Web developers, APIs have gone mainstream. The conventions for building and using APIs have become simplified and standardized, and it’s now possible to create basic API integrations with only a modicum of programming experience (although customized applications still require extensive development expertise).

APIs 101

APIs — short for application programming interfaces — help computers talk to each other to accomplish things for people. An application is a self-contained system. Programming tells us we’re dealing with a software-based system. And an interface provides a set of rules for how two applications should communicate.

APIs abide by the quintessential request/response model on which much of the Web is built. In this model, a request is first sent to an application, usually with details about who’s making the request and what he or she wants. The application evaluates the request and sends back a response. Finally, the requesting application handles the response. This usually involves parsing (sifting through) and formatting data.

For more on how APIs work, check out Chrys Wu’s beginner’s guide.

Why APIs matter

Tying this all together, APIs allow us to exchange data in ways that enhance their value, whether by providing meta tags, performing calculations, generating visualizations or surfacing large clusters of information based on simple search terms.

When APIs are integrated on public-facing websites and work autonomously, they enhance our users’ experiences by giving them content that’s more expansive, personalized and timely. At their best, APIs connect our audiences’ online lives and make it easier for them to stay informed and get things done.

Maybe you’re sold on the usefulness of APIs, but you’re not sure where to start. To help you, I’ve compiled a list of eight top APIs for news and information websites.

I used four criteria when selecting the APIs on this list:

  • Their usefulness to news producers
  • Their openness (how easy it is to get at their data, and what terms restrict their use)
  • Their ease of use (including quality of documentation, example code and case studies)
  • Their potential for future development

In addition to these criteria, the APIs reviewed here represent four genres relevant to news and information websites: data processing, news/media content, social and public data.

Let’s take a look at each.

1. Data processing: OpenCalais

OpenCalais is a sophisticated text-processing platform. You give it content — an article, for example, and it adds metadata — automatically. Its text parsing engine can understand whom your content is about — the people, organizations and companies referenced — and what it covers.

OpenCalais combines complex data analysis techniques, including machine learning, with fast processing. A “SocialTag” feature provides less literal, more common sense tagging. And “Entity Relevance Scores” accompany each tag. These values indicate how important a given term or phrase appears to be. The scores are absolute and can be used to compare entities across a collection of documents.

If you think OpenCalais is for you but want to see more, you can use a document viewer to test drive the platform.

Ideas for your website:

  • Auto-tag your articles.
  • Understand your content — across sections, writers and time periods.
  • Give users lists of the most recent or most popular tags, with links to the underlying stories.
  • Use as a new way to recommend related articles.

Matt Baume wrote about OpenCalais on when the service launched.

2. Data processing: Fusion Tables

Whereas OpenCalais takes your content and returns textual information, Google Fusion Tables takes your data and returns visualizations.

This API lets you create tables of data and then execute SQL database statements against them: select (to return data based on defined criteria), update (to change data), delete (to remove data) and insert (to add new data).

If Fusion Tables sounds like a solution to a problem you’ve already addressed, consider these advantages:

  • You can push data management and processing needs to the cloud (but you can still make certain data private).
  • You get easy integration with other Google APIs, especially Google Maps and Google Charts.
  • You gain collaborative possibilities (by integrating with other data sets).

To get a sense of what Fusion Tables can do, here’s an example of a heat map comprised of Fusion Table data and superimposed on a Google Map. And here’s a tutorial on how to make heat maps with Fusion Tables.

Ideas for your website:

  • Create chart- and map-based visualizations to complement news articles and multimedia packages.
  • Build tabular representations of data to assist in the reporting or publishing of the news.
  • Create customized visualizations of the articles/data on your site.

3. News/media: USA Today

USA Today provides a set of content APIs. You can use them to access headlines across various categories: book, movie and music reviews, census data and articles. You can access several additional categories with a non-commercial license (breaking news, snapshots and sports salaries).

The APIs provide access to content from 2004 to present. Although full text feeds aren’t currently offered, one-liners can be retrieved from a wide range of categories, including editors’ picks (overall and in over 30 thematic areas) and a community of over 25 niche blogs. A set of metadata accompanies each entry returned.

Most of the APIs also support keyword search. The movie review API, for example, can return results for particular actors.

Ideas for your website:

  • Bolster your home page and section landing pages with lists and headlines of national appeal.
  • Complement specific articles with relevant content from USA Today.
  • Create mash-ups with your content and USA Today’s (Add their movie reviews as a box to yours).
  • Provide USA Today content along side yours on site search.

4. News/media: The Guardian

In recent years, The Guardian has invested heavily in technology and code. The result is one of the most robust and mature open development platforms in the industry. And the API is the centerpiece. The goal? To provide “simple methods for asking hard questions.”

The Guardian’s content API provides access to more than a million articles dating back to 1999. You can search for articles by content, tag and section, and use a flexible “Explorer” page to see what you can get and how you can retrieve it.

Some article metadata can be accessed without a registration key (a code that uniquely identifies each person accessing the API to track and limit usage). Full body fields can be also be retrieved, but a key is required.

The Guardian has adopted a flexible licensing model, and even full-length articles can be retrieved and published on other commercial sites (though these include embedded ads and scripts to track performance).

Ideas for your website:

  • Create custom news apps built on Guardian data.
  • Infuse your site with content from recent content from The Guardian.
  • Supplement your articles with related Guardian content.

5. Social: Twitter

Like The Guardian, Twitter hasn’t developed a mere API, but an entire development platform. As of May 2011, more than 660,000 developers were taking part and 150,000 calls were issued every second, according to Raffi Krikorian.

The platform focuses on three interrelated concepts: users (who’s tweeting), tweets (what they’re saying) and time lines (when they’re talking). Three APIs are provided to understand and connect these data points: a rest API focused on recreating Twitter functionality, a search API for finding historic content and a streaming API for displaying real-time content.

Twitter’s APIs offer something for everyone. Juitter and similar tools allow for super-simple integrations, including custom feeds on your site’s hompage, without the need for much code or any registration keys. You can also build more sophisticated integrations to send tweets automatically when something happens on your site. And, a team of developers can go whole hog and create a custom Twitter app around your publication’s content.

Ideas for your website:

  • Add a feed to your homepage capturing your organization’s recent activity on Twitter.
  • Make it easy for your users to tweet your content — without leaving your article pages.
  • Develop a custom app that integrates Twitter data and functionality with your organization’s content.

6. Social: Tumblr

Tumblr is a blogging platform that supports a wide range of content, from text (both short and long form), to images, audio and video.

The Tumblr API provides access to almost all of this content. You can retrieve blog posts, posted media, information about users and metadata about blogs — titles, number of posts, number of likes and more.

Here’s the catch: The API doesn’t offer a way to search for content. You need to know the URLs of the blogs you’re looking for.

Despite this limitation, there are some interesting applications for news and information publishers, given that Tumblr is a ready-made (and incredibly popular) stage for 18+ billion unique pieces of user-generated content.

Ideas for your website:

  • Use Tumblr as a platform for user-generated content by allowing your visitors to register their blogs. Then, integrate their content with yours.
  • Make it easy for your visitors to post to Tumblr, without leaving your site.

7. Public data: The Open Library

This is a set of content APIs that provides book information based on search criteria. Among the APIs are:

  • Books: If you know the ISBN (or other ID), you can get basic information about a book or book collection.
  • Covers: Get small, medium or large versions of book covers, if you know the ISBN.
  • Search Inside: Look for the existence of key phrases (and see surrounding content returned).

Have some topics in mind but not specific books? A bulk download option is available. Or, you could use another API, such as the one offered by ISBNdb, to search by keyword to retrieve ISBN numbers.

Ideas for your website:

  • If you’re already reviewing books, integrate with the Open Library to provide a standardized set of information with each review.
  • Add “related books” to articles with a combination of the ISBNdb and the Open Library.

8. Public data: The World Bank

The World Bank provides three content APIs with 50+ years of data. The results can be used in both non-commercial and commercial venues, as long as attributions are provided. The APIs provide access to economic indicators, financial data and World Bank projects (past, present and future).

You don’t need any registration keys to use these APIs.

Ideas for your website:

  • Use the financial data API to create a content base for multimedia. presentations of key data sets (standalone or as parts of larger packages).
  • Use economic indicator data to enhance your global-to-local (and local-to-global coverage).
  • Use the projects data to track what the Bank is up to and generate story ideas.

The case for strategy

All this talk about mashing, slicing, dicing and infusing your content with offerings from other news and content providers (the people formerly known as the competition) may feel a little unsettling. APIs represent a brave new world, one in which partnerships replace competition, conversations supplant broadcasts and the data stream is always flowing.

Experimenting with APIs on a small scale is something you can (and should) do. Nonetheless, large-scale integrations will no doubt benefit from an overarching API strategy. Such a framework will likely account for your mission as well as your business goals. Ideally, it will inform when, how and how much you use APIs to enhance your readers’ and viewers’ experiences.

As a first step, though, consider playing around with a few of the APIs mentioned here. Try setting up a few automatic integrations with your content and see how your users respond.

The results are likely to be good.

To learn more about APIs, join me for a News University Webinar, “Programming for Non-Geeks: The Basics of Using APIs,” on Wednesday, March 7, at 2 p.m. ET. You can sign up for the Webinar here.

Support high-integrity, independent journalism that serves democracy. Make a gift to Poynter today. The Poynter Institute is a nonpartisan, nonprofit organization, and your gift helps us make good journalism better.
Casey Frechette is a visiting assistant professor in the journalism and media studies department at the University of South Florida St. Petersburg, a Web strategist…
Casey Frechette

More News

Back to News