首页 生活常用 全国省市县行政区划数据接口
全国省市县行政区划

全国省市县行政区划

5.00/10000次
申请就送10000次
最新全国省、市、县行政区划信息,包含区号、邮编等信息,同时包含国外的国家和地区。
※本接口非盈利,建议使用“获取全部区域”接口,一次获取全部信息。
  • 收藏数:1562
  • 使用数:3325
http://api.jisuapi.com/area/province
JSON,JSONP
GET
http://api.jisuapi.com/area/province?appkey=yourappkey

请求参数:

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

返回参数:

参数名称类型说明
id int ID
name string 名称
parentid int 上级ID
parentname string 上级名称
areacode string 区号
zipcode string 邮编
depth string 区域等级(深度) 冗余字段,用来查找

请求代码:

查看代码
<?php

require_once 'curl.func.php';

$appkey = 'your_appkey_here';//你的appkey
$url = "http://api.jisuapi.com/area/province?appkey=$appkey";
$result = curlOpen($url);
$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 接口已停用
名称权限价格
免费套餐 10000次 免费
Level1 10000次 5.00元
Level2 20000次 9.00元
Level3 50000次 21.00元
Level4 100000次 40.00元

活动推荐ACTIVITY 更多

  • 短信

其它推荐RECOMMENDED DATA 更多