Get a list of all Cities By Country
GET
http://api.countrystatecity.org/v1/countries/{cisoORid}/cities
#
AuthenticationThis free api uses API Key to authenticate. API Key needs to be passed in headers.
- Header Name : X-API-KEY
#
Request ParametersName | Location | Description | Required | Type |
---|---|---|---|---|
{cisoORid} | URL | ISO2 Code OR ID | YES | string |
#
ResponseCode | Description |
---|---|
200 | Returns a list of cities |
401 | Unauthorized |
404 | Not Found |
#
Example Usagescript.js
#
Example Success ResponseSuccess Response
#
Example Error ResponseError Response
#
Example NotFound ResponseError Response