> ## Documentation Index
> Fetch the complete documentation index at: https://docs.justrouting.tech/llms.txt
> Use this file to discover all available pages before exploring further.

# Compute durations/distances between all pairs of coordinates



## OpenAPI

````yaml /openapi/osrm.json get /table/v1/{profile}/{coordinates}
openapi: 3.1.0
info:
  title: JustRouting OSRM API
  version: v1
  description: >-
    OSRM-compatible routing services hosted by JustRouting: route, table, match,
    trip, and nearest. All requests require a Bearer API key. Coordinates use
    `lng,lat` order and must be within a single country (Southeast Asia).
  contact:
    email: hello@justrouting.tech
    name: JustRouting
    url: https://justrouting.tech
servers:
  - url: https://api.justrouting.tech
    description: Production
security:
  - bearerAuth: []
tags:
  - name: route
    description: Directions between coordinates
  - name: table
    description: N×N travel time/distance matrix
  - name: match
    description: Map matching for GPS traces
  - name: trip
    description: Traveling salesman optimization
  - name: nearest
    description: Snap a coordinate to the road network
paths:
  /table/v1/{profile}/{coordinates}:
    get:
      tags:
        - table
      summary: Compute durations/distances between all pairs of coordinates
      operationId: getTable
      parameters:
        - name: profile
          in: path
          required: true
          schema:
            type: string
            enum:
              - driving
              - motorcycle
        - name: coordinates
          in: path
          required: true
          schema:
            type: string
          description: Semicolon-separated `{lng},{lat}` pairs, all in the same country.
        - $ref: '#/components/parameters/Sources'
        - $ref: '#/components/parameters/Destinations'
        - name: annotations
          in: query
          schema:
            type: string
            enum:
              - duration
              - distance
              - duration,distance
            default: duration
          description: Which table(s) to return.
        - name: fallback_speed
          in: query
          schema:
            type: number
            exclusiveMinimum: 0
          description: >-
            For unreachable pairs, estimate duration from crow-fly distance at
            this speed (km/h equivalent meters per second ratio).
        - name: fallback_coordinate
          in: query
          schema:
            type: string
            enum:
              - input
              - snapped
            default: input
        - name: scale_factor
          in: query
          schema:
            type: number
            exclusiveMinimum: 0
          description: Scale all durations by this factor.
      responses:
        '200':
          description: Matrix computed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TableResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OsrmError'
        '401':
          description: Missing or invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthError'
        '429':
          description: Rate limited
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RateLimitError'
components:
  parameters:
    Sources:
      name: sources
      in: query
      schema:
        type: string
      description: Source indices `{i};{j};...` or `all` (default).
    Destinations:
      name: destinations
      in: query
      schema:
        type: string
      description: Destination indices `{i};{j};...` or `all` (default).
  schemas:
    TableResponse:
      type: object
      properties:
        code:
          type: string
          enum:
            - Ok
        durations:
          type: array
          description: >-
            Row-major matrix of durations in seconds; null entries mean
            unreachable.
          items:
            type: array
            items:
              type:
                - number
                - 'null'
        distances:
          type: array
          description: Row-major matrix of distances in meters.
          items:
            type: array
            items:
              type:
                - number
                - 'null'
        sources:
          type: array
          items:
            $ref: '#/components/schemas/Waypoint'
        destinations:
          type: array
          items:
            $ref: '#/components/schemas/Waypoint'
        fallback_speed_cells:
          type: array
          items:
            type: array
            items:
              type: integer
            minItems: 2
            maxItems: 2
    OsrmError:
      type: object
      properties:
        code:
          type: string
          enum:
            - InvalidUrl
            - InvalidService
            - InvalidVersion
            - InvalidOptions
            - InvalidQuery
            - InvalidValue
            - NoSegment
            - NoRoute
            - NoTable
            - NoMatch
            - NoTrips
            - TooBig
            - DisabledDataset
        message:
          type: string
    AuthError:
      type: object
      properties:
        code:
          type: string
          enum:
            - missing_auth
            - invalid_api_key
        message:
          type: string
    RateLimitError:
      type: object
      properties:
        code:
          type: string
          enum:
            - rate_limited
        message:
          type: string
    Waypoint:
      type: object
      properties:
        name:
          type: string
          description: Street name the coordinate snapped to.
        location:
          type: array
          items:
            type: number
          minItems: 2
          maxItems: 2
          description: Snapped position as `[lng, lat]`.
        distance:
          type: number
          description: Snapping offset in meters.
        hint:
          type: string
          description: Opaque segment identifier, reusable as the `hints` parameter.
        nodes:
          type: array
          items:
            type: integer
          description: OSM node ids of the segment.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: API key created in the JustRouting dashboard.

````