Skip to content

Latest commit

 

History

History
20 lines (12 loc) · 2.56 KB

apis_and_the_news.md

File metadata and controls

20 lines (12 loc) · 2.56 KB

APIs and the News

An application programming interface (API) is an interface or communication protocol between different parts of a computer program intended to simplify the implementation and maintenance of software. An API may be for a web-based system, operating system, database system, computer hardware, or software library. ~ Wikipedia

Put simply, an API provides a way for machines to "speak" to each other. Unlike humans, machines do not fare well with ambiguity. APIs allow machines to communicate in a clear, standardized way.

Below is an example of a software API provided by the Python requests library. The requests.get function is an API that allows other code (and of course the human writing the code) to easily obtain a file on the Web by supplying a URL.

import requests
requests.get("http://example.com")

These days, we most often hear about APIs in a web context. Government agencies, social media sites, corporations, news organizations and countless others provide APIs for working with their data and platforms.

Web APIs require machines to exchange information over the Internet. These APIs allow us to "like" a Tweet, stash data in the cloud, and download campaign finance information for a presidential campaign.

APIs are an invaluable resource for newsrooms. These slides offer some more background on APIs and their relevance to journalism.

apis and news first slide