Documents
Parameter Cities by Country Guide
Latest Update Time: 2026-07-02 00:00:00
Use this API to retrieve all cities for a specific country.
See the Parameter Introduction for base URL, authentication, and required headers.
Endpoint
GET https://ppapi.qima.com/parameter/v2/country/{countryId}/cities
Prerequisites
- A
countryIdobtained from Get All Countries or Search Countries
Path Parameters
| Parameter | Required | Description |
|---|---|---|
countryId | Yes | Country ID, from Get All Countries or Search Countries. |
Query Parameters
| Parameter | Required | Description |
|---|---|---|
refresh | No | Send false (default) to use the server cache, or true to force a fresh lookup. |
Request Example
curl --location --request GET 'https://ppapi.qima.com/parameter/v2/country/23424781/cities' \
--header 'Ai-Api-Access-Token: {your api access token}' \
--header 'Ai-User-Id: {your user ID}' \
--header 'Authorization: Bearer {your token}' \
--header 'Referer: https://preprodmy.qima.com/'
Successful Response
The example below requested countryId=23424781 (China) — this list can be very large (thousands of cities), trimmed to 2 here.
{
"message": null,
"content": [
{ "label": "Aba", "value": "12687254" },
{ "label": "Abagqi", "value": "12686809" }
]
}
Response Field Notes
| Field | Notes |
|---|---|
content[].label | City display name. |
content[].value | The city ID. Use this as supplierCityID/factoryCityID. |
Common Errors
See common authentication errors for 401 and 403 responses.
Next Steps
- For a large country, prefer Search Cities in a Country by Name for an autocomplete-style lookup instead of fetching the full list.
