| 参数名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
| name | string | 否 | 国家名称 |
| continent | string | 否 | 所属州 |
| language | string | 否 | 官方语言 |
| iscountry | int | 否 | 是否是国家 |
| 参数名称 | 类型 | 说明 |
|---|---|---|
| countryid | string | 国家ID |
| name | string | 国家名称 |
| cname | string | 中文名称 |
| ename | string | 英文名称 |
| capital | string | 首都 |
| nationalanthem | string | 国歌 |
| currency | string | 货币 |
| code | string | 国家代码 |
| area | string | 国土面积 |
| timezone | string | 时区 |
| gdp | string | GDP总计 |
| avggdp | string | 人均GDP |
| areacode | string | 国际电话区号 |
| domain | string | 国际域名缩写 |
| continent | string | 所在洲 |
| waterrate | string | 水域率 |
| mainreligion | string | 主要宗教 |
| maincity | string | 主要城市 |
| nationalday | string | 国庆日 |
| political | string | 政治体制 |
| leader | string | 国家领袖 |
| population | string | 人口数量 |
| populationdensity | string | 人口密度 |
| mainethnic | string | 主要名族 |
| roadaccess | string | 道路通行 |
| mainuniversity | string | 主要学府 |
| nationalflag | string | 国旗 |
| humanindex | string | 人类发展指数 |
| largestcity | string | 最大城市 |
| nationalflower | string | 国花 |
| geoposition | string | 地理位置 |
| foreignname | string | 外文名称 |
| nationalmotto | string | 国家格言 |
| govresidence | string | 政府驻地 |
| climate | string | 气候条件 |
| iscountry | string | 是否国家 |
| zimu | string | 首字母 |
<?php
//获取国家地区信息
require_once 'curl.func.php';
$appkey = 'your_appkey_here';//你的appkey
$name= '中国';
$continent='亚洲';
$language='汉语';
$iscountry='0';
$url = "https://api.jisuapi.com/country/query?appkey=$appkey&name=$name&continent=$continent&language=$language&iscountry=$iscountry";
$result = curlOpen($url, ['ssl'=>true]);
$jsonarr = json_decode($result, true);
if($jsonarr['status'] != 0)
{
echo $jsonarr['msg'];
exit();
}
$country = $jsonarr['result'];
echo $country['countryid'].' '.$country['name'].' '.$country['cname'].' '.$country['ename'].' '.$country['capital'].' '.$country['nationalanthem'].' '.$country['currency'].' '.$country['code'].' '.$country['language'].' '.$country['area'].' '.$country['timezone'].' '.$country['gdp'].' '.$country['avggdp'].' '.$country['areacode'].' '.$country['domain'].' '.$country['continent'].' '.$country['waterrate'].' '.$country['mainreligion'].' '.$country['maincity'].' '.$country['nationalday'].' '.$country['political'].' '.$country['leader'].' '.$country['population'].' '.$country['populationdensity'].' '.$country['mainethnic'].' '.$country['roadaccess'].' '.$country['mainuniversity'].' '.$country['nationalflag'].' '.$country['humanindex'].' '.$country['largestcity'].' '.$country['nationalflower'].' '.$country['geoposition'].' '.$country['foreignname'].' '.$country['nationalmotto'].' '.$country['govresidence'].' '.$country['climate'].' '.$country['iscountry"'].' '.$country['zimu'].'
';
{
"status": 0,
"msg": "ok",
"result": {
"id": 218,
"name": "中国",
"cname": "中华人民共和国",
"ename": "China",
"capital": "北京",
"nationalanthem": "义勇军进行曲",
"currency": "人民币",
"code": null,
"language": "汉语",
"area": "陆地面积960万平方公里,领海约470万平方公里",
"timezone": "东八区",
"gdp": null,
"avggdp": null,
"areacode": "+86",
"domain": "CN",
"continent": "亚洲",
"waterrate": null,
"mainreligion": "佛教、道教、伊斯兰教",
"maincity": null,
"nationalday": null,
"political": "人民代表大会制度",
"leader": null,
"population": null,
"populationdensity": null,
"mainethnic": "汉族",
"roadaccess": "靠右行驶",
"mainuniversity": null,
"nationalflag": "/upload/nationalflag/218.jpg",
"humanindex": null,
"largestcity": null,
"nationalflower": null,
"geoposition": null,
"foreignname": null,
"nationalmotto": null,
"govresidence": null,
"climate": null,
"iscountry": 0,
"zimu": "C"
}
}
| 代号 | 说明 |
|---|---|
| 201 | 国家ID为空 |
| 代号 | 说明 |
|---|---|
| 101 | APPKEY为空或不存在 |
| 102 | APPKEY已过期 |
| 103 | APPKEY无请求此数据权限 |
| 104 | 请求超过次数限制 |
| 105 | IP被禁止 |
| 106 | IP请求超过限制 |
| 107 | 接口维护中 |
| 108 | 接口已停用 |


© 2015-2025 杭州极速互联科技有限公司 版权所有 浙ICP备17047587号-4 浙公网安备33010502005096 增值电信业务经营许可证:浙B2-20190875