osrmroute-com Truck Routing API

The Truck Routing API API from osrmroute-com — 1 operation(s) for truck routing api.

Operations 1

POST /api/v1/truck/route Truck route with per-request dimensions and weight #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/osrmroute-com:osrmroute-com-truck-routing-api-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

osrmroute-com-truck-routing-api-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: OSRMRoute Truck Routing API
  version: 1.1.0
  description: 'OSRMRoute — Maps, Routing, Truck Routing, Search, Road Data, Studio and integration APIs. Use `Authorization: Bearer ` unless an operation documents another flow. Legacy APIs also accept the key query parameter; New geospatial APIs, MCP and private map delivery require Bearer authentication. Mobile challenge/token endpoints use device attestation instead. Coordinates and units are documented per operation: GeoJSON uses longitude,latitude; some legacy and background-job inputs use latitude,longitude. Examples are illustrative, not guaranteed current results. Guides · Mobile Access · MCP · Postman collection.'
  contact:
    name: OSRMRoute Support
    url: https://osrmroute.com/contact
    email: support@osrmroute.com
  termsOfService: https://osrmroute.com/terms
servers:
- url: https://osrmroute.com
security:
- bearerAuth: []
- apiKeyQuery: []
tags:
- name: Truck Routing API
paths:
  /api/v1/truck/route:
    post:
      tags:
      - Truck Routing API
      operationId: truckRoute
      summary: Truck route with per-request dimensions and weight
      description: 'Route scope; one credit per successful route. Requires all vehicle fields, including loaded weight and maximum loaded axle weight in metric tonnes. 2–20 longitude/latitude points, also subject to plan limits; at most 1,000 km and 250 m snapping. 10 requests/minute/key; 16 KiB body. Supported countries (ISO 3166-1 alpha-2): AZ, AM, GE, KZ, KG, TJ, TM, UZ, MN, TR, IR, IQ, SY, JO, LB, IL, PS, YE, SA, AE, QA, KW, BH, OM, AF, PK. Uses static OSM truck access and dimension restrictions. Conditional restrictions, hazardous goods and live traffic are outside this release. Follow posted road signs and local rules. Failed requests are refunded.'
      security:
      - bearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            example:
              points:
              - - 49.8671
                - 40.4093
              - - 49.849
                - 40.378
              vehicle:
                height_m: 4
                width_m: 2.55
                length_m: 16.5
                weight_t: 30
                axle_load_t: 10
                axle_count: 5
            schema:
              type: object
              additionalProperties: false
              required:
              - points
              - vehicle
              properties:
                points:
                  type: array
                  minItems: 2
                  maxItems: 20
                  items:
                    type: array
                    minItems: 2
                    maxItems: 2
                    items:
                      type: number
                  description: '[longitude, latitude]; longitude ±180, latitude ±85.'
                vehicle:
                  type: object
                  additionalProperties: false
                  required:
                  - height_m
                  - width_m
                  - length_m
                  - weight_t
                  - axle_load_t
                  - axle_count
                  properties:
                    height_m:
                      type: number
                      minimum: 0.5
                      maximum: 10
                      description: Loaded external dimension in metres.
                    width_m:
                      type: number
                      minimum: 0.5
                      maximum: 5
                      description: Loaded external dimension in metres.
                    length_m:
                      type: number
                      minimum: 1
                      maximum: 35
                      description: Loaded external dimension in metres.
                    weight_t:
                      type: number
                      minimum: 0.1
                      maximum: 100
                      description: Loaded metric tonnes; axle_load_t is the heaviest axle.
                    axle_load_t:
                      type: number
                      minimum: 0.1
                      maximum: 40
                      description: Loaded metric tonnes; axle_load_t is the heaviest axle.
                    axle_count:
                      type: integer
                      minimum: 2
                      maximum: 20
                      description: Axles including trailers.
      responses:
        '200':
          description: One GeoJSON route. Distances in metres, duration in estimated seconds. Example geometry is abbreviated.
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    enum:
                    - Ok
                  profile:
                    type: string
                    enum:
                    - truck
                  vehicle:
                    type: object
                    additionalProperties: false
                    required:
                    - height_m
                    - width_m
                    - length_m
                    - weight_t
                    - axle_load_t
                    - axle_count
                    properties:
                      height_m:
                        type: number
                        minimum: 0.5
                        maximum: 10
                        description: Loaded external dimension in metres.
                      width_m:
                        type: number
                        minimum: 0.5
                        maximum: 5
                        description: Loaded external dimension in metres.
                      length_m:
                        type: number
                        minimum: 1
                        maximum: 35
                        description: Loaded external dimension in metres.
                      weight_t:
                        type: number
                        minimum: 0.1
                        maximum: 100
                        description: Loaded metric tonnes; axle_load_t is the heaviest axle.
                      axle_load_t:
                        type: number
                        minimum: 0.1
                        maximum: 40
                        description: Loaded metric tonnes; axle_load_t is the heaviest axle.
                      axle_count:
                        type: integer
                        minimum: 2
                        maximum: 20
                        description: Axles including trailers.
                  routes:
                    type: array
                    items:
                      type: object
                      properties:
                        distance:
                          type: number
                        duration:
                          type: number
                        geometry:
                          type: object
                          properties:
                            type:
                              type: string
                              enum:
                              - LineString
                            coordinates:
                              type: array
                              items:
                                type: array
                                minItems: 2
                                maxItems: 2
                                items:
                                  type: number
                                description: '[longitude, latitude] in decimal degrees. Request bounds: longitude ±180, latitude ±85.'
                              minItems: 2
                          required:
                          - type
                          - coordinates
                      required:
                      - distance
                      - duration
                      - geometry
                  waypoints:
                    type: array
                    items:
                      type: object
                      properties:
                        location:
                          type: array
                          minItems: 2
                          maxItems: 2
                          items:
                            type: number
                          description: '[longitude, latitude] in decimal degrees. Request bounds: longitude ±180, latitude ±85.'
                        distance:
                          type: number
                          description: Distance from requested point to snapped road, in metres (maximum 250).
                      required:
                      - location
                      - distance
                  attribution:
                    type: string
                required:
                - code
                - profile
                - vehicle
                - routes
                - waypoints
                - attribution
              example:
                code: Ok
                profile: truck
                vehicle:
                  height_m: 4
                  width_m: 2.55
                  length_m: 16.5
                  weight_t: 30
                  axle_load_t: 10
                  axle_count: 5
                routes:
                - distance: 5322.609
                  duration: 600
                  geometry:
                    type: LineString
                    coordinates:
                    - - 49.8671
                      - 40.4093
                    - - 49.849
                      - 40.378
                waypoints:
                - location:
                  - 49.8671
                  - 40.4093
                  distance: 0
                - location:
                  - 49.849
                  - 40.378
                  distance: 0
                attribution: © OpenStreetMap contributors (ODbL)
        '400':
          description: Invalid input. `truck_invalid_points`, `truck_invalid_vehicle`, `truck_unknown_option`, `truck_inconsistent_axle_load`, `truck_invalid_height_m`, `truck_invalid_width_m`, `truck_invalid_length_m`, `truck_invalid_weight_t`, `truck_invalid_axle_load_t`, `truck_invalid_axle_count` Failed operations are not charged.
          content:
            application/problem+json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  code:
                    type: string
                  problem_code:
                    type: string
                  type:
                    type: string
                    format: uri
                  title:
                    type: string
                  status:
                    type: integer
                    minimum: 0
                  detail:
                    type: string
                  instance:
                    type: string
                  request_id:
                    type: string
                    format: uuid
                  retryable:
                    type: boolean
                required:
                - error
                - code
                - problem_code
                - type
                - title
                - status
                - detail
                - instance
                - request_id
                - retryable
              example:
                error: truck_invalid_points
                code: truck_invalid_points
                problem_code: truck_invalid_points
                type: https://osrmroute.com/docs/platform#truck_invalid_points
                title: Request failed
                status: 400
                detail: truck_invalid_points
                instance: urn:uuid:00000000-0000-4000-8000-000000000001
                request_id: 00000000-0000-4000-8000-000000000001
                retryable: false
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                - error
        '401':
          description: Missing or invalid authentication. See the returned error code. Failed operations are not charged.
          content:
            application/problem+json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  code:
                    type: string
                  problem_code:
                    type: string
                  type:
                    type: string
                    format: uri
                  title:
                    type: string
                  status:
                    type: integer
                    minimum: 0
                  detail:
                    type: string
                  instance:
                    type: string
                  request_id:
                    type: string
                    format: uuid
                  retryable:
                    type: boolean
                required:
                - error
                - code
                - problem_code
                - type
                - title
                - status
                - detail
                - instance
                - request_id
                - retryable
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                - error
        '402':
          description: Insufficient credits. See the returned error code. Failed operations are not charged.
          content:
            application/problem+json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  code:
                    type: string
                  problem_code:
                    type: string
                  type:
                    type: string
                    format: uri
                  title:
                    type: string
                  status:
                    type: integer
                    minimum: 0
                  detail:
                    type: string
                  instance:
                    type: string
                  request_id:
                    type: string
                    format: uuid
                  retryable:
                    type: boolean
                required:
                - error
                - code
                - problem_code
                - type
                - title
                - status
                - detail
                - instance
                - request_id
                - retryable
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                - error
        '403':
          description: Scope, account or plan restriction. See the returned error code. Failed operations are not charged.
          content:
            application/problem+json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  code:
                    type: string
                  problem_code:
                    type: string
                  type:
                    type: string
                    format: uri
                  title:
                    type: string
                  status:
                    type: integer
                    minimum: 0
                  detail:
                    type: string
                  instance:
                    type: string
                  request_id:
                    type: string
                    format: uuid
                  retryable:
                    type: boolean
                required:
                - error
                - code
                - problem_code
                - type
                - title
                - status
                - detail
                - instance
                - request_id
                - retryable
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                - error
        '413':
          description: Payload too large. See the returned error code. Failed operations are not charged.
          content:
            application/problem+json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  code:
                    type: string
                  problem_code:
                    type: string
                  type:
                    type: string
                    format: uri
                  title:
                    type: string
                  status:
                    type: integer
                    minimum: 0
                  detail:
                    type: string
                  instance:
                    type: string
                  request_id:
                    type: string
                    format: uuid
                  retryable:
                    type: boolean
                required:
                - error
                - code
                - problem_code
                - type
                - title
                - status
                - detail
                - instance
                - request_id
                - retryable
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                - error
        '422':
          description: Request cannot be fulfilled. `truck_no_route`, `truck_no_nearby_road`, `truck_outside_coverage`, `truck_route_too_long` Failed operations are not charged.
          content:
            application/problem+json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  code:
                    type: string
                  problem_code:
                    type: string
                  type:
                    type: string
                    format: uri
                  title:
                    type: string
                  status:
                    type: integer
                    minimum: 0
                  detail:
                    type: string
                  instance:
                    type: string
                  request_id:
                    type: string
                    format: uuid
                  retryable:
                    type: boolean
                required:
                - error
                - code
                - problem_code
                - type
                - title
                - status
                - detail
                - instance
                - request_id
                - retryable
              example:
                error: truck_no_route
                code: truck_no_route
                problem_code: truck_no_route
                type: https://osrmroute.com/docs/platform#truck_no_route
                title: Request failed
                status: 422
                detail: truck_no_route
                instance: urn:uuid:00000000-0000-4000-8000-000000000001
                request_id: 00000000-0000-4000-8000-000000000001
                retryable: false
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                - error
        '429':
          description: Rate, quota or concurrency limit. `rate_limited` Failed operations are not charged.
          content:
            application/problem+json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  code:
                    type: string
                  problem_code:
                    type: string
                  type:
                    type: string
                    format: uri
                  title:
                    type: string
                  status:
                    type: integer
                    minimum: 0
                  detail:
                    type: string
                  instance:
                    type: string
                  request_id:
                    type: string
                    format: uuid
                  retryable:
                    type: boolean
                required:
                - error
                - code
                - problem_code
                - type
                - title
                - status
                - detail
                - instance
                - request_id
                - retryable
              example:
                error: rate_limited
                code: rate_limited
                problem_code: rate_limited
                type: https://osrmroute.com/docs/platform#rate_limited
                title: Request failed
                status: 429
                detail: rate_limited
                instance: urn:uuid:00000000-0000-4000-8000-000000000001
                request_id: 00000000-0000-4000-8000-000000000001
                retryable: true
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                - error
        '502':
          description: Invalid or unavailable upstream. `truck_unavailable`, `truck_invalid_response` Failed operations are not charged.
          content:
            application/problem+json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  code:
                    type: string
                  problem_code:
                    type: string
                  type:
                    type: string
                    format: uri
                  title:
                    type: string
                  status:
                    type: integer
                    minimum: 0
                  detail:
                    type: string
                  instance:
                    type: string
                  request_id:
                    type: string
                    format: uuid
                  retryable:
                    type: boolean
                required:
                - error
                - code
                - problem_code
                - type
                - title
                - status
                - detail
                - instance
                - request_id
                - retryable
              example:
                error: truck_unavailable
                code: truck_unavailable
                problem_code: truck_unavailable
                type: https://osrmroute.com/docs/platform#truck_unavailable
                title: Service unavailable
                status: 502
                detail: truck_unavailable
                instance: urn:uuid:00000000-0000-4000-8000-000000000001
                request_id: 00000000-0000-4000-8000-000000000001
                retryable: true
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                - error
        '503':
          description: Service temporarily unavailable. `truck_not_configured`, `truck_dataset_expired`, `truck_busy` Failed operations are not charged.
          content:
            application/problem+json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  code:
                    type: string
                  problem_code:
                    type: string
                  type:
                    type: string
                    format: uri
                  title:
                    type: string
                  status:
                    type: integer
                    minimum: 0
                  detail:
                    type: string
                  instance:
                    type: string
                  request_id:
                    type: string
                    format: uuid
                  retryable:
                    type: boolean
                required:
                - error
                - code
                - problem_code
                - type
                - title
                - status
                - detail
                - instance
                - request_id
                - retryable
              example:
                error: truck_not_configured
                code: truck_not_configured
                problem_code: truck_not_configured
                type: https://osrmroute.com/docs/platform#truck_not_configured
                title: Service unavailable
                status: 503
                detail: truck_not_configured
                instance: urn:uuid:00000000-0000-4000-8000-000000000001
                request_id: 00000000-0000-4000-8000-000000000001
                retryable: true
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                - error
components:
  securitySchemes:
    apiKeyQuery:
      type: apiKey
      in: query
      name: key
    bearerAuth:
      type: http
      scheme: bearer