Who needs to register: All users of frost.met.no. If you use havvarsel-frost.met.no, you do not need to register at this time.
To access the API you need to register as a user, all you need is an email address
(MET's privacy policy statement). You will get a
client ID and client Secret (= username and password), which you should keep in a safe place.
Register as a User here
If you need access to restricted data you will need to register in the MET login system, and use tokens to authenticate.
You will have to contact us (observasjon@met.no) to get these credentials.
More information on Frost's basic auth and OAuth 2 can be found
here.
If you have never used an API before, please have a look at some basic explanations.
The (very) short version: An API is a way for two pieces of software to communicate information to each other. For example: Your software can make a request for meteorological observations from Frost. An API request is just a way of asking the API for data that match your criteria. Frost will respond by sending the data it is asked for, or it will send an error code if no data matches the request. Frost is specifically a RESTful Web API.
An API request is just a way of asking the API for the data you want. A request contains the base URL of the API and then a list of
request parameters which are set to your preferred values.
You must set parameters defining (at the minimum) the when, where and what of the observation data you want.
To build a request you can either use our interactive API documentation form, or build an URL (see also below), or
use a script.
To learn more about the API requests, have a look at the API request documentation page.
The easiest way to test how to use the API is to try our interactive API documentation form. Start by clicking on the “Try it out” button to activate the text fields, then enter the conditions you want to search for and click on the Execute button. The response, together with the request URL, will be displayed at the bottom of the form. We also offer an advanced version of the interactive page, with more options (request parameters) to try.
You can build a URL to request data and either insert it into your browser URL field or use a command line tool such as curl.
To get started, try our interactive API page to generate URLs. If you want to construct the URL yourself, start with
the base URL of the API and add parameters you want to set to define the when, where and what of the data you want (learn more about the request parameters here).
You can start from these examples:
When you want to automate your data requests, your next step is to use a script. We provide examples in different scripting languages to use as starting point.