Table of Contents

Distance

Distance RadiusDistance MatrixDistance Calculation ModesDistance Overview

Distance Matrix

Distance Matrix with Geocodio's Distance API

Geocodio's Distance API supports distance matrix calculations for both driving and straightline distance. A distance matrix calculates the distance between every combination of origins and destinations in a single request.

How it works

If you have 3 origins and 10 destinations, Geocodio will return a distance matrix with 30 results (3 × 10), i.e., the distance from each origin to each destination.

This is useful for:

  • Determining which warehouse should ship to each customer
  • Assigning service technicians to job sites
  • Balancing sales territories by travel time
  • Site selection analysis

TIP: If you had to describe your project and you start with the phrase "I need to find the closest...", you're probably looking for distance matrix calculations.

Endpoints

Geocodio has two endpoints for matrix calculations:

Distance Matrix (synchronous)

  • Up to 10,000 calculations per request
  • Returns results immediately
  • Best for batch processing that needs quick turnaround

Distance Jobs (asynchronous)

  • Up to 50,000 calculations per job
  • Processes in the background
  • Notifies you via webhook when complete
  • Best for large-scale calculations

Example

To find which of 5 warehouses is closest to each of 100 customers:

  • Origins: 5 warehouse addresses or coordinates
  • Mode: Driving distance
  • Destinations: 100 customer addresses or coordinates
  • Total calculations: 500 (5 × 100)

The API will return the driving distance and driving time from each warehouse to each customer.

See the Distance Matrix API documentation for request/response formats and code examples.

Copyright © 2014-2026 Dotsquare LLC, Norfolk, Virginia. All rights reserved.