Calculate Driving Distance and Time at Scale

Calculate driving distance and travel time between thousands of addresses—without pre-geocoding or complex orchestration.

Get StartedRead Docs
# Request
curl "https://api.geocod.io/v1.9/distance\
  ?api_key=YOUR_API_KEY\
  &origin=1600+Pennsylvania+Ave,+Washington+DC\
  &destinations[]=350+5th+Ave,+New+York+NY\
  &mode=driving"
# Response
{
  "mode": "driving",
  "origin": {
    "query": "1600 Pennsylvania Ave, Washington DC",
    "location": [38.8977, -77.0365]
  },
  "destinations": [{
    "query": "350 5th Ave, New York, NY",
    "location": [40.7484, -73.9857],
    "distance_miles": 226.4,
    "distance_km": 364.4,
    "duration_seconds": 14520
  }]
}

Geocodio's Distance APIs

Geocodio's suite of Distance APIs let you calculate straight line (Haversine) and driving distance between addresses or coordinates, whether you need instant results or tens of thousands of calculations processed in the background.

Unlike most distance APIs, you can:

Permanently store the results
Build historical datasets and reuse calculations without repeated API calls or attribution requirements.
Submit raw addresses directly
No pre-geocoding required! Pass in street addresses and we'll geocode them automatically.
Illustration showing the difference between straight-line (Haversine) distance and driving distance on a map

Driving Distance and Time Calculations Built for Real-World Scale

From one lookup to 50,000 calculations—without orchestration. Geocodio offers three purpose-built endpoints, so you always use the right tool for the job.

Distance
Calculate distance and driving time between one origin and one or many destinations in real-time.
Distance Matrix
Process up to 10,000 distance calculations in a single synchronous request. Get immediate results for moderate-volume distance analysis without managing async workflows.
Distance Jobs
Geocodio handles the complexity: submit up to 50,000 calculations in a single request and receive complete results via webhook when processing finishes. No request splitting or result stitching required.

Try the API

# Request
curl "https://api.geocod.io/v1.9/distance\
  ?api_key=YOUR_API_KEY\
  &origin=1600+Pennsylvania+Ave,+Washington+DC\
  &destinations[]=350+5th+Ave,+New+York+NY\
  &mode=driving"
# Response
{
  "mode": "driving",
  "origin": {
    "query": "1600 Pennsylvania Ave, Washington DC",
    "location": [38.8977, -77.0365]
  },
  "destinations": [{
    "query": "350 5th Ave, New York, NY",
    "location": [40.7484, -73.9857],
    "distance_miles": 226.4,
    "distance_km": 364.4,
    "duration_seconds": 14520
  }]
}

Distance Radius Made Easy

Every Distance API endpoint supports powerful filtering, sorting, and limiting options.

Filter by maximum or minimum distance
Filter by maximum or minimum drive time
Sort by distance or duration
Limit results to the closest locations

Only want results within a 30-minute drive? A five kilometer radius? No problem.

API Requests with CSV Files

Geocodio is your solution for high-volume distance calculations.

Submit addresses or coordinates directly via API

Process CSVs of origins and destinations via API

Run large async Distance Jobs using CSVs

Download complete results when processing finishes

Considerations When Choosing a Distance API

Geocodio's Distance API was built for distance analytics and large-scale distance calculations. When evaluating distance APIs, consider the following:

Can you store the results?

Many distance APIs prohibit you from permanently storing results.

Geocodio

Geocodio's permissive terms allow you to store and re-use the results, which can lead to significant savings and hassle reduction.

Do you have to pre-geocode the addresses?

Some distance APIs require pre-geocoded coordinates.

Geocodio

Geocodio accepts raw addresses directly, eliminating an entire processing step.

How large of a matrix can you run?

Many distance APIs require complex orchestration to process large batches and limit matricies to 25x25 or less.

Geocodio

Geocodio's Distance Jobs endpoint handles up to 50,000 calculations (223x223) in a single request with automatic webhook notifications.

Is it optimized for analytics or real-time navigation?

Navigation-focused APIs are optimized for real-time traffic and turn-by-turn directions, but prohibit storage of results. This adds cost and complexity for analytics.

Geocodio

Geocodio focuses on distance intelligence for analytics, compliance, and planning, with typical driving times and distances. For analytics, storing results is critical.

How complicated is their pricing?

Distance API pricing varies significantly, with storage prohibitions adding further costs.

Geocodio

Geocodio uses simple credit-based pricing with volume discounts—see the pricing calculator to get estimates based on your usage. And being able to store the results means only having to pay for the data once.

Not a Developer?

Geocodio is planning to launch a spreadsheet upload version soon and is actively looking for beta testers.

Join the Beta

Get Started in Minutes

1

Enable Distance APIs

Log into your Geocodio dashboard and enable Distance and Distance Jobs for your API key. (They use the same API key as Geocodio's other services.)

2

Choose your endpoint

  • Distance → single or few calculations
  • Distance Matrix → up to 10,000 calculations
  • Distance Jobs → up to 50,000 calculations
3

Make Your First Request

Submit addresses or coordinates directly—no pre-geocoding required. Geocodio handles address standardization and geocoding automatically.

4

Configure Filtering and Sorting

Use built-in parameters to filter by distance/time, sort results, and limit to closest locations.

Pay only for what you calculate with simple, transparent credits.

View Distance API documentationRead more about pricingEnable Distance APIs in your dashboard

See It In Action

Frequently Asked Questions

Try Geocodio's Distance API

2,500 free credits every day. No credit card required.

Get Started with Distance API

Calculate Distance API Costs

Understand how to estimate costs for your distance calculation volume.
Check Costs

Data Enrichment

Enrich location data with census data, legislative districts, time zones, and more—in the same API call.

Try Batch Geocoding

Process thousands or millions of addresses via spreadsheet upload or API.
Copyright © 2014-2026 Dotsquare LLC, Norfolk, Virginia. All rights reserved.