What is an API?
The term API stands for application programming interface, and it is the technology that lets software applications communicate with one another.
- What is an API?
- What can you do with an API?
- Examples of APIs
- How is a request formed?
- How to actually send the request?
What is an API?
APIs provide a standard method of sending and fetching data between applications.
The originating system sends the request to the application, which then returns a response. This response may be some kind of functionality, or may be a set of data.
What can you do with an API?
APIs help automate repetitive tasks like fetching stock data, importing campaign performance data from Google Ads, and pulling in weather forecasts for a weather app.
APIs are also used to easily embed tools and functionality from other sites, like an interactive map from Google Maps or a Facebook like button.
Examples of APIs
The Google Maps platform is used for embedding location maps. For example, Uber uses the Google Maps API to embed an interactive map for finding car rides.
Stripe's API allows businesses to add payment functionality to their site, and hook into user data to trigger billing notification emails.
This API from Facebook provides similar data to what you get while logged into your Facebook Ads Manager account, but as a pure data feed without the interface and visuals. Many reporting and visualization tools use this API to retrieve Facebook ads performance stats.
How is a request formed?
When sending an API request, there are several components:
- The Method. Common methods include GET, POST, PUT, and DELETE, and indicate how the request should be processed. More info >
- The Request URL. Modern APIs are generally accessed through request URLs. They look just like "regular" web URLs, but the addresses return data rather than a web page. More info >
- Headers. Headers are where you can enter additional metadata related to the request, for example the type of data (JSON or XML) that you want to receive back. Authentication details are also often passed as a Header. More info >
- Request Body. Requests that push data (POST, PUT, and PATCH) send content in a request body. More info >
All these components come together to form the complete API request.
How to actually send the API request?
You can also make API requests directly from the command line using Curl: https://curl.se/. Curl is one of the most popular tools for interacting with APIs.
There are also numerous no-code methods of working with APIs, where you can simply plug in values into the components shown above and hit Run. Postman is the most popular no-code tool for working with APIs, and Mixed Analytics has its own API Connector, a no-code API client designed specifically for Google Sheets.
For the simplest of API requests -- GET requests without authentication requirements -- you can simply click on a request URL and view it in your browser. Here's a list of these free and open APIs you can try.