天气预报

天气预报

官方自营

可用于机器学习、人工智能数据分析。提供天气实况,通过坐标区域、IP、地名、景点名称、电话区号或邮编等有效信息可查询天气情况(天气状况、湿度、天气图标、实时温度、风向、风级、紫外线、穿衣指南、空气指数)。可查询到当前天气、未来24小时、7天、15天、40天内天气预报和过往的历史天气情况等数据。

已选规格
49.00
自购买起有效期 12 个月
专用资源包
支持通用资源包:充值通用资源包后可直接调用含本接口在内的全站付费接口,无需单独购买专用资源包去充值 ›
名称--查询历史天气
接入点说明
根据地区code或名称查询历史天气。每次返回一个地区1个月的数据。历史数据从2011年开始。
接口地址
https://route.showapi.com/9-7?appKey={your_appKey}查看密钥调用帮助
返回格式JSON
请求方式POST/GET
更新频率每天早上4:00更新昨天历史天气
请求参数
Header 参数
Post 表单
返回参数
该接口返回经 showapi_res_body 系统封装,业务数据均位于该对象内;系统级字段见
返回体
cURL
curl -X POST "https://route.showapi.com/9-7?appKey=YOUR_APPKEY" \
  -H "content-type: application/x-www-form-urlencoded" \
  -d "areaCode=110000&month=201601&startDate=20160504&endDate=20160510&area=%E5%8C%97%E4%BA%AC"
返回示例
JSON
{
  "showapi_res_error": "",
  "showapi_res_code": 0,
  "showapi_res_id": "5f619fef8d57bae110c4628d",
  "showapi_res_body": {
    "startDate": "20160504",
    "ret_code": 0,
    "area": "北京",
    "areaCode": "110000",
    "month": "201601",
    "showapi_fee_code": 0,
    "areaid": "",
    "endDate": "20160510",
    "list": [
      {
        "aqiLevel": "6",
        "time": "20160101",
        "min_temperature": "-4℃",
        "wind_direction": "无持续风向",
        "wind_power": "微风",
        "aqi": "311",
        "weather": "霾",
        "max_temperature": "5℃",
        "aqiInfo": "严重污染"
      },
      {
        "aqiLevel": "6",
        "time": "20160102",
        "min_temperature": "-4℃",
        "wind_direction": "无持续风向",
        "wind_power": "微风",
        "aqi": "415",
        "weather": "霾-雾",
        "max_temperature": "6℃",
        "aqiInfo": "严重污染"
      },
      {
        "aqiLevel": "5",
        "time": "20160103",
        "min_temperature": "-4℃",
        "wind_direction": "无持续风向~北风",
        "wind_power": "微风~3-4级",
        "aqi": "285",
        "weather": "霾-多云",
        "max_temperature": "3℃",
        "aqiInfo": "重度污染"
      },
      {
        "aqiLevel": "1",
        "time": "20160104",
        "min_temperature": "-6℃",
        "wind_direction": "北风~无持续风向",
        "wind_power": "3-4级~微风",
        "aqi": "22",
        "weather": "多云-晴",
        "max_temperature": "2℃",
        "aqiInfo": "优"
      }
    ]
  }
}
MCP 服务集成接口级

在 Cherry Studio、ChatBox 等支持 MCP 的客户端中配置,将 {your_appKey} 替换为真实 AppKey(AppKey 管理)。该服务覆盖本接口全部接入点。

MCP JSON
{
  "mcpServers": {
    "showapi-mcp-9": {
      "url": "http://www.showapi.com.cn/mcp/9/{your_appKey}"
    }
  }
}
OpenAPI 文档接口级

标准 OpenAPI 3.0 文档,覆盖本接口全部接入点,可导入 Apifox / Postman / Swagger UI,或供 AI Agent 直接消费。