React Unit Testing: A Complete Guide with Jest & Testing Library - Part 2: Configuring Your React Project for Unit Testing
João
- •
- 08 MIN TO READ
Discover This Amazing GitHub Repository with Public APIs for Your Projects and Learning
📖 2 min read | 💻 Basic | ⚡ With Code Examples
Have you ever needed an API for a project or to practice your programming skills but didn’t know where to start? Today, I want to share a fantastic resource: a GitHub repository that lists hundreds of free public APIs! In this post, I’ll walk you through what this repository offers, showcase some cool examples, and explain how you can integrate these APIs into your projects.
The Public APIs repository is a curated collection of APIs that are free to use. These APIs are neatly categorized, ranging from weather, sports, and finance to entertainment and more. It’s a treasure trove for developers, whether you’re a beginner looking to explore or an experienced programmer searching for inspiration.
Here’s a screenshot of the repository layout for a quick preview:
Anime APIs example
Public APIs are an excellent way to:
Let me highlight a few exciting APIs you can find in this repository:
Example API Request:
1GET https://api.openweathermap.org/data/2.5/weather?q=London&appid=YOUR_API_KEY
2
Example API Request:
1GET https://api.thecatapi.com/v1/images/search
2
Example API Request:
1GET https://api.coingecko.com/api/v3/simple/price?ids=bitcoin&vs_currencies=usd
2
Using APIs in your projects is straightforward. Here’s a step-by-step approach:
Example: Fetching weather data in JavaScript:
1fetch(
2 "https://api.openweathermap.org/data/2.5/weather?q=London&appid=YOUR_API_KEY"
3)
4 .then((response) => response.json())
5 .then((data) => console.log(data));
6
Exploring APIs is a fantastic way to enhance your programming skills while building something fun and practical. The Public APIs GitHub repository makes it easy to discover APIs for any purpose. Whether you’re developing a personal project or learning how to work with APIs, this resource is a must-have.
The cat API response example