7Timer Weather

Weather API · Works globally · Operated from China · Based on NCEP/NCAR data

TL;DR

7Timer is a free weather forecast service based in China that provides 7-day forecasts using NCEP/NCAR global reanalysis data. It offers multiple forecast products — civil (temp, precipitation, cloud cover), civil_light (simplified), astro (astronomical seeing/transparency), and marine (wind/wave) — for any GPS coordinate worldwide. No API key required, JSON and XML output supported. Particularly useful for East Asia weather data where western providers may have sparser coverage.

Quick start: http://www.7timer.info/bin/api.pl?lon=113&lat=23&product=civil&output=json

No API key needed — just make a request!

How to Use This API

1. Civil Forecast (Temperature, Rain, Clouds)

Standard weather forecast for Guangzhou, China (lon=113, lat=23):

http://www.7timer.info/bin/api.pl?lon=113&lat=23&product=civil&output=json

Returns 7 days of 3-hourly data: temp, precipitation type/amount, cloud cover, humidity, wind speed/direction.

2. Astronomical Forecast (Seeing & Transparency)

For stargazing at Mauna Kea, Hawaii (lon=-155.5, lat=19.8):

http://www.7timer.info/bin/api.pl?lon=-155.5&lat=19.8&product=astro&output=json

Returns cloud cover, transparency (1-8), seeing (1-8), and weather conditions optimized for astronomy.

3. Marine Forecast (Wind & Waves)

For offshore conditions near Tokyo (lon=140, lat=35):

http://www.7timer.info/bin/api.pl?lon=140&lat=35&product=marine&output=json

Returns wind speed/direction, wave height, and wave period for marine navigation.

4. JavaScript — Get Weather

const params = new URLSearchParams({
  lon: -74.006, lat: 40.7128,
  product: 'civil', output: 'json'
});
fetch('http://www.7timer.info/bin/api.pl?' + params)
  .then(res => res.json())
  .then(data => console.log('Forecast:', data.dataseries));

5. Python — Multiple Products

import requests

base = 'http://www.7timer.info/bin/api.pl'
params = {'lon': 113, 'lat': 23, 'output': 'json'}

# Civil forecast
params['product'] = 'civil'
civil = requests.get(base, params=params).json()
print('Temp 3-hourly:', [d['temp2m'] for d in civil['dataseries']])

# Astronomical forecast
params['product'] = 'astro'
astro = requests.get(base, params=params).json()
print('Seeing (1-8):', [d['seeing'] for d in astro['dataseries']])
Try the civil forecast: http://www.7timer.info/bin/api.pl?lon=113&lat=23&product=civil&output=json

Frequently Asked Questions

Do I need an API key?
No. 7Timer is completely free and open. No registration or API key needed.
What forecast products are available?
Four products: civil (temperature, precipitation, cloud cover, wind), civil_light (simplified civil), astro (astronomical seeing and transparency), and marine (wind waves, swell height/period).
How long is the forecast range?
7 days (168 hours) at 3-hour intervals, giving 56 data points per request.
Is 7Timer accurate for locations outside China?
Yes. It uses global NCEP/NCAR reanalysis data, the same source used by many national weather services. Coverage is global, though resolution may be coarser than local services.
What output formats are supported?
JSON (output=json) and XML (output=xml). JSON is recommended for web applications.
Can I use this in a commercial project?
Yes, 7Timer is free for both personal and commercial use. Attribution is appreciated.

API Details

API URL
http://www.7timer.info/bin/api.pl
Documentation
www.7timer.info/doc.php
Category
Weather
Authentication
Not Required
Geographic Coverage
Global — NCEP/NCAR reanalysis, good coverage in Asia-Pacific

What You Can Build