Time Filter [Fast]

A very fast version of Time Filter. However, the request parameters are much more limited. Currently only supports United Kingdom.

Request Body Json Attributes

  • locations
    array[object]
    Define your locations to use later in arrival_searches
    • id
      string
      You will have to reference this id in your searches. It will also be used in the response body. MUST be unique among all locations.
    • coords
      object
      • lat
        float
        Latitude
      • lng
        float
        Longitude
  • arrival_searches
    object
    Searches based on arrival time. Arrive at a destination or multiple destinations at no later than given time.
    • many_to_one
      array[object]
      This allows you to specify a single arrival location and multiple departure locations. You can define a maximum of 10 searches
      • id
        string
        Used to identify this specific search in the results array. MUST be unique among all searches.
      • arrival_location_id
        string
        The id of the location we should arrive to. MUST reference an id from locations array
      • departure_location_ids
        array[string]
        The ids of locations we should start the search from. MUST reference ids from locations array. You can define a maximum of 100000 location ids
      • transportation
        object
        • type
          string
          Possible values: public_transport, driving, driving+public_transport
      • travel_time
        integer
        Travel time in seconds
      • arrival_time_period
        string
        Possible values: weekday_morning
      • properties
        array[string]
        Properties to be returned about the points. Possible values: travel_time, fares
    • one_to_many
      array[object]
      This allows you to specify a single departure location and multiple arrival locations. You can define a maximum of 10 searches
      • id
        string
        Used to identify this specific search in the results array. MUST be unique among all searches.
      • departure_location_id
        string
        The id of location we should start the search from. MUST reference an id from locations array
      • arrival_location_ids
        array[string]
        The ids of the locations we should arrive to. MUST reference ids from locations array. You can define a maximum of 100000 location ids
      • transportation
        object
        • type
          string
          Possible values: public_transport, driving, driving+public_transport
      • travel_time
        integer
        Travel time in seconds
      • arrival_time_period
        string
        Possible values: weekday_morning
      • properties
        array[string]
        Properties to be returned about the points. Possible values: travel_time, fares

Response Body Json Attributes

  • results
    array[object]
    The results array which is sorted lexicographically by the id attribute
    • search_id
      string
    • locations
      array[object]
      • id
        string
      • properties
        array[object]
        This is a single-element array. Only the properties included in the request are returned here.
    • unreachable
      array[string]
      Ids of locations that cannot be reached within the specified travel_time

Example Request

POST /v4/time-filter/fast HTTP/1.1
Host: api.traveltimeapp.com
Content-Type: application/json
X-Application-Id: ...
X-Api-Key: ...

{
  "locations": [
    {
      "id": "London center",
      "coords": {
        "lat": 51.508930,
        "lng": -0.131387
      }
    },
    {
      "id": "Hyde Park",
      "coords": {
        "lat": 51.508824,
        "lng": -0.167093
      }
    },
    {
      "id": "ZSL London Zoo",
      "coords": {
        "lat": 51.536067,
        "lng": -0.153596
      }
    }
  ],
  "arrival_searches": {
    "many_to_one": [
      {
        "id": "arrive-at many-to-one search example",
        "departure_location_ids": [
          "Hyde Park",
          "ZSL London Zoo"
        ],
        "arrival_location_id": "London center",
        "transportation": {
          "type": "public_transport"
        },
        "arrival_time_period": "weekday_morning",
        "travel_time": 1900,
        "properties": [
          "travel_time",
          "fares"
        ]
      }
    ],
    "one_to_many": [
      {
        "id": "arrive-at one-to-many search example",
        "arrival_location_ids": [
          "Hyde Park",
          "ZSL London Zoo"
        ],
        "departure_location_id": "London center",
        "transportation": {
          "type": "public_transport"
        },
        "arrival_time_period": "weekday_morning",
        "travel_time": 1900,
        "properties": [
          "travel_time",
          "fares"
        ]
      }
    ]
  }
}

Response Body

{
  "results": [
    {
      "search_id": "arrive-at many-to-one search example",
      "locations": [
        {
          "id": "Hyde Park",
          "properties": {
            "travel_time": 1404,
            "fares": {
              "tickets_total": [
                {
                  "type": "month",
                  "price": 80.7,
                  "currency": "GBP"
                },
                {
                  "type": "year",
                  "price": 840,
                  "currency": "GBP"
                }
              ]
            }
          }
        }
      ],
      "unreachable": [
        "ZSL London Zoo"
      ]
    },
    {
      "search_id": "arrive-at one-to-many search example",
      "locations": [
        {
          "id": "Hyde Park",
          "properties": {
            "travel_time": 1529,
            "fares": {
              "tickets_total": [
                {
                  "type": "month",
                  "price": 80.7,
                  "currency": "GBP"
                },
                {
                  "type": "year",
                  "price": 840,
                  "currency": "GBP"
                }
              ]
            }
          }
        }
      ],
      "unreachable": [
        "ZSL London Zoo"
      ]
    }
  ]
}