Meteorologisk Institutt API

Beginner's Pick Weather / User-Agent Advanced HTTPS
74 B
Measured Score 0 50 100 Speed 11/30 Consistency 20/20 Security 20/20 Browser access 15/15 Transparency 8/15 TESTED 2026-08-10

Overview

Meteorologisk Institutt (MET Norway) provides free, high-quality weather and climate data via their Yr.no API, covering global locations with hourly and long-range forecasts. Authentication is free — you just need to set a descriptive User-Agent header that identifies your app and contact email. This is one of the most developer-friendly official meteorological APIs available globally.

Beginner Tip

MET Norway requires a User-Agent header identifying your application and contact email, for example MyWeatherApp/1.0 [email protected]. Without a proper User-Agent, your requests will be rejected with a 403 error.

Measurement Record

What actually happened when we called this API from our own infrastructure. Every value below was recorded by the request, not copied from the provider's documentation.

Request
GET https://api.met.no/weatherapi/locationforecast/2.0/compact?lat=59.91&lon=10.75
Result
HTTP 200 · application/json · 37,277 bytes · compressed
Response time
311 ms (median of 3) · fastest 302 ms
Transport
TLSv1.3 · TLS_AES_256_GCM_SHA384 · certificate issued by Hellenic Academic and Research Institutions CA
Browser CORS
Allowed — Access-Control-Allow-Origin: *
Served by
nginx/1.18.0 (Ubuntu)
Recorded
2026-08-10

Fields Returned

Top-level fields present in the response we captured, with the type and value we actually received.

Field Type Value received
type string Feature
geometry object {2 fields}
properties object {2 fields}

Captured Response

Captured from a real request to https://api.met.no/weatherapi/locationforecast/2.0/compact?lat=59.91&lon=10.75 on 2026-08-10. Long arrays and nested objects are truncated to keep the shape readable.

JSON Response · Captured
{
  "type": "Feature",
  "geometry": {
    "type": "Point",
    "coordinates": [
      10.75
    ]
  },
  "properties": {
    "meta": {
      "updated_at": "2026-08-10T19:30:30Z",
      "units": {
        "…": "(7 more fields)"
      }
    },
    "timeseries": [
      {
        "…": "(2 more fields)"
      }
    ]
  }
}

Implementation Example

Calls a real endpoint of this API. Replace any placeholder credentials with your own key.

Request
const url = "https://api.met.no/weatherapi/locationforecast/2.0/compact?lat=59.91&lon=10.75";
// Replace headers or query params with the values required by this API.
const response = await fetch(url, {
  headers: {
  "X-API-Key": "YOUR_API_KEY"
  }
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = await response.json();
console.log(data);

What Can You Build?

Note: These code examples are AI-generated and unverified. Always refer to the official API documentation for accurate usage.

How This API Fails

We deliberately sent this API a broken request and recorded exactly what came back on 2026-08-10. Knowing the shape of an error before you hit it makes error handling much easier to write.

HTTP 400 Sending an invalid value for "lat" text/plain
400 Bad Request
The 'lat' parameter ("!!!invalid!!!") to Metno::WeatherAPI::Controller::Product::try {...}  did not pass regex check

Common Errors & Troubleshooting

Generated guidance based on this API's documentation, not observed by us. Treat it as a starting point and check against the provider's own error reference.

403 Forbidden The User-Agent header is missing or uses a generic value like curl/7.x.
Set a descriptive User-Agent such as YourAppName/1.0 [email protected] so MET Norway can contact you if there are issues.
429 Too Many Requests You are polling too frequently without caching the Expires header.
Implement HTTP caching: check the Expires header in the response and skip the next request if the data has not expired yet.
Coordinates produce no forecast data Very remote ocean coordinates may have limited coverage.
Use coordinates of a nearby land location, or verify coverage with the locationforecast/2.0/status endpoint.

Measured Score Breakdown

Live HTTP request to the API endpoint

Speed 11/30
Consistency 20/20
Security 20/20
Browser access 15/15
Transparency 8/15
Endpoint Response Time 311ms

Fully tested on Aug 10, 2026

Technical Specifications

Auth User-Agent
HTTPS REQUIRED
CORS UNKNOWN
Category Weather
Difficulty Advanced
Endpoint last called: 2026-08-10

Related Tags

Similar APIs

View All →