App 4: Weather App with a Real API / Build the weather app
Lesson 1 of 10
What is an API?
An API is a way for your program to ask another service for data. We'll use Open-Meteo, a free weather API that needs no account or key, and ask it for the weather anywhere in the world.
Key points
- You send a request to a URL
- The service sends back JSON
- Open-Meteo needs no API key
https://api.open-meteo.com/v1/forecast?latitude=29.37&longitude=47.98¤t=temperature_2mYour turn
Open the URL above in your browser. You'll see real weather data for Kuwait City as JSON.
Quiz · +10 XP
What does an API usually send back?
Log in to save progress and earn XP.