OpenRouteService Optimization API

Solve vehicle routing problems using the VROOM engine

GitHub OpenAPI

Operations 1

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

POST /optimization Optimize delivery routes for a fleet · Vehicle Route Optimization #
Ask an LLM
“How do I plan the best routes for my delivery vehicles?”
“Can I set time windows and capacity limits on deliveries?”
Tell an agent
Optimize routes for vehicles {vehicles} delivering jobs {jobs}.
Route {vehicles} to serve {jobs} with time windows and capacity.

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/openrouteservice:openrouteservice-optimization-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

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. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

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

OpenAPI Specification

openrouteservice-optimization-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: OpenRouteService Optimization API
  description: OpenRouteService is a free, open-source geospatial API platform built on OpenStreetMap data. It provides routing directions for multiple transport modes, isochrones for reachability analysis, time-distance matrices, geocoding, elevation data, points of interest, and vehicle route optimization for logistics and humanitarian use cases.
  version: v2
  contact:
    name: OpenRouteService Support
    url: https://ask.openrouteservice.org
    email: support@smartmobility.heigit.org
  license:
    name: GNU General Public License v3.0
    url: https://github.com/GIScience/openrouteservice/blob/main/LICENSE
  x-ors-docs: https://giscience.github.io/openrouteservice/
servers:
- url: https://api.openrouteservice.org
  description: OpenRouteService Public API
security:
- ApiKeyAuth: []
tags:
- name: Optimization
  description: Solve vehicle routing problems using the VROOM engine
paths:
  /optimization:
    post:
      tags:
      - Optimization
      summary: Vehicle Route Optimization
      description: Solves vehicle routing problems using the VROOM optimization engine. Supports time windows, capacity constraints, multi-depot scenarios, and mixed fleet routing for logistics planning with up to 3 vehicles and 50 jobs in the standard plan.
      operationId: getOptimization
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OptimizationRequest'
      responses:
        '200':
          description: Optimized route solution
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OptimizationResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/InternalServerError'
components:
  schemas:
    OptimizationVehicle:
      type: object
      required:
      - id
      - profile
      - start
      properties:
        id:
          type: integer
          description: Unique vehicle identifier
        profile:
          type: string
          description: Routing profile for this vehicle
          enum:
          - driving-car
          - driving-hgv
          - cycling-regular
          - cycling-road
          - foot-walking
        start:
          type: array
          description: Start location [longitude, latitude]
          items:
            type: number
          minItems: 2
          maxItems: 2
        end:
          type: array
          description: End location [longitude, latitude] (optional)
          items:
            type: number
          minItems: 2
          maxItems: 2
        capacity:
          type: array
          description: Vehicle capacity for multiple resource types
          items:
            type: integer
        skills:
          type: array
          description: Skills this vehicle has (must match job skill requirements)
          items:
            type: integer
        time_window:
          type: array
          description: Operational time window [start_time, end_time] in seconds from epoch
          items:
            type: integer
          minItems: 2
          maxItems: 2
        breaks:
          type: array
          description: Scheduled breaks for this vehicle
          items:
            type: object
    OptimizationRequest:
      type: object
      required:
      - vehicles
      - jobs
      properties:
        vehicles:
          type: array
          description: Fleet of vehicles to optimize routes for (max 3 in standard plan)
          items:
            $ref: '#/components/schemas/OptimizationVehicle'
        jobs:
          type: array
          description: List of jobs/deliveries to be performed (max 50 in standard plan)
          items:
            $ref: '#/components/schemas/OptimizationJob'
        shipments:
          type: array
          description: Shipments requiring pickup and delivery pairs
          items:
            $ref: '#/components/schemas/OptimizationShipment'
        matrices:
          type: object
          description: Pre-computed duration/distance matrices
        options:
          type: object
          description: Additional optimization options
          properties:
            g:
              type: boolean
              description: Return geometry for routes
    OptimizationJob:
      type: object
      required:
      - id
      - location
      properties:
        id:
          type: integer
          description: Unique job identifier
        description:
          type: string
        location:
          type: array
          description: Job location [longitude, latitude]
          items:
            type: number
          minItems: 2
          maxItems: 2
        service:
          type: integer
          description: Service time at this location in seconds
          default: 0
        amount:
          type: array
          description: Resource amounts required for multiple capacity types
          items:
            type: integer
        skills:
          type: array
          description: Required vehicle skills for this job
          items:
            type: integer
        time_windows:
          type: array
          description: Allowed time windows for the job
          items:
            type: array
            items:
              type: integer
            minItems: 2
            maxItems: 2
        priority:
          type: integer
          description: Job priority (higher values = higher priority)
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: integer
              description: Error code
            message:
              type: string
              description: Human-readable error message
        info:
          type: object
          properties:
            engine:
              $ref: '#/components/schemas/EngineInfo'
            attribution:
              type: string
            timestamp:
              type: integer
              format: int64
    OptimizationResponse:
      type: object
      properties:
        code:
          type: integer
        summary:
          type: object
          properties:
            cost:
              type: integer
            routes:
              type: integer
            unassigned:
              type: integer
            delivery:
              type: array
              items:
                type: integer
            pickup:
              type: array
              items:
                type: integer
            duration:
              type: number
            distance:
              type: integer
            computing_times:
              type: object
        routes:
          type: array
          items:
            type: object
            properties:
              vehicle:
                type: integer
              cost:
                type: integer
              steps:
                type: array
                items:
                  type: object
              duration:
                type: number
              distance:
                type: integer
              geometry:
                type: string
        unassigned:
          type: array
          items:
            type: object
    OptimizationShipment:
      type: object
      properties:
        pickup:
          $ref: '#/components/schemas/OptimizationJob'
        delivery:
          $ref: '#/components/schemas/OptimizationJob'
    EngineInfo:
      type: object
      properties:
        version:
          type: string
          description: ORS engine version
        build_date:
          type: string
          format: date-time
          description: Build date of the ORS engine
  responses:
    BadRequest:
      description: Bad request - invalid parameters or request body
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Unauthorized:
      description: Unauthorized - missing or invalid API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Forbidden:
      description: Forbidden - API key does not have permission for this operation
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    InternalServerError:
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: API key obtained from https://openrouteservice.org