| Plan | Rate Limit | Features | |-------------|----------------------------|-------------------------------------------| | Free | 60 calls/min | Current weather, 5-day forecast, air pollution | | Startup | 60 calls/min | + hourly forecast, 40+ years history | | Developer | 600 calls/min (or higher) | + daily forecast, weather maps, bulk download | | Professional| Custom | + unlimited API calls, enterprise SLAs |
import requests API_KEY = "your_api_key_here" CITY = "New York" URL = f"https://api.openweathermap.org/data/2.5/weather?q=CITY&units=metric&appid=API_KEY"
curl "https://api.openweathermap.org/data/2.5/forecast?lat=35.68&lon=139.76&units=metric&appid=YOUR_API_KEY" Endpoint: /air_pollution openweathermap api
Pricing and limits subject to change – refer to OpenWeatherMap Pricing for current details. Below is a simple Python script to fetch current weather for a city.
"cod": "401", "message": "Invalid API key. Please see https://openweathermap.org/faq#error401 for more info." | Plan | Rate Limit | Features |
Error response example: