openweathermap.org APIopenweathermap.org ↗
Get current weather, minutely precipitation, 48-hour hourly forecasts, and 8-day daily forecasts for any global location via the OpenWeatherMap API.
curl -X GET 'https://api.parse.bot/scraper/98c25339-1e3f-49c0-8192-b1448748f87d/search_city?limit=3&query=London' \ -H 'X-API-Key: $PARSE_API_KEY'
Search for cities by name and return their coordinates and country details. Returns an array of matching city objects with name, latitude, longitude, country code, state, and local name translations.
| Param | Type | Description |
|---|---|---|
| limit | integer | Maximum number of results to return |
| queryrequired | string | City name or search query (e.g., 'London', 'Paris, FR') |
{
"type": "object",
"fields": {
"data": "array of city objects each containing name, lat, lon, country, state, and local_names",
"status": "string indicating success"
},
"sample": {
"data": [
{
"lat": 51.5073219,
"lon": -0.1276474,
"name": "London",
"state": "England",
"country": "GB",
"local_names": {
"en": "London",
"fr": "Londres"
}
}
],
"status": "success"
}
}About the openweathermap.org API
The OpenWeatherMap API exposes 3 endpoints covering city search, coordinate-based weather retrieval, and single-call city-to-weather lookups. The get_weather endpoint returns a full weather object with current conditions, minutely precipitation (60 minutes), 48-hour hourly forecasts, and an 8-day daily forecast — all indexed by latitude and longitude. An optional extended hourly mode stretches hourly coverage out to 16 days.
City Search and Geocoding
The search_city endpoint accepts a query string — a city name or a formatted query like 'Paris, FR' — and returns an array of matching city objects. Each object includes name, lat, lon, country, state, and a local_names map with translated city names. The optional limit parameter controls how many results come back. This is the standard way to resolve a human-readable city name into coordinates before calling the weather endpoints.
Coordinate-Based Weather Data
The get_weather endpoint takes lat and lon as required inputs and returns a structured data object keyed with current, minutely, hourly, and daily arrays, plus timezone and timezone_offset. The current block includes real-time conditions. The minutely array provides 60 minutes of precipitation volume. hourly covers 48 hours, and daily covers 8 days. Setting extended_hourly to true adds an extended_hourly field with coverage up to 16 days. The units parameter accepts metric or imperial to control temperature and speed formatting.
City-Name Weather in One Call
The get_weather_by_city endpoint combines city search and weather retrieval into a single request. Pass a query string, and the response returns the full weather data object plus a location field containing the matched city's name, coordinates, and country. It always uses the first match from the search, so ambiguous city names should be qualified (e.g., 'Springfield, US') when precision matters.
- Display current temperature and conditions for any city using
get_weather_by_citywith theunitsparameter set to match user locale. - Build a precipitation alert system using the
minutelyarray fromget_weatherto track rain volume over the next 60 minutes. - Render a multi-day forecast UI using the
dailyarray (8 days) returned byget_weather. - Power a city autocomplete search field using
search_citywith thelimitparameter to cap suggestions. - Populate route weather overlays by calling
get_weatherwith multiple coordinate pairs along a travel path. - Generate a 16-day extended hourly outlook for agriculture or event planning using the
extended_hourlyoption onget_weather. - Resolve ambiguous city names to verified coordinates via
search_citybefore storing them for repeated weather lookups.
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 100 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 250 req/min |
One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.
Does OpenWeatherMap have an official developer API?+
What does the `get_weather` endpoint include in the `current` block versus the `daily` array?+
current block reflects real-time conditions at the queried coordinates. The daily array contains 8 day-level forecast objects. Both are returned in the same response, alongside the minutely precipitation array (60 data points) and the hourly array (48 hours).How does city matching work in `get_weather_by_city` when multiple cities share the same name?+
'Birmingham, GB' — improves match accuracy.Does the API return historical weather data or air quality information?+
Are weather alerts or severe weather warnings included in the response?+
get_weather and get_weather_by_city responses include current, minutely, hourly, and daily fields but do not include a weather alerts array. You can fork this API on Parse and revise it to surface alert data if the source exposes it for your target region.