How to Use an API for Absolute Beginners

Mehul Bhushan
2 min readAug 1, 2022

--

APIs are a common way to share data on the internet. They help connect applications and systems and make it easy for them to communicate.

For example, the weather data that you get on your phone comes from APIs exposed by the local weather department. The term API stands for Application Programming Interface.

This tutorial will help you get started with using APIs. Please note that you do not need any prior knowledge of programming to use the API in this tutorial.

In this tutorial, we will be working with the Harvard Art Museum’s API.

Getting Started

The Harvard Art Museum API requires you to first get an API key to authenticate your access to their data. It is a very simple process. To do this:

  1. Send a request to get your API key.
  2. Fill up the small form. Once you are done, you will get a unique API key to the email address that you provided in the form.
  3. Next, open a new tab on your browser and copy and paste the following URL.
https://api.harvardartmuseums.org/RESOURCE_TYPE?apikey=YOUR_API_KEY

Before you press enter, change two of the following parameters in this URL.

  1. In place of the RESOURCE_TYPE, add the word- period.
  2. In the place of YOUR_API_KEY after the ‘apikey=’ parameter, type the unique API key that you received from Harvard Art Museum in your email.

For example,

https://api.harvardartmuseums.org/period?apikey=00000000-0000-0000-0000-000000000000

Once you press enter to search after this, you will receive some data back in the form of JSON data.

Image showing JSON data

Congratulations! You just accessed your first API and received data from the Harvard Art Museum collection.

This is a very simple way to access the Harvard Art Museum’s data. The parameters that you changed in the URL are ‘required’ to access any data from Harvard Art Museum.

You can now use this data for any number of research projects or simply to learn more about how to use APIs. To learn more about Harvard Art Museum API, go to https://github.com/harvardartmuseums/api-docs.

--

--

Mehul Bhushan

I am a technical writer. I am dedicated to learning about new technologies and creating meaningful documentation.