Tgvmax

Access tgvmax planner API

Overview

This node integrates with the TGVmax planner API to provide information about available free places (seats) on TGV trains and to search for stations. The primary use case is to check seat availability between two stations on a specific date, which can be useful for travel planning or booking automation. For example, a user can input an origin station, a destination station, and a departure date/time to retrieve proposals of free seats on that route.

Properties

Name Meaning
Operation Choose between "Search Freeplaces" (check seat availability) or "Search Station" (find stations by name).
Origin The code or identifier of the origin station for the journey (used in "Search Freeplaces").
Destination The code or identifier of the destination station for the journey (used in "Search Freeplaces").
Departure Date Time The date and time of departure for the journey (used in "Search Freeplaces").
Search Station The name of the station to search for (used in "Search Station").

Output

The output JSON structure depends on the operation:

  • Search Freeplaces: Returns an object containing:

    • freePlacesRatio: A numeric ratio indicating the proportion of free places.
    • proposals: An array of proposals detailing available free seats for the specified journey.
  • Search Station: Returns an array of stations matching the search label.

If the API returns a 404 error during "Search Freeplaces", the node outputs a default response with freePlacesRatio set to 0 and an empty proposals array.

No binary data output is produced by this node.

Dependencies

  • Requires access to the TGVmax public API at https://www.maxjeune-tgvinoui.sncf.
  • No explicit API key or authentication token is required as per the static analysis.
  • The node sets custom HTTP headers including a User-Agent and Accept-Language to mimic a browser request.

Troubleshooting

  • 404 Not Found Error: When searching for free places, a 404 response from the API results in an empty result set rather than an error. This usually means no free places are available or the route/date combination does not exist.
  • Network Issues: If the API endpoint is unreachable, the node will throw an error unless "Continue On Fail" is enabled.
  • Invalid Station Codes: Providing incorrect origin or destination codes may lead to no results or errors.
  • Date Format: Ensure the departure date/time is correctly formatted as ISO 8601 datetime string.

Links and References

Discussion