Top City
Endpoint#
GET /geo/v2/city/topParameters#
Query parameters
-
rangestringSet to search only within a certain country or region. The country and region name needs to use country code ISO 3166. If this parameter is not set, the search range will be all cities. Example:
range=cn -
numberintegerNumber of the results in response, from 1 to 20, 10 is the default.
-
langstringLanguage setting. See Language for behavior, configuration, and data availability
Request example#
curl -X GET --compressed \
-H 'Authorization: Bearer your_token' \
'https://your-api-host/geo/v2/city/top'
Replace your_token and your_api_host with your JWT Authentication and API Host
Response#
{
"code": "200",
"topCityList": [
{
"name": "Beijing",
"id": "101010100",
"lat": "39.90499",
"lon": "116.40529",
"adm2": "Beijing",
"adm1": "Beijing",
"country": "China",
"tz": "Asia/Shanghai",
"utcOffset": "+08:00",
"isDst": "0",
"type": "city",
"rank": "10",
"fxLink": "https://www.qweather.com/en/weather/beijing-101010100.html"
},
{
"name": "Yuhang",
"id": "101210106",
"lat": "30.27371",
"lon": "119.97874",
"adm2": "Hangzhou",
"adm1": "Zhejiang",
"country": "China",
"tz": "Asia/Shanghai",
"utcOffset": "+08:00",
"isDst": "0",
"type": "city",
"rank": "25",
"fxLink": "https://www.qweather.com/en/weather/yuhang-101210106.html"
},
{
"name": "Chaoyang",
"id": "101010300",
"lat": "39.92149",
"lon": "116.48641",
"adm2": "Beijing",
"adm1": "Beijing",
"country": "China",
"tz": "Asia/Shanghai",
"utcOffset": "+08:00",
"isDst": "0",
"type": "city",
"rank": "15",
"fxLink": "https://www.qweather.com/en/weather/chaoyang-101010300.html"
},
{
"name": "Shenzhen",
"id": "101280601",
"lat": "22.54700",
"lon": "114.08595",
"adm2": "Shenzhen",
"adm1": "Guangdong",
"country": "China",
"tz": "Asia/Shanghai",
"utcOffset": "+08:00",
"isDst": "0",
"type": "city",
"rank": "13",
"fxLink": "https://www.qweather.com/en/weather/shenzhen-101280601.html"
},
{
"name": "Haidian",
"id": "101010200",
"lat": "39.95607",
"lon": "116.31032",
"adm2": "Beijing",
"adm1": "Beijing",
"country": "China",
"tz": "Asia/Shanghai",
"utcOffset": "+08:00",
"isDst": "0",
"type": "city",
"rank": "15",
"fxLink": "https://www.qweather.com/en/weather/haidian-101010200.html"
},
{
"name": "Jiading",
"id": "101020500",
"lat": "31.38352",
"lon": "121.25034",
"adm2": "Shanghai",
"adm1": "Shanghai",
"country": "China",
"tz": "Asia/Shanghai",
"utcOffset": "+08:00",
"isDst": "0",
"type": "city",
"rank": "23",
"fxLink": "https://www.qweather.com/en/weather/jiading-101020500.html"
},
{
"name": "Jinshui",
"id": "101180112",
"lat": "34.77584",
"lon": "113.68604",
"adm2": "Zhengzhou",
"adm1": "Henan",
"country": "China",
"tz": "Asia/Shanghai",
"utcOffset": "+08:00",
"isDst": "0",
"type": "city",
"rank": "25",
"fxLink": "https://www.qweather.com/en/weather/jinshui-101180112.html"
},
{
"name": "Pudong",
"id": "101020600",
"lat": "31.24594",
"lon": "121.56770",
"adm2": "Shanghai",
"adm1": "Shanghai",
"country": "China",
"tz": "Asia/Shanghai",
"utcOffset": "+08:00",
"isDst": "0",
"type": "city",
"rank": "15",
"fxLink": "https://www.qweather.com/en/weather/pudong-101020600.html"
},
{
"name": "Shanghai",
"id": "101020100",
"lat": "31.23171",
"lon": "121.47264",
"adm2": "Shanghai",
"adm1": "Shanghai",
"country": "China",
"tz": "Asia/Shanghai",
"utcOffset": "+08:00",
"isDst": "0",
"type": "city",
"rank": "11",
"fxLink": "https://www.qweather.com/en/weather/shanghai-101020100.html"
},
{
"name": "Hangzhou",
"id": "101210101",
"lat": "30.24603",
"lon": "120.21079",
"adm2": "Hangzhou",
"adm1": "Zhejiang",
"country": "China",
"tz": "Asia/Shanghai",
"utcOffset": "+08:00",
"isDst": "0",
"type": "city",
"rank": "11",
"fxLink": "https://www.qweather.com/en/weather/hangzhou-101210101.html"
}
],
"refer": {
"sources": [
"https://developer.qweather.com/attribution.html"
],
"license": [
"QWeather Developers License"
]
}
}-
codestring
-
topCityListobjectTop city list
-
namestringLocation Name
-
idstringLocation ID
-
latstringLatitude
-
lonstringLongitude
-
adm2stringName of the superior administrative division of the location
-
adm1stringThe first-level administrative area of the location
-
countrystringCountry name
-
tzstringTimezone for this location
-
utcOffsetstringThe number of hours offset between local time and UTC time, refer to UTC Offset
-
isDststring
-
typestringLocation type
-
rankstring
-
fxLinkuriResponsive web page of this location, easy to embed in your website or APP
-
-
referobjectData sources and licensing information
-
sourcesarrayData source and other statements, may be null
-
licensearrayData license, may be null
-