Foreca Weather API
Foreca Weather API standard package includes access to point forecasts and weather maps.
API add-ons (Warning API, Marine API, Climate API, Ski API) can be added to the service for an additional fee. If you are interested in API add-ons, please contact our sales team for more information.
Learn more about Foreca’s different weather solutions at corporate.foreca.com.
Attribution
Customer shall display in its weather service the Foreca logo. In case displaying the logo is not possible due to technical reasons, the text ”Foreca” shall be displayed in customer’s weather service in connection with the content referring to the source of information. Customer agrees to cease use of the logo and name ”Foreca” in case requested by Foreca, and also to follow Foreca’s reasonable instructions in using the logo, trade name or other trademarks of Foreca.
https://corporate.foreca.com/en/logoThird Party Attributions
Customer’s application must show attribution as given in API response. For example, the Capabilities endpoint in Weather Map API responds with layer info telling the required attribution text.
Currently the following organisations must be attributed if their data is used:
Radar data: Aemet, BOM, DMI, DWD, EC, FMI, InMet, JMA, KMI, KNMI, MET, Eireann, MeteoSchweiz, MF, Met Office, MET Norway, NWS, Protezione Civile, SMHI, SMN, ZAMG
Satellite data: EUMETSAT
Authorization
Authorization endpoint is used to fetch tokens for API access. Tokens are disposable, and should only be used for a single session. User and password must be kept secret and this request must be performed from a trusted source. Token lifetime in seconds is given in the authorization response.
Token
user
Application key username
password
Application key password
expire_hours (optional)
Expiry time in hours (default 1, maximum 168)
/authorize/token
{
"access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC9mbnc2LmZvcmVjYS5jb21cL2F1dGhvcml6ZVwvdG9rZW4iLCJpYXQiOjE1MjYzMDAzODAsImV4cCI6MTUyNjMwMzk4MCwibmJmIjoxNTI2MzAwMzgwLCJqdGkiOiJxSXl3WVlQNjc1NkczejBEIiwic3ViIjoibFFHa1Y4Z2pIeGUyZU1ibndUUUs4NktqVTY3RXJlS2htenY1IiwicHJ2IjoiYWY3YTAzOThkZGNiNWE3YTUzN2Q3YzdkMjU2NWEyZjgxZGM4ZTQxNCJ9.V8xg6L9yrY9__VH-jdrL_CqXisEpgcfdUa0NoxlGz0k",
"expires_in": 3600,
"token_type": "bearer"
}
Forecasts
Weather API exposes an HTTP interface, providing global weather point forecasts.
Location search
Locations and associated identifiers matching a search query. Can be used as alternatives to coordinates.
query
Search query
lang (optional)
Language (ISO 639-1 codes). Options: de, en, es, fr, it, pl, ru, fi, sv, nl, ko, pt, th, tr, zh, zh_TW (Chinese in Taiwan), zh_CN (Chinese in China). (default en)
country (optional)
Limit search to a given country (ISO 3166-1 alpha-2 codes)
/api/v1/location/search/:query
{
"locations": [
{
"id": 102643743,
"name": "London",
"country": "United Kingdom",
"timezone": "Europe/London",
"adminArea": "England",
"lon": -0.125532746,
"lat": 51.508415222
},
{
"id": 103458449,
"name": "Londrina",
"country": "Brazil",
"timezone": "America/Sao_Paulo",
"adminArea": "Estado do Parana",
"lon": -51.162776947,
"lat": -23.310277939
},
{
"id": 106058560,
"name": "London",
"country": "Canada",
"timezone": "America/Toronto",
"adminArea": "Ontario",
"lon": -81.233039856,
"lat": 42.983390808
}
]
}
Location info
Location metadata.
location
"Longitude,latitude" or location identifier (id) from the location endpoint
lang (optional)
Language (ISO 639-1 codes). Options: de, en, es, fr, it, pl, ru, fi, sv, nl, ko, pt, th, tr, zh, zh_TW (Chinese in Taiwan), zh_CN (Chinese in China). (default en)
/api/v1/location/:location
{
"id": 102643743,
"name": "London",
"country": "United Kingdom",
"timezone": "Europe/London",
"adminArea": "England",
"lon": -0.125532746,
"lat": 51.508415222
}
Observations
Observations from a nearby representative weather station.
location
"Longitude,latitude" or location identifier (id) from the location endpoint
tz (optional)
Time zone of returned times (IANA time zone database names)
stations (optional)
Amount of stations (default 3, maximum 6)
tempunit (optional)
Temperature unit: "C", "F" (default "C")
windunit (optional)
Wind unit: "MS" (m/s), "KTS" (knots), "KMH" (km/h), or "MPH" (mph) (default m/s)
/api/v1/observation/latest/:location
{
"observations": [
{
"station": "Espoo Tapiola",
"distance": "21 km N",
"time": "2020-03-16T14:30:00+02:00",
"temperature": 5,
"feelsLikeTemp": 2,
"symbol": "d400",
"windDirString": "NW",
"windDir": 315,
"windSpeed": 4,
"windGust": 6,
"pressure": 1007.9,
"relHumidity": 80,
"visibility": 48992
},
{
"station": "Helsinki Kaisaniemi",
"distance": "24 km NE",
"time": "2020-03-16T14:30:00+02:00",
"temperature": 5,
"feelsLikeTemp": 2,
"symbol": "d400",
"windDirString": "NW",
"windDir": 336,
"windSpeed": 4,
"windGust": 6,
"pressure": 1007.8,
"relHumidity": 77,
"visibility": 50000
},
{
"station": "Helsinki Kumpula",
"distance": "27 km NE",
"time": "2020-03-16T14:30:00+02:00",
"temperature": 5,
"feelsLikeTemp": 2,
"symbol": "d400",
"windDirString": "NW",
"windDir": 300,
"windSpeed": 4,
"windGust": 6,
"pressure": 1007.8,
"relHumidity": 79,
"visibility": 50000
}
]
}
Current
Current weather estimate.
location
"Longitude,latitude" or location identifier (id) from the location endpoint
alt (optional)
Altitude in meters
tempunit (optional)
Temperature unit
windunit (optional)
Wind unit: "MS" (m/s), "KTS" (knots), "KMH" (km/h), or "MPH" (mph) (default m/s)
tz (optional)
Time zone of returned times (IANA time zone database names)
lang (optional)
Language (ISO 639-1 codes). Options: de, en, es, fr, it, pl, ru, fi, sv, nl, ko, pt, th, tr, zh, zh_TW (Chinese in Taiwan), zh_CN (Chinese in China). (default en)
/api/v1/current/:location
{
"current": {
"time": "2020-06-02T04:17-06:00",
"symbol": "n200",
"symbolPhrase": "partly cloudy",
"temperature": 19,
"feelsLikeTemp": 19,
"relHumidity": 50,
"dewPoint": 8,
"windSpeed": 1,
"windDirString": "SW",
"windGust": 4,
"precipProb": 1,
"precipRate": 0,
"cloudiness": 61,
"thunderProb": 0,
"uvIndex": 0,
"pressure": 1011.46,
"visibility": 33516
}
}
Nowcast
3-hour forecast in 15-minute time steps. The values represent the conditions at the associated time stamp unless otherwise specified.
location
"Longitude,latitude" or location identifier (id) from the location endpoint
periods (optional)
Number of time steps (default 8, maximum 12)
alt (optional)
Altitude in meters
tempunit (optional)
Temperature unit: "C", "F" (default "C")
windunit (optional)
Wind unit: "MS" (m/s), "KTS" (knots), "KMH" (km/h), or "MPH" (mph) (default m/s)
tz (optional)
Time zone of returned times (IANA time zone database names)
dataset (optional)
Variable set: "standard" or "full" (default "standard")
/api/v1/forecast/15minutely/:location
{
"forecast": [
{
"time": "2020-03-16T16:00+02:00",
"symbol": "d240",
"temperature": 29,
"feelsLikeTemp": 33,
"windDir": 292,
"windGust": 8,
"windSpeed": 1,
"windDirString": "W",
"precipProb": 68,
"precipRate": 0.374569
},
{
"time": "2020-03-16T16:15+02:00",
"symbol": "d240",
"temperature": 28,
"feelsLikeTemp": 32,
"windDir": 290,
"windGust": 8,
"windSpeed": 2,
"windDirString": "W",
"precipProb": 74,
"precipRate": 0.374569
},
{
"time": "2020-03-16T16:30+02:00",
"symbol": "d240",
"temperature": 28,
"feelsLikeTemp": 31,
"windDir": 289,
"windGust": 9,
"windSpeed": 2,
"windDirString": "W",
"precipProb": 81,
"precipRate": 0.374569
}
]
}
Hourly
Hourly forecasts. The values represent the conditions at the associated time stamp unless otherwise specified.
location
"Longitude,latitude" or location identifier (id) from the location endpoint
periods (optional)
Number of time steps (default 24, maximum 168)
alt (optional)
Altitude in meters
tempunit (optional)
Temperature unit: "C", "F" (default "C")
windunit (optional)
Wind unit: "MS" (m/s), "KTS" (knots), "KMH" (km/h), or "MPH" (mph) (default m/s)
tz (optional)
Time zone of returned times (IANA time zone database names)
dataset (optional)
Variable set: "standard" or "full" (default "standard")
/api/v1/forecast/hourly/:location
{
"forecast": [
{
"time": "2020-03-16T14:00+01:00",
"symbol": "d410",
"temperature": 14,
"feelsLikeTemp": 14,
"windSpeed": 4,
"windGust": 12,
"windDir": 54,
"windDirString": "NE",
"precipProb": 76,
"precipAccum": 0.04
},
{
"time": "2020-03-16T15:00+01:00",
"symbol": "d410",
"temperature": 15,
"feelsLikeTemp": 15,
"windSpeed": 4,
"windGust": 12,
"windDir": 56,
"windDirString": "NE",
"precipProb": 69,
"precipAccum": 0.04
},
{
"time": "2020-03-16T16:00+01:00",
"symbol": "d410",
"temperature": 15,
"feelsLikeTemp": 15,
"windSpeed": 4,
"windGust": 13,
"windDir": 59,
"windDirString": "NE",
"precipProb": 62,
"precipAccum": 0.07
}
]
}
Daily
Daily forecasts.
location
"Longitude,latitude" or location identifier (id) from the location endpoint
periods (optional)
Number of time steps (default 7, maximum 14)
alt (optional)
Altitude in meters
tempunit (optional)
Temperature unit: "C", "F" (default "C")
windunit (optional)
Wind unit: "MS" (m/s), "KTS" (knots), "KMH" (km/h), or "MPH" (mph) (default m/s)
dataset (optional)
Variable set: "standard" or "full" (default "standard")
/api/v1/forecast/daily/:location
{
"forecast": [
{
"date": "2020-03-16",
"symbol": "d320",
"maxTemp": 16,
"minTemp": 12,
"precipAccum": 12.34,
"maxWindSpeed": 4,
"windDir": 51
},
{
"date": "2020-03-17",
"symbol": "d320",
"maxTemp": 17,
"minTemp": 13,
"precipAccum": 9.54,
"maxWindSpeed": 5,
"windDir": 40
},
{
"date": "2020-03-18",
"symbol": "d000",
"maxTemp": 19,
"minTemp": 11,
"precipAccum": 0.01,
"maxWindSpeed": 4,
"windDir": 71
}
]
}
Maps
Weather Map API provides global weather forecast, radar and satellite data as map tiles compatible with commonly used map services such as Open Street Maps or Google Maps. All required and optional parameters are given as path and query parameters respectively. To obtain images one must first request an access token using valid credentials. The access token can then be used to fetch capabilities-response, which contains information on how to fetch images.
Capabilities
Capabilities endpoint is used to fetch layer metadata. This metadata is used to perform image queries. Capabilities-response provides layer information such as description, temporal and spatial extents as well as available color schemes. Images are layers renderable to image formats such as png or svg. The current data property in time element is the index to the most recent available time. Image products may have additional color schemes which can be optionally specified.
token
Access token as provided by authorization endpoint
/api/v1/capabilities
{
"images": [
{
"title": "Cell simulated precipitation",
"description": "Precipitation with more intricate convection visualization",
"formats": [
"image/png"
],
"colorschemes": [
"default",
"csdata-blue"
],
"extent": {
"minLat": -79.171,
"maxLat": 79.171,
"minLon": -180,
"maxLon": 180,
"maxZoom": 11,
"minZoom": 3
},
"times": {
"updated": "2017-01-01T00:00:00Z",
"available": [
"2017-09-01T03:00:00Z",
"2017-09-01T06:00:00Z"
],
"current": 1
},
"id": 1
},
{
"title": "Wind symbol",
"description": "Traditional wind symbol",
"formats": [
"image/svg+xml"
],
"colorschemes": [
"default",
"data-pt"
],
"extent": {
"minLat": -79.171,
"maxLat": 79.171,
"minLon": -180,
"maxLon": 180,
"maxZoom": 11,
"minZoom": 3
},
"times": {
"updated": "2017-01-01T00:00:00Z",
"available": [
"2017-09-18T06:00:00Z",
"2017-09-18T07:00:00Z"
],
"current": 0
},
"id": 2
}
]
}
Tile
Tile endpoint is used to obtain weather map tiles for the given layer and color scheme
id
Layer id
x
X index of the requested tile
y
Y index of the requested tile
z
Zoom level of the requested tile
time
UTC timestamp value for the data to retrieve in ISO 8601 format. Must appear in the available times list
token
Access token as provided by authorization endpoint
colorscheme (optional)
Layer color scheme. Must appear in the color scheme list returned by capabilities endpoint
/api/v1/image/tile/:z/:x/:y/:time/:id

Legend
Legend endpoint is used to obtain legend image for a color scheme
colorscheme
Color scheme id. Must appear in the color scheme list returned by capabilities endpoint
id
Layer id
token
Access token as provided by authorization endpoint
/api/v1/legend/:colorscheme/:id

Climate
Weather statistics.
Monthly climate
Averages in given location for each month. The numbers reflect both day and night conditions.
location
"Longitude,latitude" or location identifier (id) from the location endpoint
tempunit (optional)
Temperature unit: "C", "F" (default "C")
windunit (optional)
Wind unit: "MS" (m/s), "KTS" (knots), "KMH" (km/h), or "MPH" (mph) (default m/s)
/api/v1/climate/monthly/:location
{
"climate": [
{
"month": "01",
"dayMaxTemp": 0.4,
"dayMinTemp": -2.15,
"precipSum": 36.471,
"dailyPrecip": 1.176,
"rainDays": 18.75,
"relHumidity": 89.333,
"minRelHumidity": 74.5,
"solarRadiationSum": 185.7,
"windSpeed": 7.947
},
{
"month": "02",
"dayMaxTemp": 0.21,
"dayMinTemp": -2.09,
"precipSum": 25.253,
"dailyPrecip": 0.9034,
"rainDays": 14.4444,
"relHumidity": 91.33,
"minRelHumidity": 77.5,
"solarRadiationSum": 610.2,
"windSpeed": 7.167
},
{
"month": "03",
"dayMaxTemp": 2.01,
"dayMinTemp": -0.46,
"precipSum": 26.318,
"dailyPrecip": 0.8489,
"rainDays": 13.3845,
"relHumidity": 87.5,
"minRelHumidity": 70.5,
"solarRadiationSum": 1609.5,
"windSpeed": 7.133
}
]
}
Warnings
Governmental severe weather warnings are currently delivered from: Australia, Austria, Belgium, Canada, Denmark, Estonia, Finland, France, Germany, Ireland, Italy, Japan, Latvia, Luxembourg, Netherlands, Norway, Poland, Portugal, Spain, Sweden, Switzerland, United Kingdom and United States.
Point warnings
location
"Longitude,latitude" or location identifier (id) from the location endpoint
/api/v1/warning/:location
{
"warnings": [
{
"type": "FO",
"significance": "Y",
"attribution": null,
"validFrom": "2021-01-08T10:17:00Z",
"validUntil": "2021-01-08T17:00:00Z",
"description": [
{
"lang": "en",
"text": "Dense Fog Advisory issued January 08 at 4:17AM CST until January 08 at 11:00AM CST by NWS Minneapolis&10;&10;Anoka; Benton; Blue Earth; Brown; Carver; Chippewa; Chisago; Douglas; Hennepin; Isanti; Kanabec; Kandiyohi; Lac Qui Parle; Le Sueur; Martin; McLeod; Meeker; Mille Lacs; Morrison; Nicollet; Pope; Ramsey; Redwood; Renville; Scott; Sherburne; Sibley; Stearns; Stevens; Swift; Todd; Watonwan; Wright; Yellow Medicine&10;&10;...DENSE FOG ADVISORY REMAINS IN EFFECT UNTIL 11 AM CST THIS&10;MORNING...&10;* WHAT...Visibility one quarter mile or less in dense fog.&10;* WHERE...Portions of central, east central, south central,&10;southwest and west central Minnesota.&10;* WHEN...Until 11 AM CST Friday.&10;* IMPACTS...Hazardous driving conditions due to low visibility.&10;* ADDITIONAL DETAILS...Slick spots on roads, overpasses, and&10;sidewalks are also possible as the fog freezes on exposed&10;surfaces.&10;&10;If driving, slow down, use your headlights, and leave plenty of&10;distance ahead of you."
}
],
"attributionUrl": null,
"link": "https://alerts.weather.gov/cap/wwacapget.php?x=MN126188507444.DenseFogAdvisory.126188517F10MN.MPXNPWMPX.6f0fa4bac3937d8409b5648ff85e9eea",
"sent": "2021-01-08T10:17:00Z",
"name": "Fog",
"significanceDescription": "Potentially dangerous"
}
]
}
Warning type names
Metadata for all warning types.
/api/v1/warning/types
{
"AQ": {
"name": "Air quality"
},
"AS": {
"name": "Volcanic ashfall"
},
"AV": {
"name": "Avalanche"
},
"CD": {
"name": "Civil danger"
},
"CE": {
"name": "Coastal event"
}
}
Marine
Marine forecasts of waves and sea temperatures.
Hourly
Hourly marine forecasts.
location
"Longitude,latitude" or location identifier (id) from the location endpoint
periods (optional)
Number of time steps (default 24, maximum 168)
tempunit (optional)
Temperature unit: "C", "F" (default "C")
tz (optional)
Time zone of returned times (IANA time zone database names)
/api/v1/marine/forecast/hourly/:location
{
"forecast": [
{
"time": "2020-07-03T11:00",
"sigWaveHeight": 0.95,
"waveDir": 225,
"sigSwellHeight": 0.02,
"seaTemp": 18,
"swimTemp": 18
},
{
"time": "2020-07-03T12:00",
"sigWaveHeight": 1.01,
"waveDir": 225,
"sigSwellHeight": 0.02,
"seaTemp": 18,
"swimTemp": 18
},
{
"time": "2020-07-03T13:00",
"sigWaveHeight": 1,
"waveDir": 225,
"sigSwellHeight": 0.02,
"seaTemp": 18,
"swimTemp": 18
}
]
}
Daily
Daily marine forecasts.
location
"Longitude,latitude" or location identifier (id) from the location endpoint
periods (optional)
Number of time steps (default 24, maximum 168)
tempunit (optional)
Temperature unit: "C", "F" (default "C")
/api/v1/marine/forecast/daily/:location
{
"forecast": [
{
"date": "2020-07-03",
"maxSigWaveHeight": 1.01,
"maxSwellHeight": 0.05,
"maxSeaTemp": 19,
"maxSwimTemp": 18
},
{
"date": "2020-07-04",
"maxSigWaveHeight": 1.18,
"maxSwellHeight": 0.18,
"maxSeaTemp": 18,
"maxSwimTemp": 17
},
{
"date": "2020-07-05",
"maxSigWaveHeight": 0.99,
"maxSwellHeight": 0.99,
"maxSeaTemp": 18,
"maxSwimTemp": 18
}
]
}
Ski
Ski resort weather conditions and site information.
Current
Ski resort conditions.
location
"Longitude,latitude" or location identifier (id) from the location endpoint
sites (optional)
Number of ski sites (default 1, maximum 5)
radius (optional)
Maximum distance to ski site (default 500 km)
/api/v1/ski/current/:location
{
"locations": [
{
"name": "Lake Louise",
"countryCode": "ca",
"countryName": "Canada",
"state": "Alberta",
"city": "Lake Louise, AB",
"postalCode": "T0L 1E0",
"street": "Banff National Park",
"houseNumber": null,
"address": "Banff National Park, Lake Louise, AB, T0L 1E0",
"longitude": -116.159228,
"latitude": 51.439332,
"openFrom": "08:30",
"openUntil": "16:00",
"isOpen": true,
"altitudeBase": 1646,
"altitudePeak": 2637,
"primarySurfaceCondition": "Gripping snow",
"liftsOpen": 2,
"lifts": 7,
"hasSkiing": true,
"kmNordic": null,
"kmPistes": 139,
"kmOpen": 7,
"hasValleyRun": true,
"valleyRunOpen": "true",
"hasTobogganRuns": false,
"kmTobogganRuns": null,
"lastSnowDate": "2020-11-01",
"lastSnowAmount": null,
"nightSkiing": false,
"snowDepthPeak": 52,
"snowDepthBase": 43,
"hasFunPark": true,
"funParkOpen": true,
"updated": "2020-11-05T00:00:00Z"
},
{
"name": "Sunshine Village",
"countryCode": "ca",
"countryName": "Canada",
"state": "Alberta",
"city": "Banff",
"postalCode": "T0L 0C0",
"street": "Banff-Nationalpark",
"houseNumber": null,
"address": "Banff-Nationalpark, Banff, T0L 0C0",
"longitude": -115.761005,
"latitude": 51.113248,
"openFrom": "08:30",
"openUntil": "16:00",
"isOpen": false,
"altitudeBase": 1660,
"altitudePeak": 2730,
"primarySurfaceCondition": null,
"liftsOpen": 0,
"lifts": 10,
"hasSkiing": false,
"kmNordic": null,
"kmPistes": 109,
"kmOpen": 0,
"hasValleyRun": true,
"valleyRunOpen": "false",
"hasTobogganRuns": true,
"kmTobogganRuns": null,
"lastSnowDate": null,
"lastSnowAmount": null,
"nightSkiing": false,
"snowDepthPeak": null,
"snowDepthBase": null,
"hasFunPark": true,
"funParkOpen": false,
"updated": "2020-11-05T00:00:00Z"
}
]
}
Usage
Monitor your API usage.
Month's usage
Given month's hit sums by API
month
Month (e.g. "2020-03")
user
Username
password
Administrative password
/usage/month/:month
{
"apis": [
{
"name": "Weather API",
"hits": 3252
},
{
"name": "Map API",
"hits": 2
},
{
"name": "Administrative",
"hits": 136
}
],
"hits": 3390
}
Day's usage
Given day's hit sums by API
day
Day (e.g. "2020-03-15")
user
Username
password
Administrative password
/usage/day/:day
{
"apis": [
{
"name": "Weather API",
"hits": 156
},
{
"name": "Map API",
"hits": 2
},
{
"name": "Administrative",
"hits": 0
}
],
"hits": 158
}