Calculate driving distance and travel time between thousands of addresses—without pre-geocoding or complex orchestration.
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"
{
"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 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:

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.
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"
{
"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
}]
}Every Distance API endpoint supports powerful filtering, sorting, and limiting options.
Only want results within a 30-minute drive? A five kilometer radius? No problem.
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
Geocodio's Distance API was built for distance analytics and large-scale distance calculations. When evaluating distance APIs, consider the following:
Many distance APIs prohibit you from permanently storing results.
Geocodio's permissive terms allow you to store and re-use the results, which can lead to significant savings and hassle reduction.
Some distance APIs require pre-geocoded coordinates.
Geocodio accepts raw addresses directly, eliminating an entire processing step.
Many distance APIs require complex orchestration to process large batches and limit matricies to 25x25 or less.
Geocodio's Distance Jobs endpoint handles up to 50,000 calculations (223x223) in a single request with automatic webhook notifications.
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 focuses on distance intelligence for analytics, compliance, and planning, with typical driving times and distances. For analytics, storing results is critical.
Distance API pricing varies significantly, with storage prohibitions adding further costs.
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.
Geocodio is planning to launch a spreadsheet upload version soon and is actively looking for beta testers.
Join the BetaLog 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.)
Submit addresses or coordinates directly—no pre-geocoding required. Geocodio handles address standardization and geocoding automatically.
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.
2,500 free credits every day. No credit card required.