邮编

GET
https://api.mymzf.com/api/youbian

接口描述

免费API提供全国地区省市区县邮编

请求参数

请求示例

var axios = require('axios')

var config = {
  method: 'get',
  url: 'https://api.mymzf.com/api/youbian?city=%E6%B5%8E%E5%8D%97'
}

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

返回示例

{
  "code": 200,
  "message": "查询成功",
  "data": [
    {
      "region": "华北地区",
      "city": "北京市",
      "postcode": "100000"
    },
    {
      "region": "华北地区",
      "city": "北京市东城区",
      "postcode": "100010"
    },
    {
      "region": "华北地区",
      "city": "北京市西城区",
      "postcode": "100032"
    }
  ],
  "total": 3
}