Basic Services
Address extraction, name extraction, phone extraction, division code, zip code
extract — Address Extraction
Extract address fragments from natural text, removing non-address content.
curl -X POST https://api.leaper.one/v1/address/extract \
-H "Authorization: Bearer sk-your-api-key" \
-H "Content-Type: application/json" \
-d '{"text": "张三13812345678北京市朝阳区建国路93号万达广场"}'{
"location_extract": [
{ "start": 13, "end": 29, "type": "LOC", "word": "北京市朝阳区建国路93号万达广场" }
]
}extract-name — Name Extraction
Identify and extract person names from logistics text.
curl -X POST https://api.leaper.one/v1/address/extract-name \
-H "Authorization: Bearer sk-your-api-key" \
-H "Content-Type: application/json" \
-d '{"text": "张三13812345678北京市朝阳区建国路93号"}'{
"person_extract": [
{ "start": 0, "end": 2, "word": "张三" }
]
}extract-phone — Phone Number Extraction
Identify and extract phone numbers from text.
curl -X POST https://api.leaper.one/v1/address/extract-phone \
-H "Authorization: Bearer sk-your-api-key" \
-H "Content-Type: application/json" \
-d '{"text": "张三13812345678北京市朝阳区建国路93号"}'{
"phone_extract": [
{ "start": 2, "end": 13, "word": "13812345678" }
]
}division-code — Administrative Division Code
Identify the administrative division code (province, city, district, street) for a given address.
curl -X POST https://api.leaper.one/v1/address/division-code \
-H "Authorization: Bearer sk-your-api-key" \
-H "Content-Type: application/json" \
-d '{"text": "北京市朝阳区建国路93号"}'{
"division_info": {
"divcode": "110105001000",
"division_province": "北京市",
"division_city": "北京市",
"division_district": "朝阳区",
"division_street": "建外街道"
}
}zipcode — Zip Code Lookup
Return the postal code for a given address.
curl -X POST https://api.leaper.one/v1/address/zipcode \
-H "Authorization: Bearer sk-your-api-key" \
-H "Content-Type: application/json" \
-d '{"text": "北京市朝阳区建国路93号"}'{
"zipcode": "100011",
"status": "OK"
}