Loading
https://api.apifreaks.com/v1.0/geo/cities
$ pip install requests
Click Test it to start the request and see the response here!
| Field | Type | Requirement | Description |
|---|---|---|---|
| cities | Array | Mandatory | An array of city objects for the specified country, optionally filtered by admin unit. |
| cities[].name | String | Mandatory | The name of the city (e.g., "Karachi", "Mirpur"). |
| cities[].latitude | Number | Mandatory | The geographic latitude of the city in decimal degrees. |
| cities[].longitude | Number | Mandatory | The geographic longitude of the city in decimal degrees. |
| cities[].iso_alpha_2 | String | Mandatory | The ISO 3166-1 alpha-2 country code the city belongs to (e.g., "PK"). |
| cities[].admin_unit | Object | Mandatory | An object describing the administrative unit the city belongs to. |
| cities[].admin_unit.name | String | Mandatory | The full name of the administrative unit (e.g., "Azad Kashmir"). |
| cities[].admin_unit.admin_code | String | Mandatory | The short code of the administrative unit (e.g., "JK"). |
| cities[].admin_unit.admin_level | String | Mandatory | The administrative level type of the unit (e.g., "province", "administered area"). |