An Application Program Interface (API) is an interface that is built to connect computer systems to each other in order to share data. An API is distinct from a user interface, which connects a computer directly to a person. While the term is often used to refer to examples in web services, creators of operating systems, software libraries, programming languages, and other resources can build APIs to provide instructions to users on how to send data to, or extract data from, their product or service.
An API allows programs to share a select amount of internal data with external users without exposing all of the program’s data. This gives companies the opportunity to provide data access while maintaining security and control over their data. Typically, APIs include a set of instructions explaining how to request data and what limitations there are in using the API.
A researcher might write a Python script to place a request to the Twitter API asking for all tweets containing a certain phrase. The API provides a bridge between Twitter’s raw data and the request sent in Python. The API will have a set of instructions that researchers must use exactly in order to obtain the data from the request.