/countries/{id}/cities
Get all the cities from particular country, including their names and slugs.
Use a slug or alpha-2 code for a {id}
path parameter.
The Basetrip currently supports 655 cities across all countries with various coverage.
Name | Type | Required | Description | |
---|---|---|---|---|
{id} | path parameter | String | required | country's slug |
curl --request GET \
--url 'https://api.thebasetrip.com/v2/countries/france/cities' \
--header 'Accept: application/json' \
--header 'x-api-key: YOUR_API_KEY'
Name | Type | Description |
---|---|---|
name | String | City name |
slug | String | Sanitized city name used as a path parameter |
[
{
"name": "Bordeaux",
"slug": "bordeaux"
},
{
"name": "Grenoble",
"slug": "grenoble"
},
{
"name": "Lille",
"slug": "lille"
},
{
"name": "Lyon",
"slug": "lyon"
},
{
"name": "Marseille",
"slug": "marseille"
},
{
"name": "Montpellier",
"slug": "montpellier"
},
{
"name": "Nantes",
"slug": "nantes"
},
{
"name": "Nice",
"slug": "nice"
},
{
"name": "Paris",
"slug": "paris"
},
{
"name": "Rennes",
"slug": "rennes"
},
{
"name": "Strasbourg",
"slug": "strasbourg"
},
{
"name": "Toulouse",
"slug": "toulouse"
}
]