Amap Maps Get V3 Distance
1 credits/call
ae_amap_maps_get_v3_distance
Calculate the distance and estimated travel time between locations. Supports straight-line, driving, and walking modes. For addresses or place names, first convert/search them into lng,lat coordinates, then use those coordinates here.
1 credits/call
Pricing
1 credits/call
| Condition | Charge |
|---|---|
| Each call | 1 credits/call |
Parameters
Optional parameters use the platform defaults when omitted.
| Parameter | Type | Required | Description | Default |
|---|---|---|---|---|
type | enum (0 | 1 | 3) | No | 路径计算的方式和方法 0:直线距离 1:驾车导航距离(仅支持国内坐标)。 必须指出,当为1时会考虑路况,故在不同时间请求返回结果可能不同。 此策略和驾车路径规划接口的 strategy=0策略基本一致,策略为“ 速度优先,此路线不一定距离最短 ” 由于算法差异,无法保证距离测量结果与路径规划结果完全一致。若需要实现高德地图客户端效果,可以考虑使用驾车路径规划接口 3:步行规划距离(仅支持5km之间的距离) 注意:该参数在 schema 中定义为 string;请按字符串枚举传入,例如 "0"、"1",不要传裸数字 0、1。 | 1 |
output | enum (JSON | XML) | No | 返回数据格式类型 可选值:JSON,XML | JSON |
origins | string | Yes | 出发点 支持100个坐标对,坐标对见用“| ”分隔;经度和纬度用","分隔 | — |
callback | string | No | 回调函数 callback值是用户定义的函数名称,此参数只在output=JSON时有效 | — |
destination | string | Yes | 目的地 规则: lon,lat(经度,纬度), “,”分割 如117.500244, 40.417801 经纬度小数点不超过6位 | — |
Invocation example
Copy the request and explore its response example.
POST
/agent-api/v1/tool/executeX-Api-KeyRequest coderequest.sh
curl --request POST \
--url 'https://agentearth.ai/agent-api/v1/tool/execute?tool_name=ae_amap_maps_get_v3_distance' \
--header "X-Api-Key: $AGENTEARTH_API_KEY" \
--header 'Content-Type: application/json' \
--data-raw '{
"params": {
"destination": "121.588711,31.085745",
"origins": "121.617523,31.186512",
"type": "1"
}
}'Response exampleresponse.json
{
"count": "1",
"info": "OK",
"infocode": "10000",
"results": [
{
"dest_id": "1",
"distance": "15783",
"duration": "3205",
"origin_id": "1"
}
],
"status": "1"
}Guides using this tool
See how this tool fits into real workflows

