freeapis

Weatherstack

全球实时与历史天气数据 API

认证方式
API Key
HTTPS
Yes
CORS
Unknown
分类
天气
数据来源
public-apis

简介

Weatherstack(APILayer 产品)为任意地点提供实时天气、历史数据和机场天气,基于简单的密钥认证。免费层额度较小,但演示和低流量小组件够用。

快速开始

当前天气(替换 YOUR_KEY):

curl "https://api.weatherstack.com/current?access_key=YOUR_KEY&query=London"

带单位与语言:

curl "https://api.weatherstack.com/current?access_key=YOUR_KEY&query=Paris&units=m&language=zh"

认证方式

  • 在 weatherstack.com 注册获取免费密钥(邮件发送)。
  • 通过 access_key 查询参数携带。
  • query 接受城市名、lat,lon 或邮编。

速率限制与注意事项

  • 免费层:100 次请求/月——请精打细算;付费档从 1,000 次/月起。
  • 免费层每小时更新一次天气(付费档更新更频繁)。
  • 响应包含当前天气、位置数据,(付费档还有)历史与天文数据。
  • 所有档位强制 HTTPS。
  • 数据源因地区而异(APILayer 聚合多家供应商)。

常见问题

Weatherstack 免费吗? 有免费层(100 次请求/月);更高配额需要付费。

如何获取密钥? 在 weatherstack.com 注册——access key 会邮件发送。

能获取历史天气吗? 可以,付费档支持。

天气 分类更多

APIAuthHTTPSCORS
7Timer!

Weather, especially for Astroweather

No authNoUnknown↗
AccuWeather

Weather and forecast data

API KeyNoUnknown↗
Aemet

Weather and forecast data from Spain

API KeyYesUnknown↗
APIXU

Weather

API KeyYesUnknown↗
AQICN

Air Quality Index Data for over 1000 cities

API KeyYesUnknown↗