curl "http://api.openweathermap.org/data/2.5/air_pollution?lat=40.7128&lon=-74.0060&appid=YOUR_API_KEY"

Without a valid API key, requests to OpenWeatherMap will fail (typically with a 401 Unauthorized error).

curl "https://api.openweathermap.org/data/2.5/weather?lat=51.5074&lon=-0.1278&appid=YOUR_API_KEY"

It is required for every API call, allowing OpenWeather to track usage, manage rate limits, and ensure service reliability. Part 1: How to Get Your OpenWeatherMap API Key (Free)