5 min read

Tutorial: Build a Public Holidays app

First step in building the challenge is to inspect the OpenHolidaysAPI.
What is the API request we need to make to retrieve the list of holidays for a country?

When we go to the OpenHolidays API page, we can see we can try out the API, so let's do that:


This opens a Swagger API documentation website - which lists all available endpoints and details about what parameters they expect, while also allowing us to send requests and try out the endpoints.

The first endpoint listed is a GET request to /PublicHolidays. If you click "Try it out", the fields become editable and we can try out the request!

For testing purposes, let's request the holidays for The Netherlands (country code NL), in English (EN), for the current year:

After we press "Execute", we can see the response:

With the sample JSON in hand, we can start building the app to display the holidays returned by the API.

Unlock access to the full exercise solution

Get the React Practice Calendar!

28 days of focused practice of increasing difficulty, going through everything from Fundamentals, Data fetching, Forms and using Intervals in React.

You will also get notified whenever a new challenge is published.