Tasmim Inspire logoapiatlas.Explore all APIs
API ATLAS DIRECTORY · ENVIRONMENT

Open-Meteo

Free weather API for non-commercial use

Category
Environment
Authentication
No authentication listed
HTTPS
Yes
CORS
Yes
Official provider documentation Report a broken link
OPTIONAL · NO-KEY SAMPLE REQUEST

Start with a working example

These sample requests use a curated public GET endpoint. Provider access, rate limits, and availability can change.

JavaScript Fetch
JavaScript Fetch
const response = await fetch("https://api.open-meteo.com/v1/forecast?latitude=24.86&longitude=67.01&current=temperature_2m,weather_code&timezone=Asia%2FKarachi", {
  headers: { Accept: 'application/json' },
});
if (!response.ok) throw new Error(`HTTP ${response.status}`);
const data = await response.json();
console.log(data);
PHP with cURL
PHP with cURL
<?php

$url = 'https://api.open-meteo.com/v1/forecast?latitude=24.86&longitude=67.01&current=temperature_2m,weather_code&timezone=Asia%2FKarachi';
$ch = curl_init($url);
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_TIMEOUT => 15,
    CURLOPT_HTTPHEADER => ['Accept: application/json'],
]);
$response = curl_exec($ch);
if ($response === false) {
    $error = curl_error($ch);
    curl_close($ch);
    throw new RuntimeException($error);
}
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
curl_close($ch);
if ($status >= 400) throw new RuntimeException("HTTP {$status}");
$data = json_decode($response, true, 512, JSON_THROW_ON_ERROR);
print_r($data);
Command line cURL
Command line cURL
curl --fail --silent --show-error --get 'https://api.open-meteo.com/v1/forecast?latitude=24.86&longitude=67.01&current=temperature_2m,weather_code&timezone=Asia%2FKarachi'

The PHP example requires PHP and the cURL extension. No secret key is included or sent to API Atlas.

KEEP EXPLORING

More in Environment

EnvironmentAirNow

US EPA air quality data and forecasts

View API page
EnvironmentBreezoMeter Pollen

Daily Forecast pollen conditions data for a specific location

View API page
EnvironmentCarbon Interface

API to calculate carbon (C02) emissions estimates for common C02 emitting activities

View API page
EnvironmentClimatiq

Calculate the environmental footprint created by a broad range of emission-generating activities

View API page
EnvironmentCloverly

API calculates the impact of common carbon-intensive activities in real time

View API page
EnvironmentCO2 Offset

API calculates and validates the carbon footprint

View API page