Distance Calculator API

GET

Calculate distance and location details between any two coordinates.

Distance Calculator computes the distance between two coordinate pairs in miles and kilometers. Supply two latitude and longitude points to receive distances and resolved city and state names for both locations.

Try it — live request, no key required

Request
GETapi.apiverve.com/v1/distancecalculator?lat1=36.7783&lon1=-119.4179&lat2=34.0522&lon2=-118.2437
Query parameters
Verification
Format

No key required to try it. Get a key to use it in your app.

Example
{
  "status": "ok",
  "error": null,
  "data": {
    "distanceMiles": 199.6804337234997,
    "distanceKm": 321.2535462758628,
    "location1": {
      "latitude": "36.728450",
      "longitude": "-119.53571",
      "city": "Sanger",
      "state": "California"
    },
    "location2": {
      "latitude": "34.044662",
      "longitude": "-118.24255",
      "city": "Los Angeles",
      "state": "California"
    },
    "bearing": 198,
    "direction": "South",
    "estimatedDriveTime": "5h 11m"
  }
}

About the Distance Calculator API

Distance Calculator works by calculating the distance between two locations based on their latitude and longitude coordinates. It uses advanced algorithms to calculate the distance accurately and returns the distance in miles and kilometers.

What people use it for

Delivery Radius Verification
Local couriers check mile distances between warehouse coordinates and customer dropoff points to confirm addresses fall within active delivery zones.
Road Trip Itinerary Planning
When travelers add stops to a route, travel apps calculate kilometer distances between waypoints to tally total travel distance.
Real Estate Search Filtering
Property portals measure distances from listed homes to city center coordinates so apartment hunters can filter rentals by commute proximity.
Fleet Dispatch Optimization
Dispatchers compute coordinate distances between open service tickets and available technicians to assign the nearest field worker to incoming jobs.

Ways to call it

One endpoint, many ways in — REST with JSON, XML, YAML and CSV, plus GraphQL and an MCP interface for AI agents.

JSON
Default REST response
XML
Markup format
YAML
Human-readable
CSV
Tabular export
Beta
GraphQL
Query language
New
MCP
For AI agents

Other ways to use Distance Calculator

Same data, same APIVerve account, same credit balance — one key works on all of them.

Questions.

Common questions about the Distance Calculator API.

Read the docs →
How far does the Starter plan go for coordinate calculations?
The Starter plan covers 100,000 calculations per month. Because each request uses 2 credits, high-volume lookups work out to about $0.30 per 1,000 calls or $0.0003 each. If you are just testing, the Free plan gives you 100 calculations every month.
Can I get compass bearing and driving time on the Free plan?
No, compass bearing, cardinal direction, and estimated driving time require a paid subscription. Any paid plan starting with Starter unlocks these premium metrics. The Free plan returns distances in both miles and kilometers alongside the resolved location details.
Does the API resolve coordinates to actual city names?
Yes, each response identifies the resolved origin and destination. It returns the corresponding city and state or region for both coordinate pairs alongside the calculated distance.
Are distances provided in both miles and kilometers?
Yes, every successful response returns the distance in both miles and kilometers. You do not need to supply an extra parameter or run unit conversions in your own code.
Can I display these distances in a commercial travel or delivery app?
Yes, commercial usage is supported on any paid plan. The Free plan is limited to personal and non-commercial development. You can display distance and drive metrics within your software, provided you do not resell the raw API data directly.

Ready to build with Distance Calculator? Start with 200 free credits — one key unlocks all 300+ APIs.

Explore the catalog

300+ APIs on the same key and the same response shape.

Browse all APIs