---
title: "Search possible journeys from A to B using train parts from the given timetables."
method: POST
path: "/search_journeys"
tags: ["search_journeys"]
---

# Search possible journeys from A to B using train parts from the given timetables.

`POST /search_journeys`

The trains are not simulated, meaning each stop needs to be dated in order
to be taken into account.
Until daily patterns are supported, timetables must be calendar anchored on 1970-01-01 UTC.

## Request body

- JourneySearchQuery
  - `destination` OperationalPointPartReference, required
    - `local_track_name` string, nullable
    - `operational_point` union, required
      - object
        - `operational_point` string, required — The object id of an operational point
        - `type` 'id', required
      - object
        - `country_code` string, required
        - `main_code` string, required — The operational point main code
        - `secondary_code` string, nullable — An optional secondary code to identify a more specific location
        - `type` 'domestic', required
      - object
        - `secondary_code` string, nullable — An optional secondary code to identify a more specific location
        - `type` 'uic', required
        - `uic` integer, required — The [UIC](https://en.wikipedia.org/wiki/List_of_UIC_country_codes) code of an operational point
  - `infra_id` integer, required
  - `origin` OperationalPointPartReference, required
    - `local_track_name` string, nullable
    - `operational_point` union, required
      - object
        - `operational_point` string, required — The object id of an operational point
        - `type` 'id', required
      - object
        - `country_code` string, required
        - `main_code` string, required — The operational point main code
        - `secondary_code` string, nullable — An optional secondary code to identify a more specific location
        - `type` 'domestic', required
      - object
        - `secondary_code` string, nullable — An optional secondary code to identify a more specific location
        - `type` 'uic', required
        - `uic` integer, required — The [UIC](https://en.wikipedia.org/wiki/List_of_UIC_country_codes) code of an operational point
  - `start_ms` integer, required — Amount of milliseconds from 1970-01-01 00:00:00 UTC to the center of the start window. The start window is defined as the time between `start_sec - start_tolerance` and `start_sec + start_tolerance`.
  - `start_tolerance` integer, required — Half the time of the start window in milliseconds. The start window is defined as the time between `start_sec - start_tolerance` and `start_sec + start_tolerance`.
  - `timetable_ids` integer[], required — Until daily patterns are supported, timetables must be calendar anchored on 1970-01-01 UTC.
  - `transfer_ms` integer, required — Constant time for a transfer/footpath in the same stop in milliseconds. The algorithm assumes that changing from one train to another in a stop always take this constant time.

## Response `200`

A list of journey proposals that match the input search query

- JourneyProposals
  - `journeys` array[], required — Each journey is a list of train schedule parts.
    - TrainSchedulePart[]
      - `from` TrainSchedulePartBound, required — A step of the train schedule's path, with its identity and schedule.
        - `op_id` string, required — Id of the operational point of the corresponding step in the train schedule's path.
        - `path_step_index` integer, required — Index of the path step in the train schedule's path
        - `time_ms` integer, required — Scheduled time of the step in milliseconds from 1970-01-01 00:00:00 UTC.
      - `to` TrainSchedulePartBound, required — A step of the train schedule's path, with its identity and schedule.
        - `op_id` string, required — Id of the operational point of the corresponding step in the train schedule's path.
        - `path_step_index` integer, required — Index of the path step in the train schedule's path
        - `time_ms` integer, required — Scheduled time of the step in milliseconds from 1970-01-01 00:00:00 UTC.
      - `train_schedule_id` integer, required

---

[API](https://skmtc.net/openrailassociation/apis/osrd-editoast.md) · [All operations](https://skmtc.net/openrailassociation/apis/osrd-editoast/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/openrailassociation/osrd-editoast/versions/1840dbbd64ac/schema)
