Top City

Get a list of popular cities around the world.

Endpoint#

GET /geo/v2/city/top

Parameters#

Query parameters

  • range Set 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
  • number Number of the results in response, from 1 to 20, 10 is the default.
  • lang Multi-language setting, please see Language to find out how our multi-language works and how to set up.

Request example#

curl -X GET --compressed \
-H 'Authorization: Bearer your_token' \
'https://your-api-host/geo/v2/city/top?range=cn&number=10&lang=en'

Replace your_token and your_api_host with your JWT Authentication and API Host

Try it

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"
    ]
  }
}
  • code string Status code
  • topCityList object Top city list
    • name string Location Name
    • id string Location ID
    • lat string Latitude
    • lon string Longitude
    • adm2 string Name of the superior administrative division of the location
    • adm1 string The first-level administrative area of ​​the location
    • country string Country name
    • tz string Timezone for this location
    • utcOffset string The number of hours offset between local time and UTC time, refer to UTC Offset
    • isDst string Is the location currently on daylight saving time. 1 for daylight saving time and 0 for not in daylight saving time
    • type string Location type
    • rank string Location rank
    • fxLink uri Responsive web page of this location, easy to embed in your website or APP
  • refer object Data sources and licensing information
    • sources array Data source and other statements, may be null
    • license array Data license, may be null