Forecasted Weather
GET {{baseUrl}}/forecast?appid=<string>&q=<string>&id=<integer>&lat=<number>&lon=<number>&zip=<string>&units=<string>&lang=<string>&Mode=<string>
Access forecasted weather data for any location on Earth including over 200,000 cities! Current weather is frequently updated based on global models and data from more than 40,000 weather stations.
Request Params
Key | Datatype | Required | Description |
---|---|---|---|
appid | string | API Key. Example: 52a17d91b3ed0697b05a7dd6fdc708c4. API Keys are associated with developer accounts. | |
q | string | City name. Example: London. You can call by city name, or by city name and country code. The API responds with a list of results that match a searching word. For the query value, type the city name and optionally the country code divided by a comma; use ISO 3166 country codes. | |
id | string | City ID. Example: 2172797 . You can call by city ID. The API responds with the exact result. The List of city IDs can be downloaded here. You can include multiple cities in this parameter — just separate them by commas. The limit of locations is 20. Note: A single ID counts as a one API call. So, if you have city IDs, its treated as 3 API calls. | |
lat | string | Latitude. Example: 35. The latitude coordinate of the location of your interest. Must use with lon . | |
lon | string | Longitude. Example: 139. Longitude coordinate of the location of your interest. Must use with lat . | |
zip | string | Zip code. Search by zip code. Example: 95050,us. Please note that if the country is not specified, the search uses USA as a default. | |
units | string | Units. Example: imperial. Possible values: metric , imperial . When you do not use the units parameter, the format is standard by default. | |
lang | string | Language. Example: en. You can use lang parameter to get the output in your language. We support the following languages that you can use with the corresponded lang values: Arabic - ar , Bulgarian - bg , Catalan - ca , Czech - cz , German - de , Greek - el , English - en , Persian (Farsi) - fa , Finnish - fi , French - fr , Galician - gl , Croatian - hr , Hungarian - hu , Italian - it , Japanese - ja , Korean - kr , Latvian - la , Lithuanian - lt , Macedonian - mk , Dutc | |
Mode | string | Mode. Example: html. Determines the format of the response. Possible values are xml and html . If the mode parameter is empty, the format is json by default. |