This is the documentation of version 0.61.0. Go to the latest version, 1.0.0-rc.5.
TomTom Maps for JavaScript
    Preparing search index...

    Function evChargingStationsAvailability

    • Get real-time availability of electric vehicle charging stations.

      Provides current operational status of charging points and connectors at EV charging parks, enabling drivers to find available chargers before arriving at a location.

      Parameters

      Returns Promise<ChargingStationsAvailability | undefined>

      Promise resolving to charging station availability information

      Access: needs an API key with EV Charging Stations Availability access, unavailable on a Freemium or Pay As You Grow (PAYG) basis: request it from TomTom Sales.

      Key information returned:

      • Point-level status: Available, Occupied, Reserved, Out of Service
      • Connector details: Power ratings, plug types, current availability
      • Aggregated counts: Quick overview of available vs occupied chargers
      • Access information: Public, private, or restricted access
      • Opening hours: When the charging facility is accessible

      Returns availability records, not places. To show stations with their availability, pass the places to getPlacesWithEVAvailability instead, and its result to PlacesModule.show().

      // Get availability for a specific charging park
      const availability = await evChargingStationsAvailability({
      apiKey: 'YOUR_API_KEY',
      id: 'charging-park-id-123'
      });

      // Check how many chargers are available
      const availableCount = availability?.chargingPointAvailability.statusCounts.Available ?? 0;
      console.log(`${availableCount} chargers available`);

      // CCS connectors, one entry per power level
      const ccsConnectors = availability?.connectorAvailabilities.filter(
      ({ connector }) => connector.type === 'IEC62196Type2CCS'
      );