API Docs

Access historical weather data from multiple sources through our free REST API. No authentication required for basic usage.

Quick Start

Try this example request right now:

https://yourdomain.com/api/weather?suburb=Sydney&state=NSW&country=Australia&date=2024-01-15&time=14:00&timezone=Australia/Sydney&provider=auto

Endpoint

BASE URL
https://yourdomain.com
METHOD
GET
PATH
/api/weather

Parameters

suburbstringREQUIRED

Location name (e.g., 'Sydney', 'London', 'New York')

statestring

State/region (default: 'NSW')

countrystring

Country name (default: 'Australia')

datestringREQUIRED

Date in YYYY-MM-DD format (e.g., '2024-01-15')

timestringREQUIRED

Time in HH:MM format, 24-hour (e.g., '14:00')

timezonestring

Timezone identifier (default: 'Australia/Sydney')

providerstring

Data source: 'auto' (default), 'all', 'open-meteo', 'weatherapi', etc.

include_allboolean

Set to 'true' to get data from all available sources

Response Format

{
  "query": {
    "suburb": "Sydney",
    "state": "NSW",
    "country": "Australia",
    "date": "2024-01-15",
    "time": "14:00",
    "timezone": "Australia/Sydney"
  },
  "geocode": {
    "lat": -33.8688,
    "lon": 151.2093,
    "display_name": "Sydney, NSW, Australia"
  },
  "result": {
    "provider": "open-meteo",
    "latitude": -33.8688,
    "longitude": 151.2093,
    "timezone": "Australia/Sydney",
    "requested_local": "2024-01-15T14:00",
    "matched_local": "2024-01-15T14:00",
    "point": {
      "time_local": "2024-01-15T14:00",
      "temperature_c": 28.5,
      "wind_speed_kph": 15.2,
      "wind_gust_kph": 22.3,
      "precipitation_mm": 0,
      "relative_humidity_pct": 65,
      "cloud_cover_pct": 25,
      "weather_code": 1,
      "condition_text": "Partly Cloudy"
    }
  },
  "consensus": {
    "temperature_c": 28.3,
    "relative_humidity_pct": 64,
    "precipitation_mm": 0,
    "condition_text": "Partly Cloudy"
  },
  "statuses": [
    {
      "provider": "open-meteo",
      "status": "success"
    },
    {
      "provider": "weatherapi",
      "status": "success"
    }
  ]
}

Code Examples

cURL

curl "https://yourdomain.com/api/weather?suburb=Sydney&state=NSW&country=Australia&date=2024-01-15&time=14:00&timezone=Australia/Sydney&provider=auto"

JavaScript / Fetch

fetch('https://yourdomain.com/api/weather?suburb=Sydney&state=NSW&country=Australia&date=2024-01-15&time=14:00&timezone=Australia/Sydney&provider=auto')
  .then(res => res.json())
  .then(data => console.log(data));

Python

import requests

response = requests.get('https://yourdomain.com/api/weather', params={
    'suburb': 'Sydney',
    'state': 'NSW',
    'country': 'Australia',
    'date': '2024-01-15',
    'time': '14:00',
    'timezone': 'Australia/Sydney',
    'provider': 'auto'
})

data = response.json()
print(data)

Available Data Sources

Open-Meteo
open-meteo

Free, open-source weather API

BrightSky
brightsky

German Weather Service (DWD)

NASA Power
nasa-power

Historical climate data

MET Norway
met-norway

Norwegian Meteorological Institute

NWS
nws

US National Weather Service

WeatherAPI
weatherapi

Global weather data

Visual Crossing
visualcrossing

Historical weather analytics

OpenWeatherMap
openweathermap

Popular weather platform

World Weather Online
worldweatheronline

Comprehensive weather data

Weatherbit
weatherbit

High-quality weather APIs

Rate Limits & Fair Use

This is a free service aggregating data from multiple public APIs. Please use responsibly and avoid excessive requests. For high-volume usage, consider running your own instance (open source).

Support & Contributing

This project is open source. If you encounter issues or want to contribute, please visit our repository or contact the maintainers.

Try API Now →