Appearance
地址文本解析
根据传入的地址文本信息,提取文本中的关键信息。
地址文本解析 API
接口描述
根据传入的地址文本信息,提取文本中的姓名、电话等关键信息,对地址进行信息分级。
请求方式
| URL | 请求方式 |
|---|---|
| https://lbs.xiaojukeji.com/api/v2/address_identify | POST、GET |
请求
查询参数(GET)
| 参数名 | 必选 | 类型 | 描述 | 示例值 |
|---|---|---|---|---|
| key | 是 | string | 鉴权用的 API Key | YOUR_API_KEY |
| address_text | 是 | string | 要解析的地址文本信息 | 北京北京市海淀区上地街道东软大厦 |
| show_code | 否 | string | 等于1时,返回省市区街道 对应的编码。默认不返回 | 1 |
| order_no | 否 | string | 订单号/运单号 | 125435247675889 |
| la | 否 | string | 语种识别标记。cht表示繁体,en表示英文,chs表示简体,传其它值或不传时取值chs | chs |
| address_tag | 否 | string | 地址标签。src表示寄件地址,dest表示派件地址,other 其它类型地址 | src |
请求体参数(POST)
当使用POST方法时,请求体应为 AddressIdentifyRequest 模型的JSON格式。
请求示例
GET
shell
curl -X GET "https://lbs.xiaojukeji.com/api/v2/address_identify?key=YOUR_API_KEY&address_text=北京北京市海淀区上地街道东软大厦&show_code=1&la=cht"POST
shell
curl -X POST "https://lbs.xiaojukeji.com/api/v2/address_identify?key=YOUR_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"address_text": "北京北京市海淀区上地街道东软大厦",
"show_code": "1",
"la": "cht"
}'响应
成功响应为 AddressIdentifyResponse 模型的JSON格式。
响应示例
json
{
"status": 10000,
"msg": "OK",
"trace_id": "ac19703e690172173fc0756f55b658b0",
"results": {
"code": 0,
"message": "",
"paidata": {
"personname": [],
"nationalPhoneCode": "",
"phoneNumber": "",
"extension": "",
"address": "北京北京市海淀区上地街道东软大厦",
"remark": ""
},
"src": "tip|ars",
"data": {
"province": "北京市",
"city": "北京市",
"county": "海淀區",
"town": "上地街道",
"adcode": "110108",
"citycode": "010",
"detailaddr": "北京东软大厦",
"provinceCode": "110000",
"cityLevCode": "110100",
"countyCode": "110108",
"townCode": "110108022000",
"tipProvince": "",
"tipCity": "",
"tipCounty": "",
"tipTown": ""
},
"sn": "1650812025102909470958334786",
"multiple": "0",
"mark": "1",
"result": "1",
"moreThan": "0",
"dispatchMark": "1",
"conflict": ""
}
}