Skip to content
Lux Express ticket selling widget for your website (
Find file
New pull request
Latest commit 5f34b22 @priit priit Added trips info


Lux Express ticket search widget example

You will learn how to create a ticket widget in order to use it on your homepage.

You don't have to have written contract with Lux Express in order to add 
ticket widget to your homepage. However if you do, you can add your "agent id" (aka user id) for every 
request and your agency gets benefits according to your contract.

If your widget stops working correctly, please search for CHANGES file 
from this repo, we keep this example as up-to date as possible.

By the way, Lux Express has also complete ticket selling API, so you can integrate
ticket selling directly to your own selling system. However this is much bigger work
than this simple widget. Please ask your contact person about the full stack API documentation. 

Direct url

You can manually create and test search url in order to verify your
api understandings or use this link directly.

For example: from Tallinn Coach Station to Vilnius Coach Station
at 01-05-2016 you can use following URL:

JSON response, add .json at the end of url and replace use instead:

And more complex example with return date and promo code:

API description

Required values:
* from        - string or integer, short name of city or Lux Express own city id 
                (values from our live site or from example)
* to          - string or integer, short name of city or Lux Express own city id
                (values from our live site or from example)
* departue_at - date string, such as '01-09-2013' (day, month, year)

Optional values if you need extra tweaking:
* return_at       - date string, such as '01-09-2013' (day, month, year),
                    If return_at value is present we do have return ticket.
* ticket_quantity - integer, number of tickets, default 1.
* promo_code      - string, applies for particular ongoing promotions
* lang            - string, currently supported values: lv, pl, fi, lt, et, ru, en
                    default is en. Alternatively, just prefix path with lang as our examples.
* currency        - integer, Lux Express id for currency 
                    (values from our live site or from example),
                    default is EUR or picked by language, :et => EUR, :lv => LVL
* trips           - integer, number of trips. Number 1 means it's direct trip and
                    there are no connections. Number 2 means there is two trips and
                    one stop where client has to change bus.
* agent           - integer, Lux Express user id 
                    Please ask from your contact person
                    or log in to your Lux Express account and
                    you will see at user edit url, the last
                    number is your agent id.
                    Your agent id is: 83829

Form request

You can also create html form in order to increase usability. 

Please, take a look of our exaple or from our working live widget:


By the way, try to use GET instead POST, this helps us to use better caching stradegy.

Current list of bus stops

Static list of bus stops will be out of sync one day, we don't promise to keep widget's bus stop
list up to date. 

There are two ways to get current list:

* Dedicated Bus Stop API:
* From html source:

Twice a year should is resonable to sync bus stop list.


Feel free to fork the widget, your pull request contributions are welcome!

Something went wrong with that request. Please try again.