Address completion

Updated at:

Fills in missing administrative regions, street names, and street numbers for a specified address.

Test

You can perform an API test in the Address Purification console.

Request parameters

Name

Type

Required

Sample value

Description

Action

String

Yes

CompleteAddress

A required parameter. The value is CompleteAddress.

AppKey

String

Yes

Axqwerasdf1a

The AppKey of the project.

ServiceCode

String

Yes

addrp

Static field: addrp

Text

String

Yes

969 Wenyixi Road

The text content.

DefaultProvince

String

No

Zhejiang Province

The default province.

DefaultCity

String

No

Hangzhou City

The default city.

DefaultDistrict

String

No

Yuhang District

The default administrative region.

Response data

Name

Type

Example

Description

Data

String

{ "complete":"prov=Zhejiang Province\tcity=Hangzhou City\tdistrict=Yuhang District\ttown=Wuchang Subdistrict\troad=Wenyixi Road\troadno=No. 969", "status":"OK", "time_used":{"rt":{"div_search":0.000051975250244140625, "segment":0.000017404556274414062, "geocode":0.3796203136444092, "address_correct":0.00016808509826660156, "complete":0.0001125335693359375, "structure":0.006722211837768555}, "start":1619601672.0161073}}

complete: The completed address.

time_used: The processing time of the algorithm.

status: The status.

RequestId

String

671CC134-EC6A-491F-90B0-7F6319C3CBF1

Request ID

Examples

Request example

http(s)://[Endpoint]/?Action=CompleteAddress
&AppKey=Axqwerasdf1a
&ServiceCode=addrp
&Text=969 Wenyixi Road
&<Common request parameters>

Successful response example

XML format

<RequestId>515807CC-51D7-4410-B978-58A443BEEED7</RequestId>
 <Data>
  <complete>prov=Zhejiang Province city=Hangzhou City district=Yuhang District town=Wuchang Subdistrict road=Wenyixi Road roadno=No. 969</complete>
  <status>OK</status>
  <time_used>
   <rt>
    <div_search>0.000051975250244140625</div_search>
    <segment>0.000017404556274414062</segment>
    <geocode>0.3796203136444092</geocode>
    <address_correct>0.00016808509826660156</address_correct>
    <complete>0.0001125335693359375</complete>
    <structure>0.006722211837768555</structure>
   </rt>
   <start>1619601672.0161073</start>
  </time_used>
 </Data>

JSON format

{
"RequestId":"515807CC-51D7-4410-B978-58A443BEEED7",
"Data":{
"complete":"prov=Zhejiang Province\tcity=Hangzhou City\tdistrict=Yuhang District\ttown=Wuchang Subdistrict\troad=Wenyixi Road\troadno=No. 969",
"status":"OK",
"time_used":{"rt":{"div_search":0.000051975250244140625,
"segment":0.000017404556274414062,
"geocode":0.3796203136444092,
"address_correct":0.00016808509826660156,
"complete":0.0001125335693359375,
"structure":0.006722211837768555},
"start":1619601672.0161073}}}

Error codes

HttpCode

Error code

Error message

Description

403

Forbidden.NoAuth

Failed to perform user authentication.

User authentication failed.

500

InternalError

A service error occurred.

An internal service error occurred.

400

InvalidParameter

The parameter is invalid.

The parameter is invalid.

404

ResourceDoesNotExist

The resource does not exist.

The resource does not exist.

429

Throttling.User

Flow control has been triggered.

Throttling was triggered.

400

UserStatusInvalid

The user status is invalid.

The user status is invalid.

For more error codes, see the Error Center.