logo

Timeless

花开成景,花落成诗

查询邮政编码Api接口

查询邮政编码Api接口

三月 13, 2020 26 119 1 分钟

根据省份、城市、地区查找邮政编码

根据省份、城市、地区查找邮政编码

地址:https://api.timelessq.com/postalcode

请求方式:GET

1、请求参数

参数名 位置 类型 必填 说明
keyword
query
text
说明:省份、城市

2、示例代码

https://api.timelessq.com/postalcode?keyword=天河区

var axios = require('axios');

var config = {
   method: 'get',
   url: 'https://api.timelessq.com/postalcode',
   params: { 
      'keyword': '天河区'
   }
};

axios(config)
.then(function (response) {
   console.log(JSON.stringify(response.data));
})
.catch(function (error) {
   console.log(error);
});

3、响应示例

{
  "errno": 0,
  "errmsg": "",
  "data": [
    {
      "province": "广东省",  // 省份
      "city": "广州市", // 城市
      "area": "天河区", // 区县
      "post_code": "510600", // 邮政编码
      "area_code": "020"
    }
  ]
}

恰饭区

广告位招租

评论

Power by Node.js + Nuxt.js,由 腾讯云 腾讯云提供服务, 已经稳稳地存活了 8年95天

Copyright © 2018 - 2026 Timeless. All rights reserved.桂ICP备18003656号-1公网安备桂公网安备45092102000147号