General documentation

This document describes how to use TV 2 Vejrcenters weather API: VEJRET-API.

Get started instructions

  1. Select version and response format you wish to use (JSON or XML at the moment).
  2. Select the type of resource you want; Today forecast, Search, etc.
  3. Type in the parameters you wish to use (the ones in bold are required)
  4. Type the "app" name that has been provided to you.
  5. Type in an expire date and time. It has to be within one hour.
  6. If a signature is required, generate it from the give instructions.
  7. Select "Get url" or "Execute" to get the url/page with the response.

Example: I want to retrieve the data for the today resource with my "example_app_user" app account and have been provided the secret: "1234".

The URL I want is:
My query is "geonameid=2621942&app=example_app_user&expire=2010-11-01-16-30-00" and md5(query+secret) = md5(geonameid=2621942&app=example_app_user&expire=2010-11-01-16-30-001234) is 023bb848256b06e18b26f603785d501d.

RESTful services

The TV 2 NET Weather-API is based on the notion of Representational State Transter or REST ( All requests are made, using HTTP GET. The resulting response is either in JSON or XML format, with the appropriate HTTP status code.

Parameters and URL-structure

Parameters are specified as normal GET parameters, using & (ambersand) as parameter separator. It has to be URL-encoded.

Errors and return values


The version number of the API should be provided in the URL, fx. "http://vejret-api/api/v1/forecast/...".


We will in the period until versioning is implemented try to keep changes on a minumum, but in dialog with our users, we can make, hopefully only minor, changes to the Weather API.

This service cannot be used without having obtained legal consent by TV 2 Danmark.

Back to the API overview