# Transit

> Find nearby stops, routes, real-time departures, service alerts and trip plans with Transit.

App · 14 actions. Web page: https://docs.lodol.com/docs/integrations/transit

## Actions

### Estimate trip duration

Estimate trip duration.

**Inputs**

- From lat (`from_lat`, number): From lat.
- From lon (`from_lon`, number): From lon.
- From global stop ID (`from_global_stop_id`, text): From global stop id.
- To lat (`to_lat`, number): To lat.
- To lon (`to_lon`, number): To lon.
- To global stop ID (`to_global_stop_id`, text): To global stop id.
- Mode (`mode`, text): Mode. One of: `transit`, `microtransit`.
- Secondary mode (`secondary_mode`, text): Secondary mode. One of: `microtransit`.
- Leave time (`leave_time`, number): Leave time.
- Arrival time (`arrival_time`, number): Arrival time.
- Accessibility need (`accessibility_need`, text): Accessibility need. One of: `none`, `strict`, `prioritize_step_free` (Prioritize step free).
- Walk reluctance (`walk_reluctance`, number): Walk reluctance.
- Max distance between location and stop (`max_distance_between_location_and_stop`, number): Max distance between location and stop.

**Outputs**

- `data` (object): The response from Transit.

**Example output**

```json
{
  "data": {
    "duration": 1,
    "type": "example"
  }
}
```

### Find nearby routes

Find nearby routes.

**Inputs**

- Lat (`lat`, number, required): Lat.
- Lon (`lon`, number, required): Lon.
- Max distance (`max_distance`, number): Max distance. At most 1500.
- Locale (`locale`, text): Locale.
- Should update realtime (`should_update_realtime`, true/false): Should update realtime.
- Merge platform stops (`merge_platform_stops`, true/false): Merge platform stops.
- Max num departures (`max_num_departures`, number): Max num departures. From 1 to 10.
- Time (`time`, date and time): Time.
- Include stops and shapes (`include_stops_and_shapes`, true/false): Include stops and shapes.
- Stop detailed (`stop_detailed`, true/false): Stop detailed.
- Include inactive (`include_inactive`, true/false): Include inactive.

**Outputs**

- `data` (object): The response from Transit.

**Example output**

```json
{
  "data": {
    "nearby_routes": [
      {
        "alerts": [
          {}
        ],
        "compact_display_short_name": {},
        "fares": [
          {}
        ],
        "global_route_id": "example",
        "is_active": true,
        "merged_itineraries": [
          {}
        ],
        "mode_key": "example",
        "mode_name": "example",
        "real_time_route_id": "example",
        "route_color": "example",
        "route_display_short_name": {},
        "route_long_name": "example",
        "route_network_id": "example",
        "route_network_name": "example",
        "route_short_name": "example",
        "route_text_color": "example",
        "route_timezone": "example",
        "route_type": 1,
        "sorting_key": "example",
        "tts_long_name": "example",
        "tts_short_name": "example",
        "vehicle": {}
      }
    ]
  }
}
```

### Find nearby stops

Find nearby stops.

**Inputs**

- Lat (`lat`, number, required): Lat.
- Lon (`lon`, number, required): Lon.
- Max distance (`max_distance`, number): Max distance. At most 1500.
- Stop filter (`stop_filter`, text): Stop filter. One of: `Routable`, `EntrancesAndStopsOutsideStations`, `Entrances`, `Any`.
- Pickup dropoff filter (`pickup_dropoff_filter`, text): Pickup dropoff filter. One of: `PickupAllowedOnly`, `DropoffAllowedOnly`, `Everything`.
- Stop detailed (`stop_detailed`, true/false): Stop detailed.
- Include beta feeds (`include_beta_feeds`, true/false): Include beta feeds.
- Locale (`locale`, text): Locale.

**Outputs**

- `data` (object): The response from Transit.

**Example output**

```json
{
  "data": {
    "stops": [
      {
        "city_name": "example",
        "distance": 1,
        "global_stop_id": "example",
        "location_type": 1,
        "parent_station": {},
        "raw_stop_id": "example",
        "route_type": 1,
        "rt_stop_id": "example",
        "stop_code": "example",
        "stop_lat": 1,
        "stop_lon": 1,
        "stop_name": "example",
        "wheelchair_boarding": 0
      }
    ]
  }
}
```

### Get network update

Get network update.

**Inputs**

- Network (`network_id`, text): Network id.
- Lat (`lat`, number): Lat.
- Lon (`lon`, number): Lon.

**Outputs**

- `data` (object): The response from Transit.

**Example output**

```json
{
  "data": {
    "time": 1
  }
}
```

### Get route

Get route.

**Inputs**

- Global route ID (`global_route_id`, text, required): Global route id.
- Locale (`locale`, text): Locale.
- Include next departure (`include_next_departure`, true/false): Include next departure.
- Stop detailed (`stop_detailed`, true/false): Stop detailed.

**Outputs**

- `data` (object): The response from Transit.

**Example output**

```json
{
  "data": {
    "itineraries": [
      {
        "canonical_itinerary": true,
        "detour": {},
        "direction_headsign": "example",
        "direction_id": 1,
        "headsign": "example",
        "is_active": true,
        "merged_headsign": "example",
        "next_departure": {},
        "shape": "example",
        "stops": [
          {}
        ]
      }
    ],
    "route": {
      "alerts": [
        {}
      ],
      "compact_display_short_name": {
        "boxed_text": "example",
        "elements": [
          "example"
        ],
        "route_name_redundancy": true
      },
      "fares": [
        {}
      ],
      "global_route_id": "example",
      "global_stop_id": "example",
      "mode_key": "example",
      "mode_name": "example",
      "real_time_route_id": "example",
      "route_color": "example",
      "route_display_short_name": {
        "boxed_text": "example",
        "elements": [
          "example"
        ],
        "route_name_redundancy": true
      },
      "route_image": "example",
      "route_long_name": "example",
      "route_network_id": "example",
      "route_network_name": "example",
      "route_short_name": "example",
      "route_text_color": "example",
      "route_timezone": "example",
      "route_type": 1,
      "sorting_key": "example",
      "tts_long_name": "example",
      "tts_short_name": "example",
      "vehicle": {
        "image": "example",
        "name": "example",
        "name_inflection": "example"
      }
    }
  }
}
```

### Get stop

Get stop.

**Inputs**

- Global stop ID (`global_stop_id`, text, required): Global stop id.
- Locale (`locale`, text): Locale.

**Outputs**

- `data` (object): The response from Transit.

**Example output**

```json
{
  "data": {
    "stop": {
      "city_name": "example",
      "distance": 1,
      "global_stop_id": "example",
      "location_type": 1,
      "network_id": "example",
      "network_name": "example",
      "parent_station": {
        "city_name": "example",
        "global_stop_id": "example",
        "location_type": 1,
        "raw_stop_id": "example",
        "rt_stop_id": "example",
        "station_code": "example",
        "station_name": "example"
      },
      "raw_stop_id": "example",
      "route_type": 1,
      "rt_stop_id": "example",
      "stop_code": "example",
      "stop_lat": 1,
      "stop_lon": 1,
      "stop_name": "example",
      "stop_timezone": "example",
      "tts_stop_name": "example",
      "wheelchair_boarding": 0
    }
  }
}
```

### Get stop departures

Get stop departures.

**Inputs**

- Global stop IDs (`global_stop_ids`, list, required): Global stop ids.
- Time (`time`, number): Time.
- Remove cancelled (`remove_cancelled`, true/false): Remove cancelled.
- Locale (`locale`, text): Locale.
- Should update realtime (`should_update_realtime`, true/false): Should update realtime.
- Merge platform stops (`merge_platform_stops`, true/false): Merge platform stops.
- Max num departures (`max_num_departures`, number): Max num departures. From 1 to 10.
- Include stops and shapes (`include_stops_and_shapes`, true/false): Include stops and shapes.
- Stop detailed (`stop_detailed`, true/false): Stop detailed.
- Exclude terminal arrivals (`exclude_terminal_arrivals`, true/false): Exclude terminal arrivals.

**Outputs**

- `data` (object): The response from Transit.

**Example output**

```json
{
  "data": {
    "route_departures": [
      {
        "alerts": [
          {}
        ],
        "compact_display_short_name": {},
        "fares": [
          {}
        ],
        "global_route_id": "example",
        "global_stop_id": "example",
        "merged_itineraries": [
          {}
        ],
        "mode_key": "example",
        "mode_name": "example",
        "real_time_route_id": "example",
        "route_color": "example",
        "route_display_short_name": {},
        "route_long_name": "example",
        "route_network_id": "example",
        "route_network_name": "example",
        "route_short_name": "example",
        "route_text_color": "example",
        "route_timezone": "example",
        "route_type": 1,
        "sorting_key": "example",
        "tts_long_name": "example",
        "tts_short_name": "example",
        "vehicle": {}
      }
    ]
  }
}
```

### Get trip

Get trip.

**Inputs**

- Trip search key (`trip_search_key`, text, required): Trip search key.
- Include continuation (`include_continuation`, true/false): Include continuation.
- Should update realtime (`should_update_realtime`, true/false): Should update realtime.
- Locale (`locale`, text): Locale.

**Outputs**

- `data` (object): The response from Transit.

**Example output**

```json
{
  "data": {
    "continuation_trip_search_key": "example",
    "route": {
      "alerts": [
        {}
      ],
      "compact_display_short_name": {
        "boxed_text": "example",
        "elements": [
          "example"
        ],
        "route_name_redundancy": true
      },
      "fares": [
        {}
      ],
      "global_route_id": "example",
      "global_stop_id": "example",
      "mode_key": "example",
      "mode_name": "example",
      "real_time_route_id": "example",
      "route_color": "example",
      "route_display_short_name": {
        "boxed_text": "example",
        "elements": [
          "example"
        ],
        "route_name_redundancy": true
      },
      "route_image": "example",
      "route_long_name": "example",
      "route_network_id": "example",
      "route_network_name": "example",
      "route_short_name": "example",
      "route_text_color": "example",
      "route_timezone": "example",
      "route_type": 1,
      "sorting_key": "example",
      "tts_long_name": "example",
      "tts_short_name": "example",
      "vehicle": {
        "image": "example",
        "name": "example",
        "name_inflection": "example"
      }
    },
    "rt_trip_id": "example",
    "schedule_items": [
      {
        "departure_time": 1,
        "is_cancelled": true,
        "is_real_time": true,
        "scheduled_departure_time": 1,
        "stop": {}
      }
    ]
  }
}
```

### List network routes

List network routes.

**Inputs**

- Network IDs (`network_ids`, list): Network ids.
- Lat (`lat`, number): Lat.
- Lon (`lon`, number): Lon.
- Locale (`locale`, text): Locale.
- Include itineraries (`include_itineraries`, true/false): Include itineraries.
- Stop detailed (`stop_detailed`, true/false): Stop detailed.

**Outputs**

- `data` (object): The response from Transit.

**Example output**

```json
{
  "data": {
    "routes": [
      {
        "alerts": [
          {}
        ],
        "compact_display_short_name": {},
        "fares": [
          {}
        ],
        "global_route_id": "example",
        "global_stop_id": "example",
        "mode_key": "example",
        "mode_name": "example",
        "real_time_route_id": "example",
        "route_color": "example",
        "route_display_short_name": {},
        "route_image": "example",
        "route_long_name": "example",
        "route_network_id": "example",
        "route_network_name": "example",
        "route_short_name": "example",
        "route_text_color": "example",
        "route_timezone": "example",
        "route_type": 1,
        "sorting_key": "example",
        "tts_long_name": "example",
        "tts_short_name": "example",
        "vehicle": {}
      }
    ]
  }
}
```

### List network stops

List network stops.

**Inputs**

- Network (`network_id`, text): Network id.
- Lat (`lat`, number): Lat.
- Lon (`lon`, number): Lon.
- Stop detailed (`stop_detailed`, true/false): Stop detailed.
- Locale (`locale`, text): Locale.

**Outputs**

- `data` (object): The response from Transit.

**Example output**

```json
{
  "data": {
    "stops": [
      {
        "city_name": "example",
        "distance": 1,
        "global_stop_id": "example",
        "location_type": 1,
        "parent_station": {},
        "raw_stop_id": "example",
        "route_type": 1,
        "rt_stop_id": "example",
        "stop_code": "example",
        "stop_lat": 1,
        "stop_lon": 1,
        "stop_name": "example",
        "wheelchair_boarding": 0
      }
    ]
  }
}
```

### List networks

List networks.

**Inputs**

- Lat (`lat`, number): Lat.
- Lon (`lon`, number): Lon.
- Country code (`country_code`, text): Country code.
- Include all networks (`include_all_networks`, true/false): Include all networks.
- Locale (`locale`, text): Locale.
- Include network geometry (`include_network_geometry`, true/false): Include network geometry.
- Include modes (`include_modes`, true/false): Include modes.
- Include sharing systems (`include_sharing_systems`, true/false): Include sharing systems.

**Outputs**

- `data` (object): The response from Transit.

**Example output**

```json
{
  "data": {
    "networks": [
      {
        "modes": [
          {}
        ],
        "network_enabled_by_default": true,
        "network_geometry": {},
        "network_geometry_center": {},
        "network_id": "example",
        "network_in_beta": true,
        "network_in_preview": true,
        "network_location": "example",
        "network_name": "example",
        "network_type": "example"
      }
    ]
  }
}
```

### List service alerts

List service alerts.

**Inputs**

- Network IDs (`network_ids`, list): Network ids.
- Lat (`lat`, number): Lat.
- Lon (`lon`, number): Lon.
- Show active alerts only (`show_active_alerts_only`, true/false): Show active alerts only.
- Locale (`locale`, text): Locale.

**Outputs**

- `data` (object): The response from Transit.

**Example output**

```json
{
  "data": {
    "alerts": [
      {
        "active_periods": [
          {}
        ],
        "cause": "UNKNOWN_CAUSE",
        "created_at": 1,
        "description": "example",
        "effect": "NO_SERVICE",
        "informed_entities": [
          {}
        ],
        "severity": "Unknown",
        "title": "example"
      }
    ]
  }
}
```

### Plan trip

Plan trip.

**Inputs**

- From lat (`from_lat`, number): From lat.
- From lon (`from_lon`, number): From lon.
- From global stop ID (`from_global_stop_id`, text): From global stop id.
- To lat (`to_lat`, number): To lat.
- To lon (`to_lon`, number): To lon.
- To global stop ID (`to_global_stop_id`, text): To global stop id.
- Mode (`mode`, text): Mode. One of: `transit`, `microtransit`, `personal_bike` (Personal bike), `walk`, `shared_mobility` (Shared mobility).
- Secondary mode (`secondary_mode`, text): Secondary mode. One of: `microtransit`, `personal_bike` (Personal bike), `walk`, `shared_mobility` (Shared mobility).
- Sharing system type (`sharing_system_type`, text): Sharing system type. One of: `docked_bikeshare` (Docked bikeshare), `dockless_bikeshare` (Dockless bikeshare), `scooters`.
- Leave time (`leave_time`, number): Leave time.
- Arrival time (`arrival_time`, number): Arrival time.
- Accessibility need (`accessibility_need`, text): Accessibility need. One of: `none`, `strict`, `prioritize_step_free` (Prioritize step free).
- Walk reluctance (`walk_reluctance`, number): Walk reluctance.
- Walk speed (`walk_speed`, number): Walk speed. From 0.5 to 5.
- Should include directions (`should_include_directions`, true/false): Should include directions.
- Should include pathways (`should_include_pathways`, true/false): Should include pathways.
- Should include safety (`should_include_safety`, true/false): Should include safety.
- Should use walk path duration (`should_use_walk_path_duration`, true/false): Should use walk path duration.
- Max distance between location and stop (`max_distance_between_location_and_stop`, number): Max distance between location and stop.
- Should update realtime (`should_update_realtime`, true/false): Should update realtime.
- Consider downtimes (`consider_downtimes`, true/false): Consider downtimes.
- Avoid routes (`avoid_routes`, text): Avoid routes.
- Avoid stops (`avoid_stops`, text): Avoid stops.
- Allowed modes (`allowed_modes`, text): Allowed modes.
- Excluded modes (`excluded_modes`, text): Excluded modes.
- Allowed networks (`allowed_networks`, text): Allowed networks.
- Enabled networks (`enabled_networks`, text): Enabled networks.
- Disabled networks (`disabled_networks`, text): Disabled networks.
- Enable network previews (`enable_network_previews`, true/false): Enable network previews.
- Num result (`num_result`, number): Num result.
- Disable walk on multimodal fallback (`disable_walk_on_multimodal_fallback`, true/false): Disable walk on multimodal fallback.
- Max num departures (`max_num_departures`, number): Max num departures. From 1 to 10.
- Max num legs (`max_num_legs`, number): Max num legs. From 1 to 6.
- Next departures window (`next_departures_window`, number): Next departures window.
- Walk fallback (`walk_fallback`, true/false): Walk fallback.

**Outputs**

- `data` (object): The response from Transit.

**Example output**

```json
{
  "data": {
    "results": [
      {
        "accessibility": "WheelchairStrict",
        "duration": 1,
        "end_time": 1,
        "fare": {},
        "legs": [
          {}
        ],
        "network_previews": [
          {}
        ],
        "start_time": 1
      }
    ]
  }
}
```

### Search stops

Search stops.

**Inputs**

- Lat (`lat`, number, required): Lat.
- Lon (`lon`, number, required): Lon.
- Query (`query`, text, required): Query.
- Pickup dropoff filter (`pickup_dropoff_filter`, text): Pickup dropoff filter. One of: `PickupAllowedOnly`, `DropoffAllowedOnly`, `Everything`.
- Max num results (`max_num_results`, number): Max num results. From 1 to 50.
- Max distance (`max_distance`, number): Max distance. At least 0.
- Merge similar stops (`merge_similar_stops`, true/false): Merge similar stops.
- Locale (`locale`, text): Locale.

**Outputs**

- `data` (object): The response from Transit.

**Example output**

```json
{
  "data": {
    "results": [
      {
        "distance": 1,
        "global_stop_id": "example",
        "location_type": "example",
        "match_strength": 1,
        "route_type": "example",
        "stop_lat": 1,
        "stop_lon": 1,
        "stop_name": "example"
      }
    ]
  }
}
```
