osrmroute-com Search Along Route API

The Search Along Route API API from osrmroute-com — 1 operation(s) for search along route api.

Operations 1

POST /api/v1/places/along-route Find stops with calculated road detours #

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-search-along-route-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-search-along-route-api-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: OSRMRoute Search Along Route 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: Search Along Route API
paths:
  /api/v1/places/along-route:
    post:
      tags:
      - Search Along Route API
      operationId: searchAlongRoute
      summary: Find stops with calculated road detours
      description: Requires both places and route scopes. 14 credits per successful compound query; 10 requests/minute/key, 2 KiB body. Driving only, baseline at most 200 km. Samples five positions, searches within 2 km, checks at most eight unique candidates. Sampled discovery is not exhaustive; duration excludes live traffic.
      security:
      - bearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              additionalProperties: false
              properties:
                start:
                  type: array
                  minItems: 2
                  maxItems: 2
                  items:
                    type: number
                  description: '[longitude, latitude] in decimal degrees. Request bounds: longitude ±180, latitude ±85.'
                end:
                  type: array
                  minItems: 2
                  maxItems: 2
                  items:
                    type: number
                  description: '[longitude, latitude] in decimal degrees. Request bounds: longitude ±180, latitude ±85.'
                category:
                  type: string
                  enum:
                  - fuel
                  - charging_station
                  - restaurant
                  - cafe
                  - parking
                  - pharmacy
                max_detour_seconds:
                  type: number
                  minimum: 0
                  maximum: 1800
                  default: 600
                limit:
                  type: integer
                  minimum: 1
                  maximum: 8
                  default: 5
              required:
              - start
              - end
              - category
            examples:
              request:
                value:
                  start:
                  - 49.8671
                  - 40.4093
                  end:
                  - 49.849
                  - 40.378
                  category: fuel
                  max_detour_seconds: 600
                  limit: 5
      responses:
        '200':
          description: Success. Examples are illustrative; results vary with input and source data.
          content:
            application/json:
              schema:
                type: object
                properties:
                  places:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        name:
                          type: string
                        point:
                          type: array
                          minItems: 2
                          maxItems: 2
                          items:
                            type: number
                          description: '[longitude, latitude] in decimal degrees. Request bounds: longitude ±180, latitude ±85.'
                        details:
                          type: object
                          properties:
                            phone:
                              type:
                              - string
                              - 'null'
                            website:
                              type:
                              - string
                              - 'null'
                              format: uri
                            opening_hours:
                              type:
                              - string
                              - 'null'
                            wheelchair:
                              type:
                              - string
                              - 'null'
                              enum:
                              - 'yes'
                              - 'no'
                              - limited
                              - designated
                              - null
                            source:
                              type: string
                              enum:
                              - openstreetmap
                            license:
                              type: string
                              enum:
                              - ODbL-1.0
                            observed_at:
                              type: string
                              format: date-time
                            source_updated_at:
                              type:
                              - string
                              - 'null'
                              format: date-time
                            open_now:
                              type:
                              - boolean
                              - 'null'
                              description: Always null; opening hours are not evaluated.
                          required:
                          - phone
                          - website
                          - opening_hours
                          - wheelchair
                          - source
                          - license
                          - observed_at
                          - source_updated_at
                          - open_now
                        added_seconds:
                          type: integer
                          minimum: 0
                        added_meters:
                          type: integer
                          minimum: 0
                      required:
                      - id
                      - name
                      - point
                      - added_seconds
                      - added_meters
                  baseline:
                    type: object
                    properties:
                      duration_seconds:
                        type: number
                      distance_meters:
                        type: number
                    required:
                    - duration_seconds
                    - distance_meters
                  discovery:
                    type: object
                    properties:
                      method:
                        type: string
                        enum:
                        - sampled_nearby
                      sample_count:
                        type: integer
                        minimum: 0
                      radius_meters:
                        type: integer
                        minimum: 0
                      candidates_found:
                        type: integer
                        minimum: 0
                      candidates_checked:
                        type: integer
                        minimum: 0
                      exhaustive:
                        type: boolean
                        enum:
                        - false
                    required:
                    - method
                    - sample_count
                    - radius_meters
                    - candidates_found
                    - candidates_checked
                    - exhaustive
                  duration_model:
                    type: string
                    enum:
                    - road_network_without_live_traffic
                required:
                - places
                - baseline
                - discovery
                - duration_model
              example:
                places: []
                baseline:
                  duration_seconds: 600
                  distance_meters: 5000
                discovery:
                  method: sampled_nearby
                  sample_count: 5
                  radius_meters: 2000
                  candidates_found: 0
                  candidates_checked: 0
                  exhaustive: false
                duration_model: road_network_without_live_traffic
        '400':
          description: Invalid input. `invalid_coordinate`, `invalid_category`, `invalid_detour`, `invalid_limit` 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: invalid_coordinate
                code: invalid_coordinate
                problem_code: invalid_coordinate
                type: https://osrmroute.com/docs/platform#invalid_coordinate
                title: Request failed
                status: 400
                detail: invalid_coordinate
                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
        '404':
          description: Resource not found. 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. `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: route_too_long
                code: route_too_long
                problem_code: route_too_long
                type: https://osrmroute.com/docs/platform#route_too_long
                title: Request failed
                status: 422
                detail: route_too_long
                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. 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
        '502':
          description: Invalid or unavailable upstream. `routing_unavailable`, `places_unavailable` 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: routing_unavailable
                code: routing_unavailable
                problem_code: routing_unavailable
                type: https://osrmroute.com/docs/platform#routing_unavailable
                title: Service unavailable
                status: 502
                detail: routing_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. 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
components:
  securitySchemes:
    apiKeyQuery:
      type: apiKey
      in: query
      name: key
    bearerAuth:
      type: http
      scheme: bearer