英國(guó)郵政編碼檢索
專用API
【更新時(shí)間: 2024.04.01】
UK POSTCODE API 是一種專門設(shè)計(jì)用于處理和檢索與英國(guó)郵政編碼相關(guān)的數(shù)據(jù)的應(yīng)用程序編程接口。
|
瀏覽次數(shù)
11
采購(gòu)人數(shù)
0
試用次數(shù)
0
試用
收藏
×
完成
取消
×
書簽名稱
確定
|
- API詳情
- 接口文檔
- 使用指南
- 常見 FAQ
- 關(guān)于我們
- 相關(guān)推薦


什么是英國(guó)郵政編碼檢索?
服務(wù)詳情
UK Postcode API 是一種網(wǎng)絡(luò)服務(wù),它允許開發(fā)者通過編程方式查詢和使用英國(guó)的郵政編碼數(shù)據(jù)。這些API通常提供多種功能,如地址自動(dòng)完成、郵政編碼查找、地址詳情獲取、地理編碼、距離計(jì)算等。這些服務(wù)對(duì)于構(gòu)建涉及地址和位置信息的應(yīng)用程序非常有用,例如電子商務(wù)網(wǎng)站、物流管理系統(tǒng)、地圖服務(wù)等。
核心功能
- 郵政編碼查詢API
- 地址查詢API
- UDPRN查找
- 地址自動(dòng)建議API
應(yīng)用場(chǎng)景
什么是英國(guó)郵政編碼檢索接口?


按郵政編碼查詢郵編信息接口Curl請(qǐng)求示例代碼:
curl --location --request GET 'https://postcode.apitier.com/v1/postcodes/PL1 1AR&x-api-key=3apCJpHJY59mF4oOqCzuz2sbGeBfZBYi7S3gzAqq' | json_pp
按地址查詢郵編信息接口Curl請(qǐng)求示例代碼:
curl --location --request GET 'https://postcode.apitier.com/v1/addresses?query=Bridge Road&page=0&limit=50&x-api-key=3apCJpHJY59mF4oOqCzuz2sbGeBfZBYi7S3gzAqq' |
按UDPRN編碼查詢郵編信息接口Curl請(qǐng)求示例代碼:
curl --location --request GET 'https://postcode.apitier.com/v1/udprn/64983?x-api-key=3apCJpHJY59mF4oOqCzuz2sbGeBfZBYi7S3gzAqq'
自動(dòng)補(bǔ)全地址接口Curl請(qǐng)求示例代碼:
curl --location --request GET 'https://postcode.apitier.com/v1/addresses/autocomplete?query=Cottage&x-api-key=3apCJpHJY59mF4oOqCzuz2sbGeBfZBYi7S3gzAqq'




參數(shù)名 | 參數(shù)類型 | 默認(rèn)值 | 是否必傳 | 描述 |
---|---|---|---|---|
postcode | String | PL1 1AR | 是 | 郵編 |
x-api-key | String | 3apCJpHJY59mF4oOqCzuz2sbGeBfZBYi7S3gzAqq | 是 | 密鑰 |
參數(shù)名 | 參數(shù)類型 | 默認(rèn)值 | 描述 |
---|---|---|---|
status | int | 200 | 狀態(tài)碼 |
message | string | Success | 返回消息 |
noOfItems | int | 0 | 數(shù)據(jù)條數(shù) |
result.postcode | string | PL1_1AR | 郵編 |
result.district | string | Plymouth | 地區(qū) |
result.ward | string | St_Peter_and_the_Waterfront_PL1_1AR | 區(qū) |
result.county | string | Devon | 縣 |
result.country | string | England | 國(guó)家 |
result.geocode.eastings | string | 247702 | 中央經(jīng)線向東距離 |
result.geocode.northings | string | 0054920 | 中央經(jīng)線向北距離 |
result.geocode.latitude | string | 50.374411 | 經(jīng)度 |
result.geocode.longitude | string | -4.143138 | 緯度 |
addresses[0].po_box | string | ||
addresses[0].line_2 | string | CopthorneHotel | |
addresses[0].postcode_type | string | ArmadaWay | |
addresses[0].line_3 | string | ArmadaWay | |
addresses[0].su_organisation_indicator | string | ||
addresses[0].building_number | string | ||
addresses[0].udprn | string | 18911185 | |
addresses[0].thoroughfare | string | ArmadaWay | |
addresses[0].line_1 | string | CopthorneHotelsLtd | |
addresses[0].postcode_outcode | string | PL1 | |
addresses[0].postcode_compact | string | PL11AR | |
addresses[0].dependant_thoroughfare | string | ||
addresses[0].premise | string | CopthorneHotel | |
addresses[0].post_town | string | PLYMOUTH | |
addresses[0].building_name | string | CopthorneHotel | |
addresses[0].organisation_name | string | CopthorneHotelsLtd | |
addresses[0].postcode | string | PL11AR | |
addresses[0].department_name | string | ||
addresses[0].postcode_incode | string | 1AR | |
addresses[0].address | string | CopthorneHotelsLtd | |
addresses[0].double_dependant_locality | string | ||
addresses[0].sub_building_name | string | ||
addresses[0].dependant_locality | string | ||
addresses[0].delivery_point_suffix | string | 1A |
錯(cuò)誤碼 | 錯(cuò)誤信息 | 描述 |
---|---|---|
200 | success | 成功 |
請(qǐng)求參數(shù){ "postcode": "PL1 1AR", "x-api-key": "3apCJpHJY59mF4oOqCzuz2sbGeBfZBYi7S3gzAqq" } 返回參數(shù) { "status": "200", "message": "Success", "noOfItems": "6", "result.postcode": "PL1_1AR", "result.district": "Plymouth", "result.ward": "St_Peter_and_the_Waterfront_PL1_1AR", "result.county": "Devon", "result.country": "England", "result.geocode.eastings": "247702", "result.geocode.northings": "0054920", "result.geocode.latitude": "50.374411", "result.geocode.longitude": "-4.143138", "addresses[0].line_2": "CopthorneHotel", "addresses[0].postcode_type": "ArmadaWay", "addresses[0].line_3": "ArmadaWay", "addresses[0].udprn": "18911185", "addresses[0].thoroughfare": "ArmadaWay", "addresses[0].line_1": "CopthorneHotelsLtd", "addresses[0].postcode_outcode": "PL1", "addresses[0].postcode_compact": "PL11AR", "addresses[0].premise": "CopthorneHotel", "addresses[0].post_town": "PLYMOUTH", "addresses[0].building_name": "CopthorneHotel", "addresses[0].organisation_name": "CopthorneHotelsLtd", "addresses[0].postcode": "PL11AR", "addresses[0].postcode_incode": "1AR", "addresses[0].address": "CopthorneHotelsLtd", "addresses[0].delivery_point_suffix": "1A" } 錯(cuò)誤碼 { "200": "success" }
參數(shù)名 | 參數(shù)類型 | 默認(rèn)值 | 是否必傳 | 描述 |
---|---|---|---|---|
query | String | Bridge Road | 是 | 查詢參數(shù) |
x-api-key | String | 3apCJpHJY59mF4oOqCzuz2sbGeBfZBYi7S3gzAqq | 是 | 密鑰 |
limit | Int | 50 | 是 | 返回最大條數(shù) |
page | Int | 是 | 頁(yè)數(shù) |
參數(shù)名 | 參數(shù)類型 | 默認(rèn)值 | 描述 |
---|---|---|---|
status | int | 200 | 狀態(tài)碼 |
message | string | Success | 返回消息 |
total | int | 2 | 數(shù)據(jù)總數(shù) |
result.hits[0].address | string | TheBridges | 地址 |
result.hits[0].building_name | string | TheBridges | 建筑名稱 |
result.hits[0].building_number | string | 建筑物編號(hào) | |
result.hits[0].line_1 | string | TheBridges | 線路_1 |
result.hits[0].line_2 | string | BridgeRoad | 線路_2 |
result.hits[0].line_3 | string | Bishopstone | 線路_3 |
result.hits[0].organisation_name | string | 機(jī)構(gòu)名稱 | |
result.hits[0].po_box | string | HK860 | 郵政信箱 |
result.hits[0].post_town | string | SALISBURY | 驛站 |
result.hits[0].postcode | string | SP54BS | 郵政編碼 |
result.hits[0].premise | string | TheBridges | 前提 |
result.hits[0].sub_building_name | string | 子建筑名稱 | |
result.hits[0].thoroughfare | string | BridgeRoad | 通道 |
result.hits[0].udprn | string | 23063218 | UDPRN |
錯(cuò)誤碼 | 錯(cuò)誤信息 | 描述 |
---|---|---|
200 | success | 成功 |
請(qǐng)求參數(shù){ "query": "Bridge Road", "x-api-key": "3apCJpHJY59mF4oOqCzuz2sbGeBfZBYi7S3gzAqq", "limit": "50", "page": "" } 返回參數(shù) { "status": "200", "message": "Success", "total": "2", "result.hits[0].address": "TheBridges", "result.hits[0].building_name": "TheBridges", "result.hits[0].line_1": "TheBridges", "result.hits[0].line_2": "BridgeRoad", "result.hits[0].line_3": "Bishopstone", "result.hits[0].po_box": "HK860", "result.hits[0].post_town": "SALISBURY", "result.hits[0].postcode": "SP54BS", "result.hits[0].premise": "TheBridges", "result.hits[0].thoroughfare": "BridgeRoad", "result.hits[0].udprn": "23063218" } 錯(cuò)誤碼 { "200": "success" }
參數(shù)名 | 參數(shù)類型 | 默認(rèn)值 | 是否必傳 | 描述 |
---|---|---|---|---|
UDPRN | String | 64983 | 是 | 英國(guó) UDPRN |
x-api-key | String | 3apCJpHJY59mF4oOqCzuz2sbGeBfZBYi7S3gzAqq | 是 | 密鑰 |
參數(shù)名 | 參數(shù)類型 | 默認(rèn)值 | 描述 |
---|---|---|---|
status | int | 200 | 狀態(tài)碼 |
message | string | Success | 返回消息 |
result.building_number | string | 9 | 建筑物編號(hào) |
result.premise | string | 9 | 前提 |
result.building_name | string | 建筑物名稱 | |
result.sub_building_name | string | 子建筑物名稱 | |
result.organisation_name | string | 機(jī)構(gòu)名稱 | |
result.line_1 | string | 9MarchburnPlace | 線路_1 |
result.line_2 | string | 線路_2 | |
result.line_3 | string | 線路_3 | |
result.postcode | string | AB167PL | 郵政編碼 |
result.thoroughfare | string | MarchburnPlace | 通道 |
result.post_town | string | ABERDEEN | 驛站 |
result.po_box | string | 9 | 郵政信箱 |
result.ward | string | Northfield/MastrickNorth | 選區(qū) |
result.district | string | AberdeenCity | 區(qū) |
result.county | string | Scotland | 縣 |
result.country | string | Scotland | 國(guó)家 |
result.udprn | string | 64983 | udprn編號(hào) |
result.address | string | 9_Marchburn_Place_ABERDEEN_AB16_7PL_9 | 地址 |
result.postcode_incode | string | 7PL | 郵政編碼_輸入代碼 |
result.postcode_outcode | string | AB16 | 郵政編碼_輸出代碼 |
result.postcode_compact | string | AB167PL | 郵政編碼_縮寫 |
result.postcode_type | string | S | 郵政編碼類型 |
result.department_name | string | 部門名稱 | |
result.su_organisation_indicator | string | 用戶組織 | |
result.double_dependant_locality | string | 雙依賴局部性 | |
result.dependant_thoroughfare | string | 依賴通道 | |
result.dependant_locality | string | ||
result.delivery_point_suffix | int | 1Q | 交貨點(diǎn)后綴 |
result.geocode.eastings | string | 390246 | 中央經(jīng)度向東距離 |
result.geocode.northings | string | 0808744 | 中央經(jīng)度向北距離 |
result.geocode.latitude | string | 57.169420 | 經(jīng)度 |
result.geocode.longitude | string | -2.162936 | 緯度 |
錯(cuò)誤碼 | 錯(cuò)誤信息 | 描述 |
---|---|---|
200 | success | 成功 |
請(qǐng)求參數(shù){ "UDPRN": "64983", "x-api-key": "3apCJpHJY59mF4oOqCzuz2sbGeBfZBYi7S3gzAqq" } 返回參數(shù) { "status": "200", "message": "Success", "result.building_number": "9", "result.premise": "9", "result.line_1": "9MarchburnPlace", "result.postcode": "AB167PL", "result.thoroughfare": "MarchburnPlace", "result.post_town": "ABERDEEN", "result.po_box": "9", "result.ward": "Northfield/MastrickNorth", "result.district": "AberdeenCity", "result.county": "Scotland", "result.country": "Scotland", "result.udprn": "64983", "result.address": "9_Marchburn_Place_ABERDEEN_AB16_7PL_9", "result.postcode_incode": "7PL", "result.postcode_outcode": "AB16", "result.postcode_compact": "AB167PL", "result.postcode_type": "S", "result.delivery_point_suffix": "1Q", "result.geocode.eastings": "390246", "result.geocode.northings": "0808744", "result.geocode.latitude": "57.169420", "result.geocode.longitude": "-2.162936" } 錯(cuò)誤碼 { "200": "success" }
參數(shù)名 | 參數(shù)類型 | 默認(rèn)值 | 是否必傳 | 描述 |
---|---|---|---|---|
x-api-key | String | 3apCJpHJY59mF4oOqCzuz2sbGeBfZBYi7S3gzAqq | 是 | 密鑰 |
query | String | Cottage | 是 | 查詢關(guān)鍵字 |
參數(shù)名 | 參數(shù)類型 | 默認(rèn)值 | 描述 |
---|---|---|---|
status | int | 200 | 狀態(tài)碼 |
message | string | Success | 返回消息 |
result.total | int | 2 | 返回?cái)?shù)據(jù)總數(shù) |
result.hits[0].address | string | Cottage_1_23_Cross_Hill_Hunmanby | 地址 |
result.hits[0].udprn | string | 55109741 | udprn編碼 |
result.hits[0].urls.findByUDPRN | string | https://postcode.apitier.com/v1/udprn/55109741?x-api-key=3apCJpHJY59mF4oOqCzuz2sbGeBfZBYi7S3gzAqq | 網(wǎng)址 |
錯(cuò)誤碼 | 錯(cuò)誤信息 | 描述 |
---|---|---|
200 | success | 200 |
請(qǐng)求參數(shù){ "x-api-key": "3apCJpHJY59mF4oOqCzuz2sbGeBfZBYi7S3gzAqq", "query": "Cottage" } 返回參數(shù) { "status": "200", "message": "Success", "result.total": "2", "result.hits[0].address": "Cottage_1_23_Cross_Hill_Hunmanby", "result.hits[0].udprn": "55109741", "result.hits[0].urls.findByUDPRN": "https://postcode.apitier.com/v1/udprn/55109741?x-api-key=3apCJpHJY59mF4oOqCzuz2sbGeBfZBYi7S3gzAqq" } 錯(cuò)誤碼 { "200": "success" }


按郵政編碼查詢郵編信息接口Curl請(qǐng)求示例代碼:
curl --location --request GET 'https://postcode.apitier.com/v1/postcodes/PL1 1AR&x-api-key=3apCJpHJY59mF4oOqCzuz2sbGeBfZBYi7S3gzAqq' | json_pp
按地址查詢郵編信息接口Curl請(qǐng)求示例代碼:
curl --location --request GET 'https://postcode.apitier.com/v1/addresses?query=Bridge Road&page=0&limit=50&x-api-key=3apCJpHJY59mF4oOqCzuz2sbGeBfZBYi7S3gzAqq' |
按UDPRN編碼查詢郵編信息接口Curl請(qǐng)求示例代碼:
curl --location --request GET 'https://postcode.apitier.com/v1/udprn/64983?x-api-key=3apCJpHJY59mF4oOqCzuz2sbGeBfZBYi7S3gzAqq'
自動(dòng)補(bǔ)全地址接口Curl請(qǐng)求示例代碼:
curl --location --request GET 'https://postcode.apitier.com/v1/addresses/autocomplete?query=Cottage&x-api-key=3apCJpHJY59mF4oOqCzuz2sbGeBfZBYi7S3gzAqq'





