Putting government data to work with APIs
Connecting state and local government leaders
In the nearly 20 years since they first appeared, application programming interfaces have made it easy for government agencies to share data.
The first application programming interfaces -- commonly known as APIs -- began appearing in 2000 at companies like SalesForce and eBay. Since then, they have become a preferred tool for providing ways to access data, especially at government agencies that deal largely with public information.
People who use APIs can use the data to power apps, which is the popular housing market app Redfin did, using data from the U.S. Geological Survey and the Departments of Housing and Urban Development and Interior. Other times, people want to use data to drive change. For instance, LiveStories uses Justice Department and Bureau of Justice Statistics data to track hate-crime reports. Sometimes, apps borne of government data are just plain clever, as is the case for LeafSnap, which identifies tree species from leaf photographs using Agriculture Department and Economic Research Service data.
Today, more than 500 APIs exist in the federal government. Globally, public-sector APIs are one of the most popular segments, according to ProgrammableWeb, a news website that tracks APIs. ProgrammableWeb lists a total of 781 public-sector APIs.
One way to determine what will make an API successful or useful is “to consider not just what data an agency has that could be made public, but instead where public appetite is strongest,” a General Services Administration spokesperson wrote in an email to GCN.
Here’s a look at 10 of the more notable government-created APIs, in alphabetical order.
Blue Button 2.0
The Centers for Medicare and Medicaid Services envisions this API -- which has four years of Medicare parts A, B and D data for 53 million beneficiaries -- helping to reduce patient burden by enabling research organizations to pre-populate medication lists for patients enrolled in clinical trials. It can also be sued to uncover insights that can improve health, such as a pharmacy determining if medication adherence makes someone healthier. The API’s first iteration was one of ProgrammableWeb’s most clicked, shared and talked about APIs of 2018.
Census Bureau APIs
With the 2020 Census coming up quickly, the APIs the bureau offers are of particular interest. Last year, Census did a metadata consolidation to improve dissemination. Within the 24 APIs available, developers can find population estimates and projects for 2012-17, international trade datasets and geocoding services in addition to American Community Survey datasets.
City of Chicago Crimes from 2001-present API
One of the most popular state and local APIs, with some 530,000 downloads, this API provides access to “reported incidents of crime (with the exception of murders where data exists for each victim) that occurred in the City of Chicago from 2001 to present, minus the most recent seven days,” according to the website.
Food and Drug Administration API
The Elasticsearch-based API provides public data about drugs, devices and foods with subcategories containing additional data such as recall enforcements. As of April 8, the API had almost 7 million calls over the past 30 days and more than 157 million since it launched. The most popular? Adverse drug events, at 9.8 million.
Labor Department API
Lauded by the GSA spokesperson for “steadily building out really important and foundational access to data,” the department offers APIs in four main categories: health and safety, wage and hour division data, expanding growth opportunities and learning, and other, such as VETS100 and VETS4212, data on veteran employment by federal contractors and subcontractors.
National Oceanic and Atmospheric Administration’s U.S. Hourly Precipitation Data API
It’s likely little surprise that this API has had almost five times as many recent views as other NOAA APIs as of April 9 on Data.gov, after the wet and snowy winter much of the country endured. The dataset is archived at the National Climatic Data Center, and the primary data source is from about 5,500 National Weather Service, Federal Aviation Administration and observer stations. The earliest data dates to precipitation in Maine, Pennsylvania and Texas in 1900.
National Renewable Energy Laboratory APIs
Environmentalism is another issue that’s top of mind for many, as evidenced by the popularity of the lab’s APIs on city energy data, solar datasets, wind projects and alternative fuel stations. Especially helpful is an API called Nearest Stations that provides the closest spot to fill up within a specified distance of a given location.
NASA APIs
NASA is a wealth of APIs. According to ProgrammableWeb, it has 70. They range from the Close-Approach Data API, which provides data on all asteroids and comets that have and may come close to Earth, to NASA Earth API, powered by Google Earth and providing images from Landsat 8, which takes pictures of the planet every 16 days. In 2017, NASA turned its Astronomy Picture of the Day website -- one of the most popular at the agency -- into an API.
National Institutes of Health Office of Dietary Supplements API
This new API provides fact sheets that can be returned one at a time. “We are developing support for providing more of our site’s information through content chunking,” the website states, and it plans to add a search function to the API. For now, the API has information on supplements such as calcium and multivitamins in English and Spanish, and targeted to consumers and health care professionals.
USDA Nutrient Database API
This API provides REST access to the department’s Food Composition Databases through two reports. The Food Reports list nutrient values for specific foods from Aardvark Havenaro Hot Sauce to Zymbom Energy Drink. The Nutrient Reports provide lists of foods and their nutrient values for a specified set of nutrients.
NEXT STORY: Better results from better data