# 气象接口

## 气象数据接口

根据调查研究，各大天气接口服务商的接口数据基本上来自**中国气象局**和**中央气象台**，对于基础的城市天气、微信云图、雷达回波图，使用公开免费接口即可，

下列接口属于免费接口，整理自中央气象台和中国气象局；

### 一、中央气象台

官方网站：<http://www.nmc.cn/>

#### 1.1 常见接口：

**1.1.1 查询省份**

查询中国所有省份和代码

```
GET http://www.nmc.cn/rest/province
Content-Type: application/json
```

**1.1.1 查询城市**

根据省份代码查询城市

```
GET http://www.nmc.cn/rest/province/AGZ
Content-Type: application/json
```

**1.1.1 查询城市**

根据站点ID查询城市天气

```
GET http://www.nmc.cn/rest/weather?stationid=SKMHP
Content-Type: application/json
```

### 二、中国气象局(CMA)

中国气象局-国家科学数据中心官网：<https://data.cma.cn/>

#### 2.1 常见接口

**2.1.1 雷达回波拼图：**

```
GET https://data.cma.cn/weatherGis/web/bmd/VisDataDef/getVisData?datacode=RADA_L3_MST_REF_PNG_ASWC
Content-Type: application/json
```

**2.1.2 风云四号云图：**

```
GET https://data.cma.cn/weatherGis/web/bmd/VisDataDef/getVisData?datacode=IMG_FY4B-_AGRI--_N_DISK_1050E_L2-_GCLR_MULT_NOM
Content-Type: application/json
```

**中国气象数据网综合实况**

从这个网站爬取接口：

**2.1.3 气象实况：**

```
GET https://data.cma.cn/dataGis/static/gridgis/#/pcindex
Content-Type: application/json
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://blog.o0u0o.com/master.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
