Amap Maps Get V3 Traffic Status Rectangle

1 credits/call
ae_amap_maps_get_v3_traffic_status_rectangle

Get real-time traffic conditions for a specific rectangular area.

Maps
1 credits/call

Pricing

1 credits/call
ConditionCharge
Each call1 credits/call

Parameters

Optional parameters use the platform defaults when omitted.

ParameterTypeRequiredDescriptionDefault
levelstringYes道路等级 指定道路等级,下面各值代表的含义: 1:高速(京藏高速) 2:城市快速路、国道(西三环、103国道) 3:高速辅路(G6辅路) 4:主要道路(长安街、三环辅路路) 5:一般道路(彩和坊路) 6:无名道路 注意:该参数在 schema 中定义为 string,即使含义是数字或数字枚举,也请按字符串传入,例如 "1"、"20",不要传裸数字 1、20。—
outputenum (JSON | XML)No返回数据格式类型 可选值:JSON,XMLJSON
callbackstringNo回调函数 callback值是用户定义的函数名称,此参数只在output=JSON时有效—
rectanglestringYes代表此为矩形区域查询 左下右上顶点坐标对。矩形对角线不能超过10公里 两个坐标对之间用”;”间隔 xy之间用”,”间隔 最后格式为—
extensionsenum (base | all)No返回结果控制 可选值:base,allbase

Invocation example

Copy the request and explore its response example.

POST/agent-api/v1/tool/executeX-Api-Key
Request coderequest.sh
curl --request POST \
  --url 'https://agentearth.ai/agent-api/v1/tool/execute?tool_name=ae_amap_maps_get_v3_traffic_status_rectangle' \
  --header "X-Api-Key: $AGENTEARTH_API_KEY" \
  --header 'Content-Type: application/json' \
  --data-raw '{
  "params": {
    "extensions": "all",
    "level": "4",
    "output": "JSON",
    "rectangle": "120.670000,27.735000;120.705000,27.770000"
  }
}'
Response exampleresponse.json
JSONPartial content
{
  "info": "OK",
  "infocode": "10000",
  "status": "1",
  "trafficinfo": {
    "description": "滨海大道:双向畅通。",
    "evaluation": {
      "blocked": "0.00%",
      "congested": "0.00%",
      "description": "整体畅通",
      "expedite": "100.00%",
      "status": "1",
      "unknown": "0.00%"
    },
    "roads": [
      {
        "angle": "58",
        "direction": "从滨海大道西口到人民路",
        "lcodes": "50915,50916",
        "name": "滨海大道",
        "polyline": "120.653175,27.717392;120.653435,27.7174702;120.653992,27.7177467;120.654945,27.7183743;120.655785,27.7189865;120.656464,27.7195606;120.657135,27.7201862;120.657722,27.7207165;120.660072,27.7228088;120.664368,27.7265873;120.668625,27.7303963;120.673653,27.7",
        "status": "1"
      }
    ]
  }
}

This example shows part of the response. Copied content is valid JSON.

Guides using this tool

See how this tool fits into real workflows