GeoDB City API - Find Cities For Your Criteria | Wirefree Thought

header photo

Getting The distance between two cities

1. First, find the two cities of interest.

2. Now get the distance in miles:

curl --get --include '{fromCityId}/distance?toCityId={toCityId}&distanceUnit=MI' \
    -H 'X-Mashape-Key: YOUR_API_KEY' \
    -H 'X-Mashape-Host:'


fromCityId The origin city
toCityId The city to find the distance to.



The distance will be returned in terms of the requested distanceUnit.