Oikolab API

Weather / API Key Intermediate HTTPS CORS
Varies by plan (check documentation)

Overview

Oikolab provides over 70 years of global hourly historical and forecast weather data sourced from NOAA and ECMWF, making it ideal for climate research, energy modeling, and machine learning datasets. An API key is required, available through a free trial on the Oikolab website. It is especially powerful for developers who need long-term historical weather records for any point on the globe.

💡

Beginner Tip

Always specify the param list explicitly (e.g., temperature_2m,wind_speed_10m) to avoid downloading more data than you need. Start with a short date range like a single week to test your integration before running long historical queries.

Available Data

temperature
weather conditions
humidity
wind speed
forecast data

Example Response

JSON Response
{
  "location": "Tokyo",
  "temperature": {
    "current": 22,
    "feels_like": 24,
    "min": 18,
    "max": 26
  },
  "condition": "Partly Cloudy",
  "humidity": 65,
  "wind": {
    "speed": 12,
    "direction": "NE"
  },
  "forecast": [
    {
      "date": "2025-01-16",
      "high": 25,
      "low": 17,
      "condition": "Sunny"
    }
  ]
}

Field Reference

data.columns List of weather variable names returned, such as temperature_2m or precipitation.
data.index Array of Unix timestamps (seconds) corresponding to each row of data.
data.data Two-dimensional array where each row contains values for one timestamp and each column matches the columns list.
model The climate model used for this data, e.g., era5 for ECMWF reanalysis.
lat Latitude of the data point actually used, which is the nearest grid point to your request.

Implementation Example

const url = "https://docs.oikolab.com/";
// 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.

Common Errors & Troubleshooting

401 Unauthorized The API key is missing or placed in the wrong parameter.
Pass your key as api-key=YOUR_API_KEY in the query string, not as a header.
Response is very large or times out A long historical date range with many parameters was requested.
Break the request into smaller time windows (e.g., monthly chunks) and combine results in your code.
Invalid param name A weather variable name was misspelled or does not exist for the selected dataset.
Refer to the Oikolab documentation for the exact parameter names supported by NOAA and ECMWF datasets.

Matrix Score Breakdown

🌐 Reachability 30/30
⚡ Speed 10/20
🔒 Security 15/15
🛠 Developer XP 17/20
✓ Reliability 10/15

Partially tested on Apr 5, 2026

Technical Specifications

Auth API Key
HTTPS REQUIRED
CORS YES
Category Weather
Difficulty Intermediate
Verified: 2026-04-04

Similar APIs

View All →