城市查询

请求地址

https://api.es.xiaojukeji.com/river/City/get

返回数据格式

JSON

请求方式

GET

请求参数

参数名称 数据类型 必选 说明
client_id string yes 申请应用时分配的AppKey
access_token string yes 授权后的access token
timestamp bigint yes 当前时间戳
sign string yes 签名

请求示例

curl -X GET -H "Content-Type: application/x-www-form-urlencoded" https://api.es.xiaojukeji.com/river/City/get?client_id=client_id_test&access_token=access_token_test&timestamp=1566764837&sign=091cf244ad5ab16935cfe44fc698bc58

返回参数说明

参数名称 数据类型 说明
city_id string 地级市ID(如:深圳ID为2)
city_name string 地级市名称
county_list array 区县列表

county_list:

参数名称 数据类型 说明
county_id string 区县ID
county_name string 区县名称

返回示例:

{
    "errno":0,
    "errmsg":"SUCCESS",
    "data":[
        {
            "city_id":274,
            "city_name":"澄迈县",
            "county_list":[
                {
                    "county_id":469023,
                    "county_name":"澄迈县"
                }
            ]
        },
        {
            "city_id":149,
            "city_name":"安庆市",
            "county_list":[
                {
                    "county_id":340802,
                    "county_name":"迎江区"
                },
                {
                    "county_id":340803,
                    "county_name":"大观区"
                },
                {
                    "county_id":340811,
                    "county_name":"宜秀区"
                },
                {
                    "county_id":340822,
                    "county_name":"怀宁县"
                },
                {
                    "county_id":340824,
                    "county_name":"潜山县"
                },
                {
                    "county_id":340825,
                    "county_name":"太湖县"
                },
                {
                    "county_id":340826,
                    "county_name":"宿松县"
                },
                {
                    "county_id":340827,
                    "county_name":"望江县"
                },
                {
                    "county_id":340828,
                    "county_name":"岳西县"
                },
                {
                    "county_id":340881,
                    "county_name":"桐城市"
                }
            ]
        }
    ]
}

参数说明:

城市库中的数据是全球的,可以通过ID进行过滤,海外的都是大于1000;

results matching ""

    No results matching ""