需两次购买:①订购原厂商接口 ②免费接口,注册后直接调用;天地图地图服务支持HTTP和HTTPS协议。服务采用OGC WMTS标准,具体使用方法请参考OGC WMTS标准 中GetCapabilities 和GetTile。天地图地图服务对所有用户开放。使用本组服务之前,需要申请Key。
驾车服务API是一类简单的HTTP/HTTPS接口,根据输入起点和终点查询公交地铁规划线路。使用公交规划服务前您需要申请Key。 本接口需到天地图官网购买:http://lbs.tianditu.gov.cn/server/search.html
showapi_res_body
curl -X POST "https://connector.showapi.com/3021-4?appKey=YOUR_APPKEY" \ -H "content-type: application/x-www-form-urlencoded"
{ "showapi_res_error": "", "showapi_fee_num": 1, "showapi_res_code": 0, "showapi_res_id": "6411683d0de376e04eac3914", "showapi_res_body": { "ret_code": 0, "hasSubway": true, "results": [ { "lineType": 1, "lines": [ { "segments": [ { "segmentLine": [ { "segmentStationCount": 13, "segmentTime": -2, "segmentTransferTime": 0, "direction": "地铁2号线(积水潭站-积水潭站)", "segmentDistance": -15314.004955268, "SEndTime": "05:04-22:15", "lineName": "地铁2号线", "linePoint": "116.427561,39.939676;116.349338,39.939135;", "byuuid": "21518" } ], "stationEnd": { "lonlat": "116.349338,39.939135", "name": "西直门站", "uuid": "121230" }, "segmentType": 3, "stationStart": { "lonlat": "116.427561,39.939676", "name": "东直门站", "uuid": "121218" } } ], "lineName": "地铁2号线 |" } ] } ], "remark": "请求成功", "resultCode": 0 } }
在 Cherry Studio、ChatBox 等支持 MCP 的客户端中配置,将 {your_appKey} 替换为真实 AppKey(AppKey 管理)。该服务覆盖本接口全部接入点。
{ "mcpServers": { "showapi-mcp-3021": { "url": "http://www.showapi.com.cn/mcp/3021/{your_appKey}" } } }
标准 OpenAPI 3.0 文档,覆盖本接口全部接入点,可导入 Apifox / Postman / Swagger UI,或供 AI Agent 直接消费。
客服热线请拨打
400-998-8033