Weather API FAQ

Getting started

Q1. How do I get an API key or token?

Sign in, open My API, select Add new key and copy the key. Send it with each request in an Authorization: Bearer header, or as ?token= in the URL, always from your own server (Q4). The Quickstart walks you through your first request, and the Authorization section covers managing keys.

Q2. How do I make an API request?

Start with the Quickstart: it gets a key, finds a location and fetches an hourly forecast with curl. The same steps are in Python and JavaScript. Every endpoint in the reference also has an example request.

Q3. Do API keys and tokens expire?

API keys created on your My API page do not expire. They stay valid until you delete them on the same page. A key stops working when the account or its plan is no longer active; requests then answer 401 account_inactive. More is in the Authorization section.

Q4. Can I call the API from a web page or a mobile app?

API responses allow requests from any web origin (CORS). But never put your API key in code that runs in a browser or ships inside an app: anyone can read it there and use it on your plan. Call the API from your own server and let your page or app ask your server. Map tiles too: a map library fetches them from the user's device, so point it at a route on your server that adds the key. The JavaScript quickstart shows both. If a key has leaked, delete it on My API and create a new one.

Q5. I can't sign in to my account. What can I do?

Sign in with the email address you registered. If you registered with your Google account, choose "Continue with Google" instead of entering a password. If you forgot your password, use "Reset password" on the sign-in page; once signed in, My API also has a Change password button. Your API key is not sent by email: after signing in, open My API and create one. Still stuck? Contact us.

Features, limits and usage

Q6. Which features does my plan include?

Your My API page lists the features your plan includes. A request to a feature your plan does not include answers 403 product_unavailable. All paid plans include Point Forecasts, Air Quality and Weather Maps, and higher plans add more; the pricing page has the full list. Historical Weather, Ski Resorts, Energy, Agriculture and the Lightning Flashes bounding box are available on request: contact sales.

Q7. Why do I get HTTP 429 errors?

A 429 response means a limit was reached; its error field says which one:

  • rate_limited: too many requests in one second. Wait the number of seconds in the Retry-After header, then retry.
  • daily_quota_exceeded: the free trial or Freemium plan has used its 2,000 requests for the day. The count resets at 00:00 UTC.
  • quota_exceeded: the plan has used its monthly allowance and has no overage billing add-on. The count resets with the next billing period.

To stay under the per-second limit, spread your requests out instead of sending them all at the top of the hour, cache responses, and ask for several locations in one request. If you get rate_limited well below your plan's limit, contact us with the time and the endpoint.

Q8. How do I see how many requests I have made?

Your My API page shows how many requests you have made. To check from code, use the Usage endpoints, which give a day's or a month's total. Add group_by=endpoint or group_by=status_code to split it.

Forecast data

Q9. Which time does a forecast value refer to, and in which time zone?

Each value describes the conditions at its timestamp, unless the reference says otherwise. Precipitation amounts and probabilities cover the period that ends at the timestamp: the hour before it in the hourly forecast, and the three hours before it in the 3-hourly forecast. Times are in the location's local time with its UTC offset. To get another time zone, add tz with a time zone name, for example tz=UTC.

Q10. How far ahead do the forecasts go?

Set the length with periods, up to the maximum for each forecast:

  • 1-minute: 1 hour, up to 60 steps
  • 15-minute: 3 hours, up to 12 steps
  • Hourly: 7 days, up to 169 steps
  • 3-hourly: 14 days, up to 113 steps
  • Daily: up to 15 days, starting with today in the location's local time. You get 14 or 15 days, depending on the time zone and the time of day.

The hourly forecast can also include the past 24 hours with history=1. The Point Forecasts reference has the details.

Q11. Can I get forecasts for several locations in one request?

Yes. The daily, hourly, 3-hourly, 15-minute and 1-minute forecast endpoints take up to 50 locations in one request: separate the coordinates or location ids with semicolons. Each location counts as one request, but the per-second limit counts the whole request once. Responses for many locations and long forecasts can be slow, so limit the length with periods.

Q12. Why is a field missing or null in my response?

Many fields come only with dataset=full; the reference marks them "(dataset=full)". A null value means the data is missing, for example when a data provider has a delivery problem. Treat it as missing, not as zero.

Q13. The forecast doesn't match my local weather station or another source. Why?

A forecast for a point combines several weather models with nearby observations. It can differ from a single station, especially in valleys, on coasts and in mountains, where the weather changes over short distances. Current weather is an estimate for the point, not a measurement. For measured values, use Observations: it returns nearby stations with their distance and elevation. Check that your coordinates are longitude first. If the forecast still looks wrong, contact us with the location (id or coordinates), the request you made without your key, the time with its time zone, and what you expected and where that value came from.

Q14. What is the resolution of your weather forecast?

Different parameters have different resolutions and they vary based on location and timescale. If there are observation stations nearby, they are used to improve the forecast, and the forecast may vary even when moving just a kilometer. In some places we augment with higher-resolution local models. Contact us for the resolution of a specific parameter at a specific time and place.

Q15. For which height are parameters e.g. temperature calculated in your forecast?

  • Temperature: 2m
  • Relative humidity: 2m
  • Wind: 10m

Height of the parameters is above ground. Ground is assumed to be at the average elevation of the surrounding area.

Q16. Location search doesn't find my place. What can I do?

Try another spelling, and narrow the search with country, a two-letter country code. Several places can share a name; tell them apart by country and adminArea. You can also skip the search and use coordinates, longitude first, for any point. If a place is missing or in the wrong spot, contact us with its name, country and coordinates.

Q17. Which countries have weather warnings, and in which language are they?

Weather Warnings carry the official warnings of national weather services in the countries listed on the Weather Warnings page. Each warning keeps the issuing service's own text, and its lang field says which language that is. Each warning also gets a generic warning type and a colour-coded significance, so you can show warnings from every country the same way. With the free trial or a paid plan, My API also offers a coverage file (GeoJSON) for checking whether a point is covered before you call.

Weather Maps

Q18. Where do I get a legend for a map layer?

Use the Legend endpoint, /api/v1/legend/{colorscheme}/{id}, with the layer id and one of the colour schemes the Capabilities endpoint lists for that layer. It returns the legend as an image. Some layers have more than one colour scheme, for example in other units or without transparency; each has its own legend. See Weather Maps.

Q19. What precipitation types does the API report?

On Weather Maps radar layers, the precipitation type is rain, sleet or snow. In Point Forecasts, precipType is rain, mixed or snow (with dataset=full). Observations with prec=2 report rain, sleet, snow, hail, icing or undefined.

Symbols, attribution and service

Q20. Where to find symbols?

You'll find symbols and their mapping on the Resources page. You can use your own symbols, or with the free trial or a paid plan, download our custom symbol set free of charge from the My API page. The Freemium plan does not include the symbol downloads. Please note that the use of our weather symbols is reserved for customers actively utilizing our API. These symbols can only be used in conjunction with Foreca's API data and not independently of this service.

Q21. Is it possible to add an icon for hail in the symbol set?

The symbol for hail has been under consideration, but we do not currently provide it, as it complicates user interfaces. We continue to work on predicting hail more accurately and plan to include it in our symbol set in the future.

Q22. What do I need to show for attribution?

Show the Foreca logo in your service. If that is not technically possible, show the text "Foreca" next to the weather content. The logo and trademark guidelines are at business.foreca.com/logo. Some data also needs third-party attribution: show the text the API gives for it, for example the attribution in the Weather Maps Capabilities response.

Q23. Where are API changes announced?

Changes to the API are announced under API Updates. Radar and satellite layers depend on national weather services and satellite operators, so when a source is down, its area can be missing until the data returns.