Home Reference Source

Themeparks-API

API to fetch ride pois, queue times and operating hours.

Unit Test Documentation Build Node.js CI

node-current npm version

Snyk Vulnerabilities for GitHub Repo

API documentation
NPM Package

About

This is a module which fetches queue times and operating hours, and returns it as JSON to the user.

Table of Contents

About
Table of Contents
Install
ENV
Usage
-Running the script
-Example output
Changelog
Parks available
Features of supported parks
Result objects
-Ride waittimes
-Schedules
Park object values
Tasks

Install

yarn add @alexvv13/tpapi

ENV

In the directory where you're using tpapi, create an .env file and fill in the fields, an example can be found in the Github Repo, or in the ${path}/node_modules/@alexvv13/tpapi/.env.example, or copy below's example and fill in the fields yourself

#Language
LANGUAGES= 'en'

#Efteling
EFTELING_API_KEY=
EFTELING_SEARCH_URL= 
EFTELING_WAITTIMES_URL= 
EFTELING_HIST_URL= 

#Europa-Park
EUROPAPARK_APIBASE=
EUROPAPARK_LOGIN=
EUROPAPARK_FBAPPID=
EUROPAPARK_FBAPIKEY=
EUROPAPARK_FBPROJECTID=
EUROPAPARK_ENCKEY=
EUROPAPARK_ENCIV=

#Phantasialand
PHANTASIALAND_API_KEY=
PHANTASIALAND_POI_URL=
PHANTASIALAND_WAITTIMES_URL=
PHANTASIALAND_HOURS_URL=

#Toverland
TOVERLAND_APIBASE= 
TOVERLAND_TOKEN= 
TOVERLAND_HOURS=

#Compagnie des Alpes
WALIBIHOLLAND_APIBASE= 
WALIBIHOLLAND_APIURL= 
WALIBIBELGIUM_APIBASE=
WALIBIRA_APIBASE=
BELLEWAERDE_APIBASE=

#Plopsa
PLOPSALAND_APIBASE=
PLOPSALAND_APIID=
HOLIDAY_APIBASE=
HOLIDAY_APIID=

#Settings
CACHE_DURATION_POIS= '12'

Usage

Running the script

Run index.js for all parks
NOTE: If you use commonjs, it's REQUIRED to use the .mjs extension INSTEAD of .js!
Or create an .js file for yourself and do the following:

// Import all parks here
import tpapi from '@alexvv13/tpapi';

const park = new tpapi.parks.Efteling();

// Fetch POIS Example usage of Efteling
park.getWaitTime().then((poiData) => {
  console.log(poiData);
});

// You can also call getCalendar() or getData()

Example output

(Shortened to keep it readable)

[
  {
    "name": "Stoomcarrousel",
    "id": "Efteling_stoomcarrousel",
    "type": "Attraction",
    "location": {
       "area": "Marerijk",
       "latitude": 51.651211,
       "longitude": 5.048955
    },
    "queues": {
       "fastPass": {
          "fastPass": false
       },
       "singlerider": {
          "singleRider": false
       },
       "standBy": {
          "waitTime": 0,
          "status": "Closed",
          "active": false
       }
    },
    "meta": {
       "descriptions": {
        "description":"<p>Would you like a horse, a carriage, a pig or another vehicle? Take your seat in the ‘Stoomcarrousel’ steam carousell, which is more than 100 years old, and lit it spin you around! Duration: varies.   Wheelchair access: via the exit from this attraction.</p>",
        "short_description":"The old-fashioned fairground feeling"
       },
       "restrictions": {
          "minHeightAccompanied": "100 cm"
       },
       "tags": [
          "tranferNecessary",
          "IndoorRide"
       ]
    }
  },
  {
    "name": "Vogel Rok",
    "id": "Efteling_vogelrok",
    "type": "Attraction",
    "location": {
       "area": "Reizenrijk",
       "latitude": 51.652187,
       "longitude": 5.052811
    },
    "queues": {
       "fastPass": {
          "fastPass": false
       },
       "singlerider": {
          "singleRider": false
       },
       "standBy": {
          "waitTime": 0,
          "status": "Closed",
          "active": false
       }
    },
    "meta": {
       "descriptions": {
          "description": "<p>The Vogel Rok is an exiting indoor rollercoaster in the dark. The rollercoaster does not completely turn over, but does zoom through the dark at 40 mph. You must be at least 1.20 meter tall for this attraction. Duration: almost 2 minutes.   Wheelchair access: via the usual entrance to this attraction until the bottom of the stairs. Call here. An employee will then come to meet you.</p>",
          "short_description": "Lightning in the dark"
       },
       "restrictions": {
          "minHeight": "120 cm"
       },
       "tags": [
          "mayGetDizzy",
          "unsuitableForPregnantWomen",
          "tranferNecessary",
          "unsuitableWithInjuries",
          "IndoorRide"
       ]
    }
  }
]

Changelog

View tp-api Changelog

Parks available

12 Parks Supported

Features of the parks

Park Name Live Queues Park Hours Ride Schedules Languages
Efteling :heavy_check_mark: :heavy_check_mark: :heavy_multiplication_x: en, nl, de, fr
Europa-Park :heavy_check_mark: :heavy_multiplication_x: :heavy_multiplication_x: en, de, fr
Rulantica :heavy_check_mark: :heavy_multiplication_x: :heavy_multiplication_x: en, de, fr
YULLBE :heavy_check_mark: :heavy_multiplication_x: :heavy_multiplication_x: en, de, fr
Phantasialand :heavy_check_mark: :heavy_check_mark: :heavy_check_mark: en, nl, de, fr
Toverland :heavy_check_mark: :heavy_check_mark: :heavy_check_mark: en, nl, de
Walibi Holland :heavy_check_mark: :heavy_check_mark: :heavy_multiplication_x: en
Walibi Belgium :heavy_check_mark: :heavy_check_mark: :heavy_multiplication_x: en, nl, fr
Walibi Rhône-Alpes :heavy_check_mark: :heavy_check_mark: :heavy_multiplication_x: en, fr
Bellewaerde :heavy_check_mark: :heavy_check_mark: :heavy_multiplication_x: en, nl, fr
Plopsaland De Panne :heavy_check_mark: :heavy_check_mark: :heavy_multiplication_x: en
Holiday Park :heavy_check_mark: :heavy_check_mark: :heavy_multiplication_x: en

Result Objects

Ride WaitTimes

[
    {
        id: (string or number: uniquely identifying a ride),
        name: (string: ride name),
        waitTime: (number: current wait time in minutes),
        active: (bool: is the ride currently active?),
        state: (string: will either be "Operating", "Closed", "Refurbishment", or "Down"),
        location: (object: contains location data such as latlon
             latitude: (number: ride's latitude),
             longitude: (number: ride's longitude),
             area: (string: what area is this ride in?)
        meta: { (object: can contain various park-specific information about this ride - field may be null)
            // examples of potential meta fields
            description: { (object: can contain ride descriptions)
            },
            single_rider: (boolean: does this ride have a single rider line?),
            type: (string: what is this poi?),
            fastPass: (boolean: does this ride have a fastPass line?),
            isVirtQueue: (boolean: is this entity a Virtual Queue?),
            tags: { (object: can contain various ride-specific tags, can be null and fields differ per park)
            },
            restrictions: { (object: can contain various ride-specific restrictions(minHeight etc), can be null and fields differ per park)
            },
        },
    },
    ...
]

Schedules

[
    {
        date: (dateFormat timestamp: day this schedule applies),
        name: (string: Operating type name (ie 'Open', 'Closed', 'Event'),
        openingTime: (timeFormat timestamp: opening time for requested park - can be null if park is closed),
        closingTime: (timeFormat timestamp: closing time for requested park - can be null if park is closed),
        type: (string: "Operating" or "Closed"),
        special: [ (array of "special" times for this day, usually exclusive hours - field may be null)
          openingTime: (timeFormat timestamp: opening time for requested park),
          closingTime: (timeFormat timestamp: closing time for requested park),
          type: (string: type of schedule eg. "Passholder Event", but can be "Event" or "Special Ticketed Event" or other)
        ],
    },
    ...
]

Park Object values

There are some values available on each park object that may be useful.

Variable Description
Name Name of the park
Timezone The park's local timezone
LocationString This park's location as a [latitude, longitude] string
SupportsWaitTimes Does this park's API support ride wait times?
SupportsOpeningTimes Does this park's API support opening hours?
SupportsRideSchedules Does this park return schedules for rides?
FastPass Does this park have FastPass (or a FastPass-style service)?
FastPassReturnTimes Does this park tell you the FastPass return times?
Now Current date/time at this park (returned as a Moment object)
LangOptions What languages does this park support?
import tpapi from '@alexvv13/tpapi';

// construct our park objects and keep them in memory for fast access later
const Parks = {};
for (const park in tpapi.parks) {
  Parks[park] = new tpapi.parks[park]();
}

// print each park's name, current location, and timezone
for (const park in Parks) {
  console.log(`* ${Parks[park].Name} [${Parks[park].LocationString}]: (${Parks[park].Timezone})`);
}

Prints:

Tasks