技术博客
台风最新坐标轨迹接口:如何调用当前台风列表(342-1)

台风最新坐标轨迹接口:如何调用当前台风列表(342-1)

作者: 万维易源
2026-09-02
当前台风列表342-1台风查询免费接口
# 台风最新坐标轨迹接口:如何调用当前台风列表(342-1) > 接入点 342-1 · 免费 · POST/GET · 适用全栈工程师 · 阅读约 6 分钟 ## 核心要点 - 342-1 无请求参数,仅需在 query 带 appKey 即可返回当前在编台风。 - 返回 showapi_res_body.list,每条含中文名 name、英文名 enname、坐标 lat/lng、强度 strong 等。 - 列表中的 tfid 是后续调用 342-2 单个台风详情的必填钥匙。 ## Why:这跟我有关系吗 这是使用频次最高的接入点——任何「现在海上有几个台风」的需求都从它开始。 ## What:接口速览 | 项目 | 说明 | |------|------| | 接入点 | 342-1 当前台风列表 | | 请求参数 | 无(仅需鉴权 appKey) | | 返回数组 | `showapi_res_body.list` | | 每条字段 | 14 个(见返回字段全解) | | 缓存 | 每次查询缓存 6 小时 | ## How:一步步调用 ### Python ```python import requests resp = requests.post( "https://route.showapi.com/342-1", params={"appKey": "YOUR_APPKEY"}, headers={"content-type": "application/x-www-form-urlencoded"}, timeout=10, ) data = resp.json() if data.get("showapi_res_code") != 0 or data["showapi_res_body"].get("ret_code") != 0: raise RuntimeError(data.get("showapi_res_error") or "业务返回非成功") for t in data["showapi_res_body"]["list"]: print(f"{t['name']} ({t['enname']}) @ {t['lat']},{t['lng']} {t['strong']}") ``` ### cURL ```bash curl -X POST "https://route.showapi.com/342-1?appKey=YOUR_APPKEY" \ -H "content-type: application/x-www-form-urlencoded" ``` ### Node.js ```javascript const r = await fetch("https://route.showapi.com/342-1?appKey=YOUR_APPKEY", { method: "POST", headers: { "content-type": "application/x-www-form-urlencoded" }, }); const data = await r.json(); for (const t of data.showapi_res_body.list) { console.log(`${t.name} (${t.enname}) @ ${t.lat},${t.lng} ${t.strong}`); } ``` ## 返回示例与解析 ```json { "showapi_res_code": 0, "showapi_res_error": "", "showapi_res_id": "ce135f6739294c63be0c021b76b6fbff", "showapi_res_body": { "list": [ { "enname": "Chan-hom", "lat": "26.00", "lng": "125.10", "movedirection": "北西", "movespeed": "20", "name": "灿鸿", "power": "16", "pressure": "935", "radius10": "180", "radius7": "450", "speed": "52", "strong": "超强台风", "tfid": "201509", "time": "2015-07-10 11:00:00" }, { "enname": "Nangka", "lat": "18.30", "lng": "142.70", "movedirection": "西北西", "movespeed": "10", "name": "浪卡", "power": "17", "pressure": "920", "radius10": "180", "radius7": "400", "speed": "60", "strong": "超强台风", "tfid": "201511", "time": "2015-07-10 08:00:00" } ], "ret_code": 0 } } ``` ## 进阶与边界 无参数意味着无法按区域/强度过滤,需在客户端侧对 list 做筛选;6 小时缓存机制下,短时间重复查询返回相同结果。 ## FAQ **Q:342-1 需要传哪些参数?** 仅需 appKey(鉴权),无其他业务参数。 **Q:返回空 list 是什么意思?** 表示当前没有正在进行(在编)的台风,属正常情况,非报错。 **Q:怎么拿到单个台风的轨迹?** 取 list 中某条的 tfid,传给 342-2 单个台风详情。 ## 相关能力 / 下一步阅读 - [台风最新坐标轨迹接口:5 分钟接入,获取当前台风列表](https://www.showapi.com/guides/typhoon-track-quickstart-342) - [台风最新坐标轨迹接口返回字段全解:list/obj/typhoon_list 与 14 项坐标强度字段](https://www.showapi.com/guides/typhoon-track-response-fields-342) - [台风最新坐标轨迹接口:用 tfid 调用单个台风详情(342-2)拉取轨迹数据线](https://www.showapi.com/guides/typhoon-track-detail-342) - **本系列共 13 篇**:查看[台风最新坐标轨迹接口官方指南总目录](https://www.showapi.com/guides/typhoon-track-guides-342)