Matrix API

Distance & Time Calculations at Scale

Calculate travel times and distances between multiple locations efficiently. Essential for logistics optimization, service area analysis, and location-based decision making.

One-to-Many

Delivery Hub to Customers

Calculate distances and travel times from a single warehouse to multiple delivery locations. Perfect for optimizing last-mile delivery routes and estimating delivery time windows for customers.

  • 1 warehouse → 5 customer locations
  • Real-time distance and duration calculation
  • Multiple travel modes supported
Many-to-One

Field Agents to Office

Determine travel distances and times from multiple field locations to a central office. Ideal for calculating commute times, optimizing service territories, or scheduling on-site visits.

  • 5 field agents → 1 central office
  • Millisecond response for complex calculations
  • Optimize territory assignments
Many-to-Many

Full Route Optimization Matrix

Generate a complete distance matrix between all locations for advanced route optimization. Essential for solving vehicle routing problems, TSP challenges, and multi-stop delivery planning.

  • Process up to 100×100 location matrices
  • Efficient computation for large datasets
  • Powers advanced optimization algorithms
Matrix API Request
JSON
POST /matrix/?token=YOUR_TOKEN
{  "sources": [
    { "lat": 40.744014, "lon": -73.990508 }
  ],
  "targets": [
    { "lat": 40.739735, "lon": -73.979713 },
    { "lat": 40.752522, "lon": -73.985015 },
    { "lat": 40.750117, "lon": -73.983704 }
  ],
    "costing": "auto", "verbose": true
}
Response:
{  "sources_to_targets": [
    {
      "from_index": 0,
      "to_index": 0,
      "distance": 1.23,
      "time": 156
      },...]}

Get Started with Matrix API

Efficiently check the reachability of coordinates from each other, filter points by travel time, or run your own algorithms for solving optimization problems. Our Matrix API returns comprehensive distance and time data in an easy-to-use format.

  • Simple RESTful API with JSON responses
  • Support for asymmetric matrices
  • Real-time and historical traffic data

Key Features

Powerful matrix calculations

Distance Matrix

Calculate distances between multiple origins and destinations in a single request

Time Matrix

Get accurate travel time estimates for all origin-destination pairs

Parallel Computations

Process hundreds of location pairs simultaneously with optimized algorithms

Fast Computation

Millisecond response times even for large matrices with many locations

Multiple Modes

Calculate matrices for driving, walking, cycling, and transit modes

Cost Analysis

Include distance and time data for transportation cost calculations

Technical Specifications

Core Capabilities

Matrix Types
Distance & Time
Response Time
Millisecond responses

Scale & Performance

Max Locations
100x100 matrix
Parallel Processing
Optimized algorithms

Travel Modes

Supported Modes
Drive, Walk, Cycle, Transit
Mode Flexibility
Per-request configuration

Pricing

Free Tier
100,000 calculations/month
Rate Limits
Unlimited

Ready to get started?

Join thousands of developers using MapAtlas APIs to power their location-based applications.

Matrix API - Distance & Time Calculations | MapAtlas