Tgvmax

Access tgvmax planner API

Overview

This node integrates with the Tgvmax planner API to provide two main functionalities: searching for available free places on train journeys and searching for stations by name. The "Search Station" operation allows users to find station information based on a partial or full station name query.

Common scenarios where this node is useful include:

  • Travel planning automation where users want to dynamically find station codes or details by entering station names.
  • Integrations that require validating or auto-completing station names before booking or querying train availability.
  • Building custom travel dashboards or chatbots that assist users in finding train stations quickly.

For example, a user can input "Paris Gare de Lyon" as the station name, and the node will return matching station data from the Tgvmax API.

Properties

Name Meaning
Search Station Name of the station to search for (e.g., "Paris Gare de Lyon")

Output

The output JSON contains an array of station data objects returned by the Tgvmax API endpoint /api/public/refdata/freeplaces-stations. Each object represents a station matching the search query. The exact structure depends on the API response but typically includes station identifiers, names, and possibly location metadata.

No binary data output is produced by this operation.

Dependencies

  • External API: The node requires access to the Tgvmax planner API hosted at https://www.maxjeune-tgvinoui.sncf.
  • HTTP requests are made with specific headers including a User-Agent and Accept-Language to mimic a browser request.
  • No explicit API key or authentication token is required according to the code, but network access to the API endpoint must be available.

Troubleshooting

  • 404 Not Found: If the API returns a 404 error, the node handles it gracefully by returning an empty result set (freePlacesRatio:0, proposals:[]). This usually means no stations matched the search term.
  • Network Issues: Failure to reach the API due to connectivity or DNS issues will cause errors. Ensure the node has internet access and the API URL is reachable.
  • Invalid Input: Providing an empty or nonsensical station name may yield no results or unexpected responses.
  • Rate Limiting or API Changes: Since the node relies on a public API, changes in the API or rate limits could cause failures. Monitor API status if issues arise.

If the node is configured to continue on failure, errors will be returned as JSON objects with an error field describing the issue.

Links and References

  • TGVmax Official Website (for general service info)
  • No official public API documentation was found; the node uses reverse-engineered endpoints from the Tgvmax planner site.

Discussion