Web/PC

生活指数看板 (网页端)
桌面浏览器端的综合指数展示看板,提供穿衣、洗车、紫外线等多种生活指数的实时分析与建议
indices/v1/daily 生活指数:1 日标准含穿衣、洗车、紫外线等(路径含组 ID 100),5/10/15 日预报为进阶能力,需 Location Key。
华风爱科生活指数 API 提供穿衣、洗车、紫外线、感冒、运动、旅游等多种生活气象指数,分为标准能力与进阶能力。调用前需通过 定位搜索 API 获取 Location Key。标准路径为 /indices/v1/daily/1day/{locationkey}/100,其中 100 为国内常用指数组;各指数 ID 与级别含义见实用资料 · 指数列表。由中国气象局授权品牌与 AccuWeather 全球数据能力提供支撑。
/indices/v1/daily/1day/{locationkey}/100 1 日生活指数5day / 10day / 15day 多日预报;groups.json 指数元数据details=true 返回 Category、CategoryValue 等扩展信息通过生活指数API可以构建的应用示例

桌面浏览器端的综合指数展示看板,提供穿衣、洗车、紫外线等多种生活指数的实时分析与建议

原生生活助手应用,为用户提供贴心的每日生活建议,包括运动、过敏提醒等个性化服务

针对不同终端定制的指数展示界面,清晰呈现各类气象指标与生活贴士,提供直观的数据解读

专为大屏平板打造的沉浸式指数展示界面,充分利用屏幕宽度展示多项生活指数的详细演变与分类
101924 北京)。GET /indices/v1/daily/1day/{locationkey}/100(100 为国内常用指数组),建议 language=zh-cn 与 details=true;指数 ID 对照见实用资料 · 指数列表。标准 1 日路径格式为 /indices/v1/daily/1day/{locationkey}/{groupId},其中 {groupId} 为指数组 ID(示例 100 含国内常用指数);进阶多日路径为 /indices/v1/daily/{Nday}/{locationkey}/100(与标准 1 日相同组 ID)。下表为查询参数。
| 参数名 | 类型 | 必填 | 默认值 | 说明 | 示例 |
|---|---|---|---|---|---|
| apikey | String | 是 | - | 用以在API里验证与授权使用的用户密钥 | YOUR_API_KEY |
| version | String | 是 | v1 | 当前API版本 | v1 |
| locationkey | String | 是 | - | 用以搜索指定地点的特定ID | 101924 |
| format | String | 否 | JSON | 响应格式 | JSON |
| language | String | 否 | en-us | 指定响应数据语言的字符串 | zh-cn |
| details | String | 否 | false | 用以判断返回缩短版或完整版的数据 | details = true |
| 参数 | 类型 | 说明 | 数据形式示例 |
|---|---|---|---|
|
Name
|
String | 指数名称 (如:晨练指数、穿衣指数) | 晨练指数 |
|
ID
|
Int | 指数唯一标识 ID | 100 |
|
Ascending
|
Boolean | 是否为升序 (即数值越大越好) | true |
|
LocalDateTime
|
String | 数据有效本地时间 | 2026-07-27T07:00:00+08:00 |
|
EpochDateTime
|
Int | 数据有效时间的 UNIX 时间戳 | 1785106800 |
|
Value
|
Float | 指数等级数值 | 2 |
|
Category
|
String | 等级描述名称 (如:适宜、初冬装) | 较适宜 |
|
CategoryValue
|
Int | 等级分类索引值 | 2 |
|
MobileLink
|
String | 移动端链接 | http://m.weathercn.com/zh/cn/beijing/101924/weather-forecast/101924?lang=zh-cn |
|
Link
|
String | 网页端链接 | http://m.weathercn.com/zh/cn/beijing/101924/weather-forecast/101924?lang=zh-cn |
# 调取1日生活指数(标准能力)
curl "https://openapi.weathercn.com/indices/v1/daily/1day/101924/100?apikey=YOUR_API_KEY&language=zh-cn&details=true"
// 调取1日生活指数(标准能力)
fetch('https://openapi.weathercn.com/indices/v1/daily/1day/101924/100?apikey=YOUR_API_KEY&language=zh-cn&details=true')
.then(response => response.json())
.then(data => console.log(data));
import requests
# 调取1日生活指数(标准能力)
url = "https://openapi.weathercn.com/indices/v1/daily/1day/101924/100"
params = {'apikey': 'YOUR_API_KEY', 'language': 'zh-cn', 'details': 'true'}
response = requests.get(url, params=params)
print(response.json())
// 调取1日生活指数(标准能力)
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://openapi.weathercn.com/indices/v1/daily/1day/101924/100?apikey=YOUR_API_KEY&language=zh-cn&details=true"))
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
<?php
// 调取1日生活指数(标准能力)
$url = 'https://openapi.weathercn.com/indices/v1/daily/1day/101924/100';
$params = http_build_query(['apikey' => 'YOUR_API_KEY', 'language' => 'zh-cn', 'details' => 'true']);
$response = file_get_contents($url . '?' . $params);
print_r(json_decode($response, true));
?>
package main
import (
"fmt"
"io"
"net/http"
)
func main() {
url := "https://openapi.weathercn.com/indices/v1/daily/1day/101924/100?apikey=YOUR_API_KEY&language=zh-cn&details=true"
resp, _ := http.Get(url)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}
require 'net/http'
require 'json'
url = URI("https://openapi.weathercn.com/indices/v1/daily/1day/101924/100")
params = {apikey: 'YOUR_API_KEY', language: 'zh-cn', details: 'true'}
url.query = URI.encode_www_form(params)
response = Net::HTTP.get_response(url)
puts JSON.parse(response.body)
let url = URL(string: "https://openapi.weathercn.com/indices/v1/daily/1day/101924/100?apikey=YOUR_API_KEY&language=zh-cn&details=true")!
let task = URLSession.shared.dataTask(with: url) { data, response, error in
if let data = data { print(try? JSONSerialization.jsonObject(with: data)) }
}
task.resume()
[
{
"Name": "晨练指数",
"ID": 100,
"Ascending": false,
"LocalDateTime": "2026-03-10T07:00:00+08:00",
"EpochDateTime": 1773097200,
"Value": 1.0,
"Category": "适宜",
"CategoryValue": 1,
"MobileLink": "http://m.weathercn.com/...",
"Link": "http://m.weathercn.com/..."
},
{
"Name": "穿衣指数",
"ID": 101,
"Ascending": false,
"LocalDateTime": "2026-03-10T07:00:00+08:00",
"EpochDateTime": 1773097200,
"Value": 5.0,
"Category": "初冬装",
"CategoryValue": 5,
"MobileLink": "http://m.weathercn.com/...",
"Link": "http://m.weathercn.com/..."
},
{
"Name": "感冒指数",
"ID": 102,
"Ascending": false,
"LocalDateTime": "2026-03-10T07:00:00+08:00",
"EpochDateTime": 1773097200,
"Value": 1.0,
"Category": "少发",
"CategoryValue": 1,
"MobileLink": "http://m.weathercn.com/...",
"Link": "http://m.weathercn.com/..."
},
// ... 中间省略 24 条生活指数数据 ...
{
"Name": "过敏指数",
"ID": 127,
"Ascending": false,
"LocalDateTime": "2026-03-10T07:00:00+08:00",
"EpochDateTime": 1773097200,
"Value": 4.0,
"Category": "易发",
"CategoryValue": 4,
"MobileLink": "http://m.weathercn.com/...",
"Link": "http://m.weathercn.com/..."
}
]
Key。100 为指数组,各指数 ID 含义见实用资料 · 指数列表。X-Gw-API-Key: YOUR_API_KEY,避免 Key 出现在 URL 日志中。