Files
higress/plugins/wasm-go/mcp-servers/mcp-route-planning/api.json
2025-04-16 14:48:53 +08:00

1180 lines
60 KiB
JSON
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{
"info": {
"description": "【路径规划 路线规划 驾车路径规划】基于实时交通情况提供最优路线规划,包括驾车、步行、骑乘、公交等。 —— 我们只做精品!",
"title": "【聚美智数】路径规划-路线规划-驾车路径规划-步行路径规划-骑乘路径规划-公交路径规划",
"version": "1.0.0"
},
"openapi": "3.0.1",
"paths": {
"/route/distance-measurement": {
"post": {
"operationId": "行程距离测量",
"summary": "行程距离测量",
"requestBody": {
"content": {
"application/x-www-form-urlencoded": {
"schema": {
"type": "object",
"properties": {
"destination": {
"description": "目的地 规则lonlat经度纬度 “,”分割经纬度小数点后不得超过6位",
"type": "string"
},
"origins": {
"description": "出发点 ,经度和纬度用”,”分隔",
"type": "string"
},
"type": {
"description": "路径计算的方式和方法 0直线距离 1驾车导航距离仅支持国内坐标。 当为1时会考虑路况,故在不同时间请求能不同。 此策略和驾车路径规划接口的strategy=4策略基本一致,策略为”拥堵的路线,但是可能会存在绕路的情况,耗时可能较长”实现高德地图客户端效果,考虑使用驾车路径规划接口 3步行规划距离仅支持5km之间的距离",
"type": "string"
}
},
"required": [
"origins",
"destination"
]
}
}
},
"required": true
},
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"code": {
"type": "integer",
"description": "返回码,详见返回码说明"
},
"msg": {
"type": "string",
"description": "返回码对应描述"
},
"taskNo": {
"type": "string",
"description": "本次请求号"
},
"data": {
"type": "object",
"properties": {
"count": {
"type": "string",
"description": "结果总数"
},
"results": {
"type": "array",
"items": {
"type": "object",
"properties": {
"duration": {
"type": "string",
"description": "预计行驶时间,单位:秒"
},
"distance": {
"type": "string",
"description": "路径距离,单位:米"
},
"origin_id": {
"type": "string",
"description": "起点坐标,起点坐标序列号(从1开始)"
},
"dest_id": {
"type": "string",
"description": "终点坐标,终点坐标序列号(从1开始)"
}
}
}
}
}
}
}
}
}
},
"description": "成功"
}
}
}
},
"/route/public-transit": {
"post": {
"operationId": "公交路线规划",
"summary": "公交路线规划",
"requestBody": {
"content": {
"application/x-www-form-urlencoded": {
"schema": {
"type": "object",
"properties": {
"date": {
"description": "请求日期 例如:2023-10-28",
"type": "string"
},
"nightFlag": {
"description": "考虑夜班车 0不考虑夜班车 1考虑夜班车",
"type": "string"
},
"origin": {
"description": "起点经纬度 经度在前,纬度在后,经度和纬度用”,”分割经纬度小数点后不得超过6位",
"type": "string"
},
"origCityCode": {
"description": "起点所在城市 仅支持citycode参考国家行政区域编码表 相同时代表同城,不同时代表跨城 譬如西湖区citycode为330106",
"type": "string"
},
"destination": {
"description": "目的地经纬度 经度在前,纬度在后,经度和纬度用”,”分割经纬度小数点后不得超过6位",
"type": "string"
},
"showFields": {
"description": "返回结果控制 详见show_fields说明 show_fields用来筛选response结果中可选字段。show_fields的使用需要遵循如下规则 1、具体可指定返回的字段类请见下方返回结果说明中的“show_fields”内字段类型>的“show_fields”内字段类型 2、多个字段间采用“,”进行分割; 3、show_fields未设置时只返回基础信息类内字段",
"type": "string"
},
"destCityCode": {
"description": "目的地所在城市 仅支持citycode参考国家行政区域编码表 相同时代表同城,不同时代表跨城 譬如西湖区citycode为330106",
"type": "string"
},
"multiexPort": {
"description": "地铁出入口数量 0只返回一个地铁出入口 1返回全部地铁出入口",
"type": "string"
},
"origAddCode": {
"description": "起点所在行政区域编码 参考国家行政区域编码表",
"type": "string"
},
"maxTrans": {
"description": "最大换乘次数 0直达 1最多换乘1次 2最多换乘2次 3最多换乘3次 4最多换乘4次",
"type": "string"
},
"alternativeRoute": {
"description": "返回方案条数 可传入1-10的阿拉伯数字代表返回的不同条数",
"type": "string"
},
"time": {
"description": "请求时间 例如:9-54",
"type": "string"
},
"destAddCode": {
"description": "终点所在行政区域编码 参考国家行政区域编码表",
"type": "string"
},
"strategy": {
"description": "公共交通换乘策略 可选值: 0推荐模式综合权重同高德APP默认 1最经济模式票价最低 2最少换乘模式换乘次数少 3最少步行模式尽可能减少步行距离 4最舒适模式尽可能乘坐空调车 5不乘地铁模式不乘坐地铁路线 6地铁图模式起终点都是地铁站 地铁图模式下originpoi及destinationpoi为必填项 7地铁优先模式步行距离不超过4KM 8时间短模式方案花费总时间最少",
"type": "string"
}
},
"required": [
"origin",
"destination",
"origCityCode",
"destCityCode"
]
}
}
},
"required": true
},
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"code": {
"type": "integer",
"description": "返回码,详见返回码说明"
},
"msg": {
"type": "string",
"description": "返回码对应描述"
},
"taskNo": {
"type": "string",
"description": "本次请求号"
},
"data": {
"type": "object",
"properties": {
"strategyNum": {
"type": "string",
"description": "路径规划方案总数"
},
"strategyList": {
"type": "object",
"properties": {
"distance": {
"type": "string",
"description": "本条路线的总距离,单位:米"
},
"origin": {
"type": "string",
"description": "起点经纬度"
},
"destination": {
"type": "string",
"description": "终点经纬度"
},
"transits": {
"type": "array",
"items": {
"type": "object",
"properties": {
"walking_distance": {
"type": "string"
},
"distance": {
"type": "string",
"description": "本条路线的总距离,单位:米"
},
"nightflag": {
"type": "string",
"description": "0非夜班车1夜班车"
},
"segments": {
"type": "array",
"items": {
"type": "object",
"properties": {
"walking": {
"type": "object",
"properties": {
"distance": {
"type": "string",
"description": "每段线路步行距离 单位:米"
},
"origin": {
"type": "string",
"description": "起点坐标"
},
"destination": {
"type": "string",
"description": "终点坐标"
},
"duration": {
"type": "string",
"description": "步行预计时间 单位:秒"
},
"steps": {
"type": "array",
"items": {
"type": "object",
"properties": {
"distance": {
"type": "string",
"description": "此段路的距离"
},
"road": {
"type": "string"
},
"instruction": {
"type": "string",
"description": "此段路的行走介绍"
},
"duration": {
"type": "string"
},
"polyline": {
"type": "string"
},
"action": {
"type": "string"
},
"assistant_action": {
"type": "string"
}
}
}
}
}
},
"railway": {
"type": "object",
"properties": {
"trip": {
"type": "string",
"description": "线路车次号"
},
"distance": {
"type": "string",
"description": "该item换乘段的行车总距离"
},
"name": {
"type": "string",
"description": "线路名称"
},
"id": {
"type": "string",
"description": "线路id编号"
},
"time": {
"type": "string",
"description": "该线路车段耗时"
},
"type": {
"type": "string",
"description": "线路车次类型"
},
"departure_stop": {
"type": "object",
"properties": {
"adcode": {
"type": "string",
"description": "上车站点所在城市的adcode"
},
"name": {
"type": "string",
"description": "上车站点名称"
},
"start": {
"type": "string",
"description": "是否始发站1表示为始发站0表示非始发站"
},
"location": {
"type": "string",
"description": "上车站点经纬度"
},
"id": {
"type": "string",
"description": "上车站点ID"
},
"time": {
"type": "string",
"description": "上车点发车时间"
}
}
},
"arrival_stop": {
"type": "object",
"properties": {
"adcode": {
"type": "string",
"description": "下车站点所在城市的adcode"
},
"name": {
"type": "string",
"description": "下车站点名称"
},
"location": {
"type": "string",
"description": "下车站点经纬度"
},
"end": {
"type": "string",
"description": "是否为终点站1表示为终点站0表示非终点站"
},
"id": {
"type": "string",
"description": "下车站点ID"
},
"time": {
"type": "string",
"description": "到站时间如大于24:00则表示跨天"
}
}
},
"via_stop": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "途径站点的名称"
},
"location": {
"type": "string",
"description": "途径站点的坐标点"
},
"id": {
"type": "string",
"description": "途径站点的ID"
},
"time": {
"type": "string",
"description": "途径站点的进站时间如大于24:00,则表示跨天"
},
"wait": {
"type": "string",
"description": "途径站点的停靠时间,单位:分钟"
}
}
},
"alters": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "备选方案ID"
},
"id": {
"type": "string",
"description": "备选线路名称"
}
}
},
"spaces": {
"type": "array",
"items": {
"type": "object",
"properties": {
"code": {
"type": "string"
},
"cost": {
"type": "string",
"description": "仓位费用"
}
}
}
}
}
},
"bus": {
"type": "object",
"properties": {
"buslines": {
"type": "array",
"items": {
"type": "object",
"properties": {
"start_time": {
"type": "string"
},
"distance": {
"type": "string",
"description": "公交行驶距离 单位:米"
},
"bustimetag": {
"type": "string"
},
"id": {
"type": "string",
"description": "公交路线id"
},
"type": {
"type": "string",
"description": "公交类型 格式如:地铁线路"
},
"bus_time_tips": {
"type": "string"
},
"name": {
"type": "string",
"description": "公交路线名称"
},
"end_time": {
"type": "string"
},
"via_num": {
"type": "string",
"description": "此段途经公交站数"
},
"departure_stop": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "站点名字"
},
"location": {
"type": "string",
"description": "站点经纬度"
},
"id": {
"type": "string",
"description": "站点id"
},
"entrance": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "入口名称"
},
"location": {
"type": "string",
"description": "入口经纬度"
}
}
},
"exit": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "出口名称"
},
"location": {
"type": "string",
"description": "出口经纬度"
}
}
}
}
},
"arrival_stop": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "站点名字"
},
"location": {
"type": "string",
"description": "站点经纬度"
},
"id": {
"type": "string",
"description": "站点id"
}
}
},
"via_stops": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "途径公交站点信息"
},
"location": {
"type": "string",
"description": "公交站点经纬度"
},
"id": {
"type": "string",
"description": "公交站点编号"
}
}
}
}
}
}
}
}
},
"taxi": {
"type": "object",
"properties": {
"price": {
"type": "string",
"description": "打车预计花费金额"
},
"drivetime": {
"type": "string"
},
"distance": {
"type": "string"
},
"polyline": {
"type": "string"
},
"startpoint": {
"type": "string"
},
"startname": {
"type": "string"
},
"endpoint": {
"type": "string"
},
"endname": {
"type": "string"
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
},
"description": "成功"
}
}
}
},
"/route/electric-bicycle": {
"post": {
"operationId": "电动车骑行路线规划",
"summary": "电动车骑行路线规划",
"requestBody": {
"content": {
"application/x-www-form-urlencoded": {
"schema": {
"type": "object",
"properties": {
"alternativeRoute": {
"description": "返回路线条数 1多备选路线中第一条路线 2多备选路线中前两条路线 3多备选路线中三条路线 不传则默认返回一条路线方案",
"type": "string"
},
"origin": {
"description": "起点经纬度 经度在前,纬度在后,经度和纬度用”,”分割经纬度小数点后不得超过6位",
"type": "string"
},
"destination": {
"description": "目的地经纬度 经度在前,纬度在后,经度和纬度用”,”分割经纬度小数点后不得超过6位",
"type": "string"
},
"showFields": {
"description": "返回结果控制 详见show_fields说明 show_fields用来筛选response结果中可选字段。show_fields的使用需要遵循如下规则 1、具体可指定返回的字段类请见下方返回结果说明中的“show_fields”内字段类型>的“show_fields”内字段类型 2、多个字段间采用“,”进行分割; 3、show_fields未设置时只返回基础信息类内字段",
"type": "string"
}
},
"required": [
"origin",
"destination"
]
}
}
},
"required": true
},
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"code": {
"type": "integer",
"description": "返回码,详见返回码说明"
},
"msg": {
"type": "string",
"description": "返回码对应描述"
},
"taskNo": {
"type": "string",
"description": "本次请求号"
},
"data": {
"type": "object",
"properties": {
"strategyNum": {
"type": "string",
"description": "路径规划方案总数"
},
"strategyList": {
"type": "object",
"properties": {
"paths": {
"type": "array",
"items": {
"type": "object",
"properties": {
"duration": {
"type": "string",
"description": "线路耗时包括方案总耗时及分段step中的耗时"
},
"distance": {
"type": "string",
"description": "方案距离,单位:米"
},
"steps": {
"type": "array",
"items": {
"type": "object",
"properties": {
"road_name": {
"type": "string",
"description": "分段道路名称"
},
"orientation": {
"type": "string",
"description": "进入道路方向"
},
"step_distance": {
"type": "integer",
"description": "分段距离信息"
},
"instruction": {
"type": "string",
"description": "骑行指示"
}
}
}
}
}
}
},
"origin": {
"type": "string",
"description": "起点经纬度"
},
"destination": {
"type": "string",
"description": "终点经纬度"
}
}
}
}
}
}
}
}
},
"description": "成功"
}
}
}
},
"/route/ride": {
"post": {
"operationId": "自行车骑行路线规划",
"summary": "自行车骑行路线规划",
"requestBody": {
"content": {
"application/x-www-form-urlencoded": {
"schema": {
"type": "object",
"properties": {
"alternativeRoute": {
"description": "返回路线条数 1多备选路线中第一条路线 2多备选路线中前两条路线 3多备选路线中三条路线 不传则默认返回一条路线方案",
"type": "string"
},
"origin": {
"description": "起点经纬度 经度在前,纬度在后,经度和纬度用”,”分割经纬度小数点后不得超过6位",
"type": "string"
},
"destination": {
"description": "目的地经纬度 经度在前,纬度在后,经度和纬度用”,”分割经纬度小数点后不得超过6位",
"type": "string"
},
"showFields": {
"description": "返回结果控制 详见show_fields说明 show_fields用来筛选response结果中可选字段。show_fields的使用需要遵循如下规则 1、具体可指定返回的字段类请见下方返回结果说明中的“show_fields”内字段类型 2、多个字段间采用“,”进行分割; 3、show_fields未设置时只返回基础信息类内字段",
"type": "string"
}
},
"required": [
"origin",
"destination"
]
}
}
},
"required": true
},
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"code": {
"type": "integer",
"description": "返回码,详见返回码说明",
"example": 200
},
"msg": {
"type": "string",
"description": "返回码对应描述",
"example": "成功"
},
"taskNo": {
"type": "string",
"description": "本次请求号",
"example": "657592213165464010084862"
},
"data": {
"type": "object",
"properties": {
"strategyNum": {
"type": "string",
"description": "路径规划方案总数",
"example": "1"
},
"strategyList": {
"type": "object",
"properties": {
"paths": {
"type": "array",
"items": {
"type": "object",
"properties": {
"duration": {
"type": "string",
"description": "线路耗时包括方案总耗时及分段step中的耗时",
"example": "2699"
},
"distance": {
"type": "string",
"description": "方案距离,单位:米",
"example": "8944"
},
"steps": {
"type": "array",
"items": {
"type": "object",
"properties": {
"road_name": {
"type": "string",
"description": "分段道路名称",
"example": ""
},
"orientation": {
"type": "string",
"description": "进入道路方向",
"example": "西"
},
"step_distance": {
"type": "integer",
"description": "分段距离信息",
"example": 81
},
"instruction": {
"type": "string",
"description": "骑行指示",
"example": "向西骑行81米左转"
}
}
}
}
}
}
},
"origin": {
"type": "string",
"description": "起点经纬度",
"example": "120.10910,30.27714"
},
"destination": {
"type": "string",
"description": "终点经纬度",
"example": "120.17931,30.25326"
}
}
}
}
}
}
}
}
},
"description": "成功"
}
}
}
},
"/route/walk": {
"post": {
"operationId": "步行路线规划",
"summary": "步行路线规划",
"requestBody": {
"content": {
"application/x-www-form-urlencoded": {
"schema": {
"type": "object",
"properties": {
"alternativeRoute": {
"description": "返回路线条数 1多备选路线中第一条路线 2多备选路线中前两条路线 3多备选路线中三条路线 不传则默认返回一条路线方案",
"type": "string"
},
"origin": {
"description": "起点经纬度 经度在前,纬度在后,经度和纬度用”,”分割经纬度小数点后不得超过6位",
"type": "string"
},
"destination": {
"description": "目的地经纬度 经度在前,纬度在后,经度和纬度用”,”分割经纬度小数点后不得超过6位",
"type": "string"
},
"showFields": {
"description": "返回结果控制 详见show_fields说明 show_fields用来筛选response结果中可选字段。show_fields的使用需要遵循如下规则 1、具体可指定返回的字段类请见下方返回结果说明中的“show_fields”内字段类型 2、多个字段间采用“,”进行分割; 3、show_fields未设置时只返回基础信息类内字段",
"type": "string"
}
},
"required": [
"origin",
"destination"
]
}
}
},
"required": true
},
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"code": {
"type": "integer",
"description": "返回码,详见返回码说明"
},
"msg": {
"type": "string",
"description": "返回码对应描述"
},
"taskNo": {
"type": "string",
"description": "本次请求号"
},
"data": {
"type": "object",
"properties": {
"strategyNum": {
"type": "string",
"description": "路径规划方案总数"
},
"strategyList": {
"type": "object",
"properties": {
"paths": {
"type": "array",
"items": {
"type": "object",
"properties": {
"cost": {
"type": "object",
"properties": {
"duration": {
"type": "string",
"description": "线路耗时包括方案总耗时及分段step中的耗时"
}
}
},
"distance": {
"type": "string",
"description": "方案距离,单位:米"
},
"steps": {
"type": "array",
"items": {
"type": "object",
"properties": {
"road_name": {
"type": "string",
"description": "分段道路名称"
},
"orientation": {
"type": "string",
"description": "进入道路方向"
},
"step_distance": {
"type": "string",
"description": "分段距离信息"
},
"instruction": {
"type": "string",
"description": "步行指示"
}
}
}
}
}
}
},
"origin": {
"type": "string",
"description": "起点经纬度"
},
"destination": {
"type": "string",
"description": "终点经纬度"
}
}
}
}
}
}
}
}
},
"description": "成功"
}
}
}
},
"/route/drive": {
"post": {
"operationId": "驾车路线规划",
"summary": "驾车路线规划",
"requestBody": {
"content": {
"application/x-www-form-urlencoded": {
"schema": {
"type": "object",
"properties": {
"originType": {
"description": "起点处道路类型 填入此值可以辅助更精准的起点算路 0普通道路 1高架上 2高架下 3主路 4辅路 5隧道 7环岛 9停车场内部",
"type": "string"
},
"carType": {
"description": "车辆类型 0普通燃油汽车 1纯电动汽车 2插电式混动汽车",
"type": "string"
},
"avoidpolygons": {
"description": "避让区域 区域避让默认支持1个避让区域每个区域最多可有16个顶点多个区域坐标按顺序以英文竖线符号分隔如果是四边形则有四个坐标点如果是五边形则有五个坐标点最大支持32个避让区域。同时传入避让区域及避让道路仅支持避让道路每个避让区域不能超过81平方公里否则避让区域会失效",
"type": "string"
},
"origin": {
"description": "起点经纬度 经度在前,纬度在后,经度和纬度用”,”分割经纬度小数点后不得超过6位",
"type": "string"
},
"ferry": {
"description": "是否使用轮渡 0:使用渡轮 1:不使用渡轮",
"type": "string"
},
"destination": {
"description": "目的地经纬度 经度在前,纬度在后,经度和纬度用”,”分割经纬度小数点后不得超过6位",
"type": "string"
},
"avoidroad": {
"description": "避让道路名 只支持一条避让道路",
"type": "string"
},
"plate": {
"description": "车牌号码 车牌号,如 京AHA322支持6位传统车牌和7位新能源车牌用于判断限行相关",
"type": "string"
},
"showFields": {
"description": "返回结果控制 详见show_fields说明 show_fields用来筛选response结果中可选字段。show_fields的使用需要遵循如下规则 1、具体可指定返回的字段类请见下方返回结果说明中的“show_fields”内字段类型 2、多个字段间采用“,”进行分割; 3、show_fields未设置时只返回基础信息类内字段",
"type": "string"
},
"strategy": {
"description": "驾车算路策略 0速度优先只返回一条路线此路线不一定距离最短 1费用优先只返回一条路线不走收费路段且耗时最少的路线 2距离优先只返回一条路线仅走距离最短的路线但是可能存在穿越小路/小区的情况 3速度优先只返回一条路线不走快速路例如京通快速路 32默认高德推荐同高德地图APP默认 33躲避拥堵 34高速优先 35不走高速 36少收费 37大路优先 38速度最快 39躲避拥堵高速优先 40躲避拥堵不走高速 41躲避拥堵少收费 42少收费不走高速 43躲避拥堵少收费不走高速 44躲避拥堵大路优先 45躲避拥堵速度最快",
"type": "string"
},
"waypoints": {
"description": "途经点 途径点坐标串默认支持1个有序途径点。多个途径点坐标按顺序以英文分号;分隔。最大支持16个途经点",
"type": "string"
}
},
"required": [
"origin",
"destination"
]
}
}
},
"required": true
},
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"code": {
"type": "integer",
"description": "返回码,详见返回码说明",
"example": 200
},
"msg": {
"type": "string",
"description": "返回码对应描述",
"example": "成功"
},
"taskNo": {
"type": "string",
"description": "本次请求号",
"example": 786758979152547400000000
},
"data": {
"type": "object",
"properties": {
"strategyNum": {
"type": "string",
"description": "路径规划方案总数",
"example": "1"
},
"strategyList": {
"type": "object",
"properties": {
"paths": {
"type": "array",
"items": {
"type": "object",
"properties": {
"distance": {
"type": "string",
"description": "方案距离,单位:米",
"example": "12784"
},
"restriction": {
"type": "string",
"description": "0代表限行已规避或未限行即该路线没有限行路段 1代表限行无法规避即该线路有限行路段",
"example": "0"
},
"steps": {
"type": "array",
"items": {
"type": "object",
"properties": {
"orientation": {
"type": "string",
"description": "进入道路方向",
"example": "西"
},
"step_distance": {
"type": "string",
"description": "分段距离信息",
"example": "81"
},
"road_name": {
"type": "string",
"description": "分段道路名称"
},
"instruction": {
"type": "string",
"description": "行驶指示",
"example": "向西行驶81米左转"
}
}
}
}
}
}
},
"origin": {
"type": "string",
"description": "起点经纬度",
"example": "120.10910,30.27714"
},
"destination": {
"type": "string",
"description": "终点经纬度",
"example": "120.17931,30.25326"
},
"taxi_cost": {
"type": "string",
"description": "预计出租车费用,单位:元",
"example": "27"
}
}
}
}
}
}
}
}
},
"description": "成功"
}
}
}
}
},
"servers": [
{
"url": "https://jmlxgh.market.alicloudapi.com"
}
]
}