An Introduction to Open Data and APIs

May 3, 2016

The federal workplace is abuzz these days with talk about open data and how agencies can leverage that data through APIs. According to the federal Open Data Policy, data should be managed as an information asset, and making it discoverable and usable (in other words, open).

Robot with tools and application programming interface sign. Technology concept.

Kirillm/iStock/Thinkstock

Open data “not only strengthens our democracy and promotes efficiency and effectiveness in government, but also has the potential to create economic opportunity and improve citizens’ quality of life.”

Treating data as a national resource and strategic asset may seem like an overwhelming burden requiring intensive resources.

Thankfully, using modern APIs to share open data has never been easier, even if you are not a programmer or do not have a technical background.

In the DigitalGov University webinar, An Introduction to Open Data and APIs, discover just how easy and fast it is to get hands on in integrating APIs into an organization’s open data solution. 18F advocate and GSA Innovation Specialist, Eric Mill, walked users through how to use APIs with the open Web. For the uninitiated, API stands for application program interface, “a set of routines, protocols, and tools for building software applications.” More information on APIs can be found in DigitalGov’s Code section. According to Mr. Mill, when talking about modern APIs, we are talking about transferring information from JSON to html.

Use Cases

Meme: Keep Calm and Open Data over an American flag

Mr. Mill illustrated the usefulness to government APIs with some of the most noticeable use cases, the federal budget and the We the People APIs. The federal budget was once an unwieldy and time consuming spreadsheet, which with the power of APIs was rendered into easily read and searched API data for use by the public, congressional groups and others. The Obama Administration introduced the White House petition system, where the We the People API allows a method for other websites to directly submit signatures. When using government APIs, go to API.DATA.GOV to download the single API key used for all participating government agencies.

Getting Started

To get started, additional plugin software is needed for the Web browser: JSON formatter for Chrome, JSONView for Firefox. After installing the browser plugins, Eric Mill walked through three basics of using APIs:

  1. The fundamentals of URLs. This covered a quick breakdown of the parts of the URL, parameters and syntax necessary to understand the following sections.
  2. How to read JSON. Demonstration using real world sites and their APIs. Included is discussion on the Sunlight Congress API, White House budget data, open.gsa.gov, Data.gov and analytics.usa.gov. Mr. Mill cautioned API users: “Don’t be scared away by API documentation. You need to read it because it is relevant to what your agency does for its mission.
  3. Exploring simple APIs. This section covered detailed examples of how to check status of the API to see if it is functioning, getting the API key, pagination and filtering and a JSON to CSV converter.

The bottom line — APIs can be powerful and easy to use tools for agencies and organization to provide new, effective ways of opening data to the public. Getting started is easy.

John Paul is an IT project manager for the United States Department of Agriculture (USDA). He has worked in information technology since 1999, and specializes in strategy, enterprise architecture and infrastructure.