首页 生活常用 全国省市县行政区划分
全国省市县行政区划分

全国省市县行政区划分

  • 1562
  • 3325
最新全国省、市、县行政区划信息,包含区号、邮编等信息,同时包含国外的国家和地区。
免费
https://api.jisuapi.com/area/province
JSON,JSONP
GET
https://api.jisuapi.com/area/province?appkey=yourappkey

请求参数:

API在线测试
参数名称类型必填说明

返回参数:

参数名称类型说明
id int ID
name string 名称
parentid int 上级ID
parentname string 上级名称
areacode string 区号
zipcode string 邮编
depth string 区域等级(深度) 冗余字段,用来查找
districtcode string 行政编码
population string 人口
totalarea string 面积

请求代码:

查看代码
<?php

require_once 'curl.func.php';

$appkey = 'your_appkey_here';//你的appkey
$url = "https://api.jisuapi.com/area/province?appkey=$appkey";
$result = curlOpen($url, ['ssl'=>true]);
$jsonarr = json_decode($result, true);
//exit(var_dump($jsonarr));
if($jsonarr['status'] != 0)
{
    echo $jsonarr['msg'];
    exit();
}

$result = $jsonarr['result'];
foreach($result as $val)
{
    echo $val['id'].' '.$val['name'].' '.$val['parentid'].' '.$val['parentname'].' '.$val['areacode'].' '.$val['zipcode'].' '.$val['depth'].'
'; }

JSON返回示例 :

{
    "status": 0,
    "msg": "ok",
    "result": [
        {
            "id": "1",
            "name": "北京",
            "parentid": "0",
            "parentname": "",
            "areacode": "010",
            "zipcode": "100000",
            "depth": "1"
        },
        {
            "id": "2",
            "name": "安徽",
            "parentid": "0",
            "parentname": "",
            "areacode": "",
            "zipcode": "",
            "depth": "1"
        },
        {
            "id": "3",
            "name": "福建",
            "parentid": "0",
            "parentname": "",
            "areacode": "",
            "zipcode": "",
            "depth": "1"
        },
        {
            "id": "4",
            "name": "甘肃",
            "parentid": "0",
            "parentname": "",
            "areacode": "",
            "zipcode": "",
            "depth": "1"
        },
        {
            "id": "5",
            "name": "广东",
            "parentid": "0",
            "parentname": "",
            "areacode": "",
            "zipcode": "",
            "depth": "1"
        },
        {
            "id": "6",
            "name": "广西",
            "parentid": "0",
            "parentname": "",
            "areacode": "",
            "zipcode": "",
            "depth": "1"
        },
        {
            "id": "7",
            "name": "贵州",
            "parentid": "0",
            "parentname": "",
            "areacode": "",
            "zipcode": "",
            "depth": "1"
        },
        {
            "id": "8",
            "name": "海南",
            "parentid": "0",
            "parentname": "",
            "areacode": "",
            "zipcode": "",
            "depth": "1"
        },
        {
            "id": "9",
            "name": "河北",
            "parentid": "0",
            "parentname": "",
            "areacode": "",
            "zipcode": "",
            "depth": "1"
        },
        {
            "id": "10",
            "name": "河南",
            "parentid": "0",
            "parentname": "",
            "areacode": "",
            "zipcode": "",
            "depth": "1"
        },
        {
            "id": "11",
            "name": "黑龙江",
            "parentid": "0",
            "parentname": "",
            "areacode": "",
            "zipcode": "",
            "depth": "1"
        },
        {
            "id": "12",
            "name": "湖北",
            "parentid": "0",
            "parentname": "",
            "areacode": "",
            "zipcode": "",
            "depth": "1"
        },
        {
            "id": "13",
            "name": "湖南",
            "parentid": "0",
            "parentname": "",
            "areacode": "",
            "zipcode": "",
            "depth": "1"
        },
        {
            "id": "14",
            "name": "吉林",
            "parentid": "0",
            "parentname": "",
            "areacode": "",
            "zipcode": "",
            "depth": "1"
        },
        {
            "id": "15",
            "name": "江苏",
            "parentid": "0",
            "parentname": "",
            "areacode": "",
            "zipcode": "",
            "depth": "1"
        },
        {
            "id": "16",
            "name": "江西",
            "parentid": "0",
            "parentname": "",
            "areacode": "",
            "zipcode": "",
            "depth": "1"
        },
        {
            "id": "17",
            "name": "辽宁",
            "parentid": "0",
            "parentname": "",
            "areacode": "",
            "zipcode": "",
            "depth": "1"
        },
        {
            "id": "18",
            "name": "内蒙古",
            "parentid": "0",
            "parentname": "",
            "areacode": "",
            "zipcode": "",
            "depth": "1"
        },
        {
            "id": "19",
            "name": "宁夏",
            "parentid": "0",
            "parentname": "",
            "areacode": "",
            "zipcode": "",
            "depth": "1"
        },
        {
            "id": "20",
            "name": "青海",
            "parentid": "0",
            "parentname": "",
            "areacode": "",
            "zipcode": "",
            "depth": "1"
        },
        {
            "id": "21",
            "name": "山东",
            "parentid": "0",
            "parentname": "",
            "areacode": "",
            "zipcode": "",
            "depth": "1"
        },
        {
            "id": "22",
            "name": "山西",
            "parentid": "0",
            "parentname": "",
            "areacode": "",
            "zipcode": "",
            "depth": "1"
        },
        {
            "id": "23",
            "name": "陕西",
            "parentid": "0",
            "parentname": "",
            "areacode": "",
            "zipcode": "",
            "depth": "1"
        },
        {
            "id": "24",
            "name": "上海",
            "parentid": "0",
            "parentname": "",
            "areacode": "021",
            "zipcode": "200000",
            "depth": "1"
        },
        {
            "id": "25",
            "name": "四川",
            "parentid": "0",
            "parentname": "",
            "areacode": "",
            "zipcode": "",
            "depth": "1"
        },
        {
            "id": "26",
            "name": "天津",
            "parentid": "0",
            "parentname": "",
            "areacode": "022",
            "zipcode": "300000",
            "depth": "1"
        },
        {
            "id": "27",
            "name": "西藏",
            "parentid": "0",
            "parentname": "",
            "areacode": "",
            "zipcode": "",
            "depth": "1"
        },
        {
            "id": "28",
            "name": "新疆",
            "parentid": "0",
            "parentname": "",
            "areacode": "",
            "zipcode": "",
            "depth": "1"
        },
        {
            "id": "29",
            "name": "云南",
            "parentid": "0",
            "parentname": "",
            "areacode": "",
            "zipcode": "",
            "depth": "1"
        },
        {
            "id": "30",
            "name": "浙江",
            "parentid": "0",
            "parentname": "",
            "areacode": "",
            "zipcode": "",
            "depth": "1"
        },
        {
            "id": "31",
            "name": "重庆",
            "parentid": "0",
            "parentname": "",
            "areacode": "023",
            "zipcode": "404100",
            "depth": "1"
        },
        {
            "id": "32",
            "name": "香港",
            "parentid": "0",
            "parentname": "",
            "areacode": "00852",
            "zipcode": "999077",
            "depth": "1"
        },
        {
            "id": "33",
            "name": "澳门",
            "parentid": "0",
            "parentname": "",
            "areacode": "00853",
            "zipcode": "999078",
            "depth": "1"
        },
        {
            "id": "34",
            "name": "台湾",
            "parentid": "0",
            "parentname": "",
            "areacode": "00886",
            "zipcode": "",
            "depth": "1"
        }
    ]
}
                    

API错误码:

代号说明
201 上级ID错误
203 没有信息

系统错误码:

代号说明
101 APPKEY为空或不存在
102 APPKEY已过期
103 APPKEY无请求此数据权限
104 请求超过次数限制
105 IP被禁止
106 IP请求超过限制
107 接口维护中
108 接口已停用

活动推荐ACTIVITY 更多

  • orc活动

其它推荐RECOMMENDED DATA 更多