Address Cleansing
Structuring, correction, completion, standardization, anomaly detection
structure — Address Structuring
Parse an address into 23 structured fields including province, city, district, street, road, house number, etc.
curl -X POST https://api.leaper.one/v1/address/structure \
-H "Authorization: Bearer sk-your-api-key" \
-H "Content-Type: application/json" \
-d '{"text": "浙江省杭州市余杭区文一西路969号"}'{
"structure": "prov=浙江省\tcity=杭州市\tdistrict=余杭区\troad=文一西路\troadNo=969号",
"status": "OK"
}The structured result uses tab-separated key=value format.
correct — Address Correction
Fix spelling errors in addresses (e.g., incorrect administrative region names).
curl -X POST https://api.leaper.one/v1/address/correct \
-H "Authorization: Bearer sk-your-api-key" \
-H "Content-Type: application/json" \
-d '{"text": "浙江省杭洲市余杭区文一西路969号"}'{
"address_correct": ["浙江省=prov\t杭州市=city\t余杭区=district\t文一西路=road\t969号=roadNo"]
}complete — Address Completion
Fill in missing administrative regions, road names, and house numbers.
curl -X POST https://api.leaper.one/v1/address/complete \
-H "Authorization: Bearer sk-your-api-key" \
-H "Content-Type: application/json" \
-d '{"text": "余杭区文一西路969号"}'{
"complete": "prov=浙江省\tcity=杭州市\tdistrict=余杭区\ttown=五常街道\troad=文一西路\troadNo=969号",
"status": "OK"
}standardize — Address Standardization
Correct and complete address information, producing a normalized standard address.
curl -X POST https://api.leaper.one/v1/address/standardize \
-H "Authorization: Bearer sk-your-api-key" \
-H "Content-Type: application/json" \
-d '{"text": "杭州市余杭区文一西路969号阿里巴巴西溪园区"}'assessment — Address Anomaly Detection
Detect issues in an address (non-address text, missing segments, incorrect digit count, etc.).
curl -X POST https://api.leaper.one/v1/address/assessment \
-H "Authorization: Bearer sk-your-api-key" \
-H "Content-Type: application/json" \
-d '{"text": "随便写的不是地址"}'