Rail-Station Autocomplete

get

Rail-Station Autocomplete

Given the start of any word in a rail station's official name, as a term, this API provides the full name and rail station ID of a rail station for use in searches. The response provides an array of up to 20 possible matches, sorted by passenger traffic, in a JQuery Autocomplete compatible format.

The value returned is the UIC station code. The label returned is always in UTF-8 format, with the station's official name (which is often in the native language). Agglomeration station codes may also be returned.

Note that only French and Italian rail stations are supported by the Rail Station Autocomplete API

Resource URL

https://api.sandbox.amadeus.com/v1.2 /rail-stations/autocomplete

Query Parameters


Name Values Description
apikey
(required)

API Key provided for your account, to identify you for API access. Make sure to keep this API key secret.

term
(required)

Search term that should represent some part of a station name. Not case sensitive, may be blank.


Request Body

Make a request and see the response.

Make a request and see the response.

Make a request and see the response.

Working...

 

Response format - Rail Station Autocomplete

The response is returned in JSON with the following elements:

Element Meaning
value The unique identifier of the station. You can use this as an input parameter for a rail search.
label The full name of the station, in UTF-8 format.

 

 

Example - Rail Stations Autocomplete

Here's a simple search example. Just copy the following URLs in your browser. Don't forget to use your own API key.

In this simple example we will search for stations that names contains the string "VENT":

http://api.sandbox.amadeus.com/v1.2/rail-stations/autocomplete?term=VENT&apikey= YOUR KEY HERE

You will receive a response like this

[
    {
        "value": "8304501", 
        "label": "VENTIMIGLIA"
    }, 
    {
        "value": "8308005", 
        "label": "QUATTRO VENTI"
    }, 
    {
        "value": "8305123", 
        "label": "PONTE DELLA VENTURIN"
    }
]

Errors

In case there is not station for the given term parameter:

http://api.sandbox.amadeus.com/v1.2/rail-stations/autocomplete?term=BLAH&apikey= YOUR API KEY

The result will be a simple empty JSON response:

[]