| 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 |
| Code | Meaning | |------|-----------------------------| | 200 | Success | | 400 | Bad request (invalid params)| | 401 | Invalid API key | | 404 | City/location not found | | 429 | Too many requests (rate limit exceeded)| | 500 | Server error |
"weather": ["main": "Clear", "description": "clear sky"], "main": "temp": 22.5, "feels_like": 21.8, "humidity": 65, "pressure": 1012 , "wind": "speed": 3.1, "deg": 200, "name": "Tokyo" openweathermap api
Returns data every 3 hours for the next 5 days.
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" | Plan | Rate Limit | Features |
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.
Endpoint: /forecast
API key ( appid ) required for all requests. 2. Key Features | Feature | Description | |-----------------------|-----------------------------------------------------------------------| | Real-time data | Current weather for any location (city name, coordinates, ZIP, city ID) | | 5-day forecast | 3-hour step forecast, up to 5 days | | 16-day daily forecast | Daily summaries (paid plans) | | Historical data | Hourly or daily historical records (paid plans) | | Air pollution | Current, forecasted, and historical air quality data (CO, NO₂, O₃, PM2.5, PM10) | | Weather maps | Tile layers for wind, temp, precipitation, pressure | | Units | Metric, imperial, or Kelvin (default) | | Multilingual support | Weather descriptions in 40+ languages | 3. API Endpoints (Selected) 3.1 Current Weather Data Endpoint: /weather