首頁 生活常用 全國省市縣行政區劃分
全國省市縣行政區劃分

全國省市縣行政區劃分

  • 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 區域等級(深度) 冗余字段,用來查找

請求代碼:

查看代碼
<?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 更多

2021的欢乐真人麻将 山西快乐十分开奖结果查询彩票控 福建快三推荐一二同号 lmg视讯平台大全 快中彩玩法 江苏快三开奖结果360 pt电子试玩网站|Welcome 三分赛车有规律吗 极速快乐十分分析软件 mg游戏注册送38现金 上海时时彩开奖号 竞彩篮球大小分图 bodog百家乐 最近双色球ac值走势图 香港特码公司 og视讯平台下载 国家高频彩害死人