对输入的地址文本做经纬度坐标查询,精确到POI;返回经纬度中包含GCJ02和WGS84两种坐标系。
测试
您可以在地址标准化产品控制台进行API测试。
请求参数
名称 | 类型 | 是否必选 | 示例值 | 描述 |
Action | String | 是 | GetAddressGeocode | 系统规定参数。 取值:GetAddressGeocode。 |
AppKey | String | 是 | Axqwerasdf1a | 项目AppKey |
ServiceCode | String | 是 | addrp | 固定值:addrp |
Text | String | 是 | 阿里巴巴西溪园区 | 文本内容 |
DefaultProvince | String | 否 | 浙江省 | 默认省份 |
DefaultCity | String | 否 | 杭州市 | 默认城市 |
DefaultDistrict | String | 否 | 余杭区 | 默认行政区 |
返回参数
名称 | 类型 | 示例值 | 描述 |
Data | String | {"offline_geocode":{"wgs84":"120.02151877289762,30.28154270777058","gcj02":"120.026268,30.279164"},"status":"OK","time_used":{"rt":{"div_search":0.000041484832763671875,"segment":0.000012159347534179688,"geocode":0.00009250640869140625,"address_correct":0.004271745681762695,"address_search":0.0651092529296875,"structure":0.009287357330322266},"start":1619333621.2547765}} |
|
RequestId | String | E0627DDE-28D7-4C00-A611-E047DF81AF05 | RequestId |
示例
请求示例
http(s)://[Endpoint]/?Action=GetAddressGeocode
&AppKey=Axqwerasdf1a
&ServiceCode=addrp
&Text=阿里巴巴西溪园区
&<公共请求参数>
正常返回示例
XML格式
<RequestId>23182B3F-F35D-4993-B2AF-44396C36DB5B</RequestId>
<Data>
<offline_geocode>
<wgs84>120.02151877289762,30.28154270777058</wgs84>
<gcj02>120.026268,30.279164</gcj02>
</offline_geocode>
<status>OK</status>
<time_used>
<rt>
<div_search>0.000041484832763671875</div_search>
<segment>0.000012159347534179688</segment>
<geocode>0.00009250640869140625</geocode>
<address_correct>0.004271745681762695</address_correct>
<address_search>0.0651092529296875</address_search>
<structure>0.009287357330322266</structure>
</rt>
<start>1619333621.2547765</start>
</time_used>
</Data>
JSON格式
{
"RequestId": "23182B3F-F35D-4993-B2AF-44396C36DB5B",
"Data": {
"offline_geocode": {
"wgs84": "120.02151877289762,30.28154270777058",
"gcj02": "120.026268,30.279164"
},
"status": "OK ",
"time_used ": {
"rt ": {
"div_search": 0.000041484832763671875,
"segment": 0.000012159347534179688,
"geocode": 0.00009250640869140625,
"address_correct": 0.004271745681762695,
"address_search": 0.0651092529296875,
"structure": 0.009287357330322266
},
"start": 1619333621.2547765
}
}
}
错误码
HttpCode | 错误码 | 错误信息 | 描述 |
403 | Forbidden.NoAuth | Failed to perform user authentication. | 用户鉴权失败 |
500 | InternalError | A service error occurred. | 服务内部异常 |
400 | InvalidParameter | The parameter is invalid. | 参数无效 |
404 | ResourceDoesNotExist | The resource does not exist. | 资源不存在 |
429 | Throttling.User | Flow control has been triggered. | 触发流控 |
400 | UserStatusInvalid | The user status is invalid. | 用户状态无效 |
访问错误中心查看更多错误码。