-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtransit-api.json
More file actions
5347 lines (5347 loc) · 230 KB
/
Copy pathtransit-api.json
File metadata and controls
5347 lines (5347 loc) · 230 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
{
"openapi": "3.1.0",
"info": {
"title": "Transit API (Stable)",
"version": "4.0.0",
"x-logo": {
"url": "transit-logotype_iOS-dark.png"
},
"contact": {},
"description": "**📌 You are viewing v4 (Stable). View the legacy [v3 API here](v3.html).**\n\nAPI provided by data from [transit.app](https://transit.app). Request an API key [here](https://transitapp.com/partners/apis).\n"
},
"paths": {
"/v4/public/nearby_routes": {
"get": {
"operationId": "/v4/public/nearby_routes",
"description": "Returns routes around a location",
"parameters": [
{
"$ref": "#/components/parameters/Latitude"
},
{
"$ref": "#/components/parameters/Longitude"
},
{
"in": "query",
"name": "max_distance",
"description": "Maximum radius of search from the request location (in meters)",
"schema": {
"type": "integer",
"example": 1500,
"default": 150,
"maximum": 1500
}
},
{
"$ref": "#/components/parameters/Locale"
},
{
"$ref": "#/components/parameters/Accept-Language"
},
{
"schema": {
"type": "boolean",
"default": true
},
"in": "query",
"name": "should_update_realtime",
"description": "Boolean telling the system if it should update real time or just return schedule information. "
},
{
"in": "query",
"name": "max_num_departures",
"description": "Number of departures to return per merged itinerary",
"schema": {
"type": "integer",
"default": 3,
"minimum": 1,
"maximum": 10
}
},
{
"in": "query",
"name": "time",
"description": "Optional epoch timestamp for getting routes at a specific time. If not provided, current time is used.",
"schema": {
"type": "integer",
"example": 1641024000
}
},
{
"in": "query",
"name": "include_stops_and_shapes",
"description": "Boolean to control whether stops and shapes are included in itineraries. When false, only itinerary metadata is returned without stops and shape polylines, reducing response size.",
"schema": {
"type": "boolean",
"default": false
}
},
{
"in": "query",
"name": "stop_detailed",
"description": "When true, stop objects in `stops` and `detour.skipped_stops` are returned as `StopDetailed` instead of `Stop`. Only applies when `include_stops_and_shapes=true`.",
"schema": {
"type": "boolean",
"default": false
}
}
],
"responses": {
"200": {
"description": "List of nearby routes",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"nearby_routes": {
"type": "array",
"items": {
"type": "object",
"properties": {
"alerts": {
"type": "array",
"description": "Service alerts that affect this route",
"items": {
"$ref": "#/components/schemas/ServiceAlert"
}
},
"global_route_id": {
"$ref": "#/components/schemas/GlobalRouteId"
},
"route_long_name": {
"type": "string",
"description": "Route long name from GTFS"
},
"route_short_name": {
"type": "string",
"description": "Route short name from GTFS"
},
"route_timezone": {
"type": "string",
"description": "The timezone of the route"
},
"route_display_short_name": {
"$ref": "#/components/schemas/DisplayShortName"
},
"compact_display_short_name": {
"$ref": "#/components/schemas/DisplayShortName"
},
"fares": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Fare"
}
},
"route_type": {
"type": "integer",
"description": "Route type as defined in GTFS"
},
"route_color": {
"type": "string",
"description": "Route color as defined in GTFS"
},
"route_text_color": {
"type": "string",
"description": "Route text color as defined in GTFS"
},
"route_network_name": {
"type": "string",
"description": "The network name associated with that route"
},
"route_network_id": {
"type": "string",
"description": "A global unique identifier for the network"
},
"tts_long_name": {
"type": "string",
"description": "Long name for TTS"
},
"tts_short_name": {
"type": "string",
"description": "Short name for TTS"
},
"sorting_key": {
"type": "string",
"description": "Key for sorting routes"
},
"mode_name": {
"type": "string",
"description": "Mode name for the given route"
},
"real_time_route_id": {
"type": "string",
"description": "Route id used for real time"
},
"vehicle": {
"$ref": "#/components/schemas/Vehicle"
},
"merged_itineraries": {
"type": "array",
"description": "Array of merged itineraries, each containing individual itineraries and schedule items",
"items": {
"type": "object",
"properties": {
"direction_id": {
"type": "integer",
"description": "Direction ID"
},
"closest_stop": {
"$ref": "#/components/schemas/Stop",
"description": "The closest stop for this merged itinerary"
},
"itineraries": {
"type": "array",
"description": "Individual itineraries within this merged itinerary",
"items": {
"$ref": "#/components/schemas/ItineraryWithInternalId"
}
},
"schedule_items": {
"type": "array",
"description": "Schedule items for this merged itinerary, each referencing an individual itinerary",
"items": {
"$ref": "#/components/schemas/ScheduleItemWithInternalId"
}
}
}
}
}
},
"required": [
"global_route_id",
"route_long_name",
"route_short_name",
"merged_itineraries"
]
}
}
}
}
}
}
},
"400": {
"description": "Latitude or longitude is invalid or missing"
},
"500": {
"description": "Internal server error causing no result"
}
},
"requestBody": {
"content": {}
}
},
"parameters": []
},
"/v4/public/nearby_stops": {
"get": {
"operationId": "/v4/public/nearby_stops",
"description": "Returns stops around a location",
"parameters": [
{
"$ref": "#/components/parameters/Latitude"
},
{
"$ref": "#/components/parameters/Longitude"
},
{
"in": "query",
"name": "max_distance",
"description": "Maximum radius of search from the request location (in meters)",
"schema": {
"type": "integer",
"example": 1500,
"default": 150,
"maximum": 1500
}
},
{
"in": "query",
"name": "stop_filter",
"description": "Determines which location types from the [GTFS](https://developers.google.com/transit/gtfs/reference#stopstxt) are included in the response.\n* Routable (GTFS `location_type` 0): Stops which are served by routes\n* EntrancesAndStopsOutsideStations: Entrances to transit stations and freestanding outdoor stops\n* Entrances (GTFS `location_type` 2): Entrances to stations\n* Any: All stops\n",
"schema": {
"type": "string",
"enum": [
"Routable",
"EntrancesAndStopsOutsideStations",
"Entrances",
"Any"
],
"example": "Routable",
"default": "Routable"
}
},
{
"$ref": "#/components/parameters/PickupDropoffFilter"
},
{
"in": "query",
"name": "stop_detailed",
"description": "When set to `true`, returns `StopDetailed` objects instead of `Stop` objects, including additional fields like timezone, bike boarding, network info, and TTS name.",
"schema": {
"type": "boolean",
"default": false
}
},
{
"in": "query",
"name": "include_beta_feeds",
"description": "When true, includes stops from beta feeds in the response",
"schema": {
"type": "boolean",
"default": false
}
},
{
"$ref": "#/components/parameters/Locale"
},
{
"$ref": "#/components/parameters/Accept-Language"
}
],
"responses": {
"200": {
"description": "List of nearby stops",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"stops": {
"type": "array",
"description": "Returns `Stop` objects by default, or `StopDetailed` objects when `stop_detailed=true`.",
"items": {
"oneOf": [
{
"$ref": "#/components/schemas/Stop"
},
{
"$ref": "#/components/schemas/StopDetailed"
}
]
}
}
}
}
}
}
},
"400": {
"description": "Latitude or longitude is invalid or missing"
},
"500": {
"description": "Internal server error causing no result"
}
}
},
"parameters": []
},
"/v4/public/stop_departures": {
"get": {
"operationId": "/v4/public/stop_departures",
"description": "Get upcoming departures for all routes serving one or more stops, with optional real time information",
"parameters": [
{
"in": "query",
"name": "global_stop_ids",
"required": true,
"description": "Comma-separated list of global stop IDs to get departures for multiple stops at once. Must contain at most 100 valid stop IDs. Either this parameter or global_stop_id must be provided.",
"schema": {
"example": "1:82774,2:54321,1:99999",
"type": "string"
}
},
{
"in": "query",
"name": "time",
"description": "UNIX timestamp representing the time for which departures should be determined",
"schema": {
"type": "number",
"format": "int",
"default": "The current time when the request was issued"
}
},
{
"in": "query",
"name": "remove_cancelled",
"description": "Remove cancelled schedule items from the results",
"schema": {
"type": "boolean",
"default": false
}
},
{
"$ref": "#/components/parameters/Locale"
},
{
"$ref": "#/components/parameters/Accept-Language"
},
{
"schema": {
"type": "boolean",
"default": true
},
"in": "query",
"name": "should_update_realtime",
"description": "Boolean telling the system if it should update real time or just return schedule information. "
},
{
"in": "query",
"name": "max_num_departures",
"description": "Number of departures to return per merged itinerary",
"schema": {
"type": "integer",
"default": 3,
"minimum": 1,
"maximum": 10
}
},
{
"in": "query",
"name": "include_stops_and_shapes",
"description": "Boolean to control whether stops and shapes are included in itineraries. When false, only itinerary metadata is returned without stops and shape polylines, reducing response size.",
"schema": {
"type": "boolean",
"default": false
}
},
{
"in": "query",
"name": "stop_detailed",
"description": "When true, stop objects in `stops` and `detour.skipped_stops` are returned as `StopDetailed` instead of `Stop`. Only applies when `include_stops_and_shapes=true`.",
"schema": {
"type": "boolean",
"default": false
}
},
{
"in": "query",
"name": "exclude_terminal_arrivals",
"description": "When true, schedule items where the queried stop is the final stop of the trip are removed from the results. Such entries are arrivals at the end of the line — riders cannot ride toward the itinerary headsign — and normally only appear when the vehicle continues in service as another trip (e.g. interlined or loop routes); the continuation trip's own departure is listed separately.",
"schema": {
"type": "boolean",
"default": false
}
}
],
"responses": {
"200": {
"description": "List of upcoming departures at stop, grouped by route, then by merged itinerary",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"route_departures": {
"type": "array",
"items": {
"type": "object",
"properties": {
"alerts": {
"type": "array",
"description": "Service alerts that affect this route",
"items": {
"$ref": "#/components/schemas/ServiceAlert"
}
},
"global_route_id": {
"$ref": "#/components/schemas/GlobalRouteId"
},
"route_long_name": {
"type": "string",
"description": "Route long name from GTFS"
},
"route_short_name": {
"type": "string",
"description": "Route short name from GTFS"
},
"route_timezone": {
"type": "string",
"description": "The timezone of the route"
},
"route_display_short_name": {
"$ref": "#/components/schemas/DisplayShortName"
},
"compact_display_short_name": {
"$ref": "#/components/schemas/DisplayShortName"
},
"fares": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Fare"
}
},
"route_type": {
"type": "integer",
"description": "Route type as defined in GTFS"
},
"route_color": {
"type": "string",
"description": "Route color as defined in GTFS"
},
"route_text_color": {
"type": "string",
"description": "Route text color as defined in GTFS"
},
"route_network_name": {
"type": "string",
"description": "The network name associated with that route"
},
"route_network_id": {
"type": "string",
"description": "A global unique identifier for the network"
},
"tts_long_name": {
"type": "string",
"description": "Long name for TTS"
},
"tts_short_name": {
"type": "string",
"description": "Short name for TTS"
},
"sorting_key": {
"type": "string",
"description": "Key for sorting routes"
},
"mode_name": {
"type": "string",
"description": "Mode name for the given route"
},
"real_time_route_id": {
"type": "string",
"description": "Route id used for real time"
},
"vehicle": {
"$ref": "#/components/schemas/Vehicle"
},
"merged_itineraries": {
"type": "array",
"description": "Array of merged itineraries, each containing individual itineraries and schedule items",
"items": {
"type": "object",
"properties": {
"direction_id": {
"type": "integer",
"description": "Direction ID (0 or 1)"
},
"closest_stop": {
"$ref": "#/components/schemas/Stop",
"description": "The closest stop for this merged itinerary"
},
"itineraries": {
"type": "array",
"description": "Individual itineraries within this merged itinerary",
"items": {
"$ref": "#/components/schemas/ItineraryWithInternalId"
}
},
"schedule_items": {
"type": "array",
"description": "Schedule items for this merged itinerary, each referencing an individual itinerary",
"items": {
"$ref": "#/components/schemas/ScheduleItemWithInternalId"
}
}
}
}
},
"global_stop_id": {
"type": "string",
"description": "The global stop ID associated with this route departure",
"example": "STM:88368"
}
},
"required": [
"global_route_id",
"route_long_name",
"route_short_name",
"merged_itineraries",
"global_stop_id"
]
}
}
}
}
}
}
},
"400": {
"description": "Invalid global stop ID, missing required parameters, or no result could be found"
}
}
},
"parameters": []
},
"/v4/public/estimate_plan_duration": {
"get": {
"operationId": "/v4/public/estimate_plan_duration",
"summary": "/v4/public/estimate_plan_duration",
"description": "This endpoint returns an estimated duration for a trip plan based on the provided origin and destination. \n\nThe query params used in this endpoint are the same as /public/plan, except for the more limited mode selection, real time not available and multiple results aren't provided. ",
"parameters": [
{
"in": "query",
"schema": {
"type": "number"
},
"name": "from_lat",
"description": "Latitude of the starting location for the trip. Required unless from_global_stop_id is provided."
},
{
"in": "query",
"schema": {
"type": "number"
},
"name": "from_lon",
"description": "Longitude of the starting location for the trip. Required unless from_global_stop_id is provided."
},
{
"in": "query",
"schema": {
"type": "string"
},
"name": "from_global_stop_id",
"description": "Global stop ID for the starting location. Alternative to from_lat/from_lon parameters."
},
{
"in": "query",
"schema": {
"type": "number"
},
"name": "to_lat",
"description": "Latitude of the destination location for the trip. Required unless to_global_stop_id is provided."
},
{
"in": "query",
"schema": {
"type": "number"
},
"name": "to_lon",
"description": "Longitude of the destination location for the trip. Required unless to_global_stop_id is provided."
},
{
"in": "query",
"schema": {
"type": "string"
},
"name": "to_global_stop_id",
"description": "Global stop ID for the destination location. Alternative to to_lat/to_lon parameters."
},
{
"in": "query",
"name": "mode",
"description": "The primary mode of transportation for the trip",
"schema": {
"default": "transit",
"type": "string",
"enum": [
"transit",
"microtransit"
]
}
},
{
"in": "query",
"name": "secondary_mode",
"description": "The secondary mode of transportation for the trip, if applicable",
"schema": {
"type": "string",
"enum": [
"microtransit"
]
}
},
{
"in": "query",
"name": "leave_time",
"description": "UNIX timestamp representing the desired departure time for the trip",
"schema": {
"type": "number"
}
},
{
"in": "query",
"name": "arrival_time",
"description": "UNIX timestamp representing the desired arrival time for the trip",
"schema": {
"type": "number"
}
},
{
"in": "query",
"name": "accessibility_need",
"description": "This parameter specifies accessibility requirements for the trip. The following values are available:\n - `none`: No specific accessibility needs are required; any valid trip may be returned.\n - `strict`: Returns only strictly accessible trips. Specifically, this includes only trips using accessible stops and accessible routes/vehicles.\n - `prioritize_step_free`: Prioritizes strictly accessible results but also includes less accessible alternatives (those with unknown or non-step-free accessibility).\n",
"schema": {
"type": "string",
"enum": [
"none",
"strict",
"prioritize_step_free"
],
"default": "none"
}
},
{
"in": "query",
"name": "walk_reluctance",
"description": "A factor that determines how much walking costly compared to riding in a transit vehicle in the trip plan. Values lower than 1.0 will be ignored. Transit uses the value of 1.1 by default and 2.1 when in the \"Minimize Walking\" mode. ",
"schema": {
"type": "number"
}
},
{
"in": "query",
"name": "max_distance_between_location_and_stop",
"description": "The maximum distance allowed between the starting or destination locations and a transit stop. This value can be adjusted to optimize performance by limiting the search radius. This value can only be customized if `mode=transit`, and the default is 1500m.",
"schema": {
"type": "number"
}
}
],
"responses": {
"200": {
"description": "This endpoint provides an estimated trip duration in seconds",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"duration": {
"type": "number",
"description": "Estimated duration of the trip in seconds"
},
"type": {
"type": "string",
"description": "Type of trip plan (Transit, Walk, Bike, Car_Microtransit)"
}
}
}
}
}
}
}
}
},
"/v4/public/plan": {
"get": {
"operationId": "/v4/public/plan",
"summary": "/v4/public/plan",
"description": "This endpoint returns a plan from the origin to the destination in different modes, including multimodal trips. \n\nThis endpoint will eventually replace the /otp/plan. The OTP endpoint is deprecated as the OpenTripPlanner endpoint it's based on is also [deprecated](https://docs.opentripplanner.org/en/latest/Changelog/#250-2024-03-13). ",
"parameters": [
{
"in": "query",
"schema": {
"type": "number",
"format": "double"
},
"name": "from_lat",
"description": "Latitude of the starting location for the trip. Required unless from_global_stop_id or from_global_stop_ids is provided."
},
{
"in": "query",
"schema": {
"type": "number",
"format": "double"
},
"name": "from_lon",
"description": "Longitude of the starting location for the trip. Required unless from_global_stop_id or from_global_stop_ids is provided."
},
{
"in": "query",
"schema": {
"type": "string"
},
"name": "from_global_stop_id",
"description": "Single global stop ID for the starting location. Kept for backward compatibility; prefer from_global_stop_ids (plural) to describe a correspondence zone."
},
{
"in": "query",
"schema": {
"type": "string"
},
"name": "from_global_stop_ids",
"description": "Comma-separated list of global stop IDs describing the origin correspondence zone (e.g. all platforms of a hub across different networks/parent stations). Each entry may be a platform stop id or a station stop id; stations are automatically expanded to their child platform stops when deciding whether to strip the initial walk leg.\nRouting origin: if from_lat and from_lon are provided, the coordinates are used to plan the trip. Otherwise the first valid stop's location from the list is used as a fallback.\nWalk-leg filtering: the initial walk leg is removed from a plan only when the itinerary actually boards at one of the provided stops (or at their parent station). Plans that board at an unrelated nearby stop keep their walk leg so the client can still present directions to the stop."
},
{
"in": "query",
"schema": {
"type": "number",
"format": "double"
},
"name": "to_lat",
"description": "Latitude of the destination location for the trip. Required unless to_global_stop_id or to_global_stop_ids is provided."
},
{
"in": "query",
"schema": {
"type": "number",
"format": "double"
},
"name": "to_lon",
"description": "Longitude of the destination location for the trip. Required unless to_global_stop_id or to_global_stop_ids is provided."
},
{
"in": "query",
"schema": {
"type": "string"
},
"name": "to_global_stop_id",
"description": "Single global stop ID for the destination location. Kept for backward compatibility; prefer to_global_stop_ids (plural) to describe a correspondence zone."
},
{
"in": "query",
"schema": {
"type": "string"
},
"name": "to_global_stop_ids",
"description": "Comma-separated list of global stop IDs describing the destination correspondence zone. Behaves symmetrically to from_global_stop_ids: coordinates win for routing when provided, otherwise the first valid stop's location is used; the final walk leg is stripped only when the itinerary actually alights at one of the provided stops."
},
{
"in": "query",
"name": "mode",
"description": "The primary mode of transportation for the trip",
"schema": {
"default": "transit",
"type": "string",
"enum": [
"transit",
"microtransit",
"personal_bike",
"walk",
"shared_mobility"
]
}
},
{
"in": "query",
"name": "secondary_mode",
"description": "This specifies the secondary mode of transportation for the trip, if applicable.\n\nThis value allows for creating multimodal trips mixing transit and another mode. If a value other than walk is specified here, primary_mode must be set to transit.\n\nWhen this value is set, the planner attempts to replace the first and last legs of the trip with the specified mode if advantageous to do so. If it is not advantageous, a walk leg might be used instead.\n\nNote that the results generated are optimal given the specified modes, but they might not represent the absolute optimal trip overall. Depending on the context, it may be advantageous to compare the result of the multimodal plan against a direct plan (using only the primary mode) to ensure true optimality (i.e., a transit + microtransit result should likely be disregarded if the transit-only plan is faster).",
"schema": {
"type": "string",
"enum": [
"microtransit",
"personal_bike",
"walk",
"shared_mobility"
]
}
},
{
"in": "query",
"name": "sharing_system_type",
"description": "Specifies the type of shared mobility system when mode is set to shared_mobility.\n\n- docked_bikeshare: Traditional docked bikeshare systems\n- dockless_bikeshare: Dockless bikes\n- scooters: Electric scooters\n\nIf not specified, defaults to docked_bikeshare only.",
"schema": {
"type": "string",
"enum": [
"docked_bikeshare",
"dockless_bikeshare",
"scooters"
],
"default": "docked_bikeshare"
}
},
{
"in": "query",
"name": "leave_time",
"description": "UNIX timestamp representing the desired departure time for the trip. If both `arrival_time` and `leave_time` are provided, only `leave_time` is taken into account. By default, the current time is used. ",
"schema": {
"type": "number"
}
},
{
"in": "query",
"name": "arrival_time",
"description": "UNIX timestamp representing the desired arrival time for the trip. If both `arrival_time` and `leave_time` are provided, only `leave_time` is taken into account.",
"schema": {
"type": "number"
}
},
{
"in": "query",
"name": "accessibility_need",
"description": "This parameter specifies accessibility requirements for the trip. The following values are available:\n - `none`: No specific accessibility needs are required; any valid trip may be returned.\n - `strict`: Returns only strictly accessible trips. Specifically, this includes only trips using accessible stops and accessible routes/vehicles.\n - `prioritize_step_free`: Prioritizes strictly accessible results but also includes less accessible alternatives (those with unknown or non-step-free accessibility).\n",
"schema": {
"default": "none",
"type": "string",
"enum": [
"none",
"strict",
"prioritize_step_free"
]
}
},
{
"in": "query",
"name": "walk_reluctance",
"description": "This factor determines how costly walking is compared to riding in a transit vehicle within the trip plan. Values lower than 1.0 will be ignored. Transit, the app, uses a default value of 1.1, and 2.1 when the \"Minimize Walking\" mode is active.",
"schema": {
"type": "number"
}
},
{
"in": "query",
"name": "walk_speed",
"description": "The walking speed in meters per second for trip planning calculations. Must be between 0.5 and 5.0 m/s.",
"schema": {
"type": "number",
"minimum": 0.5,
"maximum": 5
}
},
{
"in": "query",
"name": "should_include_directions",
"description": "Set to true to get step-by-step directions in the plan results.",
"schema": {
"type": "boolean",
"default": false
}
},
{
"in": "query",
"name": "should_include_pathways",
"description": "Set to true to expand GTFS Pathways steps in direction items when entering or exiting a transit station. Requires should_include_directions to also be set to true.",
"schema": {
"type": "boolean",
"default": false
}
},
{
"in": "query",
"name": "max_distance_between_location_and_stop",
"description": "This is the maximum distance allowed between the starting or destination locations and a transit stop. This value can be adjusted to optimize performance by limiting the search radius. By default, the value depends on the selected mode; for example, it is 1500 m for a standard `mode=transit` plan.",
"schema": {
"type": "number"
}
},
{
"schema": {
"type": "boolean",
"default": false
},
"in": "query",
"name": "should_update_realtime",
"description": "If true, the server will update the trip times in the response using real-time data, enhancing the schedule items with real time information. This happens after the initial route planning, which is still based on static schedule data."
},
{
"schema": {
"type": "boolean",
"default": false
},
"in": "query",
"name": "consider_downtimes",
"description": "If true, the planning will avoid any known downtimes identified in the service alerts. For example, if a subway is currently not working and has a severe service alert, the planner will offer results that work around that disruption. This parameter is ignored if the `mode` is set to anything other than `transit`."
},
{
"schema": {
"type": "string"
},
"in": "query",
"name": "avoid_routes",
"description": "Comma-separated list of route identifiers to avoid in public transit routing. Each route identifier is a colon-separated pair of `<feed_code>:<global_route_id>`. This parameter is ignored if the `mode` is set to anything other than `transit`."
},
{
"schema": {
"type": "string"
},
"in": "query",
"name": "avoid_stops",
"description": "Comma-separated list of stop identifiers to avoid in public transit routing. Each stop identifier is a colon-separated pair of `<feed_code>:<stable_stop_id>`. This parameter is ignored if the `mode` is set to anything other than `transit`."
},
{
"schema": {
"type": "string"
},
"in": "query",
"name": "allowed_modes",
"description": "Comma-separated list of mode names to allow in public transit routing (e.g., \"Bus,Metro,Train\"). If specified, only routes with matching mode names will be considered for trip planning. Mode names should match the `mode_name` field returned in the route object. This parameter is ignored if the `mode` is set to anything other than `transit`."
},
{
"schema": {
"type": "string"
},
"in": "query",
"name": "excluded_modes",
"description": "Comma-separated list of mode names to exclude from public transit routing (e.g., \"Bus,Ferry\"). If specified, routes with matching mode names will be excluded from trip planning. Mode names should match the `mode_name` field returned in the route object. This parameter is ignored if the `mode` is set to anything other than `transit`."
},
{
"schema": {
"type": "string"
},
"in": "query",
"name": "allowed_networks",
"description": "If set, only the specified networks will be used to plan trips. A list of available networks can be obtained from [`/public/available_networks`](#operation/get-v4-public-available_networks).\n\nThis parameter will accept a comma-separated list containing network IDs, network locations or a combination of both. This parameter is ignored if the `mode` is set to anything other than `transit`.\n"
},
{
"schema": {
"type": "string"
},
"in": "query",
"name": "disabled_networks",
"description": "If set, the specified networks will be excluded from trip planning. A list of available networks can be obtained from [`/public/available_networks`](#operation/get-v4-public-available_networks).\n\nThis parameter will accept a comma-separated list containing network IDs, network locations or a combination of both. It takes precedence over `allowed_networks`: a network listed in both parameters is excluded. This parameter is ignored if the `mode` is set to anything other than `transit`.\n"
},
{
"schema": {
"type": "boolean",
"default": false
},
"in": "query",
"name": "enable_network_previews",
"description": "If set to `true`, includes network previews in trip planning. By default, network previews are excluded from route planning results. This parameter is ignored if the `mode` is set to anything other than `transit`.\n"
},
{
"schema": {
"type": "number",
"default": 3
},
"in": "query",
"name": "num_result",
"description": "Number of results to return. This parameter is only considered for public transit only plans (mode=transit). Default is 3 for public transit only and bike plans, and 1 for walk plans."
},