-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathgoogle_flights.json
More file actions
744 lines (744 loc) · 23.5 KB
/
Copy pathgoogle_flights.json
File metadata and controls
744 lines (744 loc) · 23.5 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
{
"engine": "google_flights",
"params": {
"departure_id": {
"description": "Parameter defines the departure airport code or location kgmid. An airport code is an uppercase 3-letter code. You can search for it on Google Flights or IATA. For example, `CDG` is Paris Charles de Gaulle Airport and `AUS` is Austin-Bergstrom International Airport. A location kgmid is a string that starts with `/m/` or `/g/`. You can search for a location on Wikidata and use its \"Freebase ID\" as the location kgmid. For example, `/m/0vzm` is the location kgmid for Austin, TX. You can specify multiple departure airports by separating them with a comma. For example, `CDG,ORY,/m/04jpl`.",
"group": "search_query"
},
"arrival_id": {
"description": "Parameter defines the arrival airport code or location kgmid. An airport code is an uppercase 3-letter code. You can search for it on Google Flights or IATA. For example, `CDG` is Paris Charles de Gaulle Airport and `AUS` is Austin-Bergstrom International Airport. A location kgmid is a string that starts with `/m/` or `/g/`. You can search for a location on Wikidata and use its \"Freebase ID\" as the location kgmid. For example, `/m/0vzm` is the location kgmid for Austin, TX. You can specify multiple arrival airports by separating them with a comma. For example, `CDG,ORY,/m/04jpl`.",
"group": "search_query"
},
"gl": {
"type": "select",
"options": [
"af",
"al",
"dz",
"as",
"ad",
"ao",
"ai",
"aq",
"ag",
"ar",
"am",
"aw",
"au",
"at",
"az",
"bs",
"bh",
"bd",
"bb",
"by",
"be",
"bz",
"bj",
"bm",
"bt",
"bo",
"ba",
"bw",
"bv",
"br",
"io",
"bn",
"bg",
"bf",
"bi",
"kh",
"cm",
"ca",
"cv",
"ky",
"cf",
"td",
"cl",
"cn",
"cx",
"cc",
"co",
"km",
"cg",
"cd",
"ck",
"cr",
"ci",
"hr",
"cu",
"cy",
"cz",
"dk",
"dj",
"dm",
"do",
"ec",
"eg",
"sv",
"gq",
"er",
"ee",
"et",
"fk",
"fo",
"fj",
"fi",
"fr",
"gf",
"pf",
"tf",
"ga",
"gm",
"ge",
"de",
"gh",
"gi",
"gr",
"gl",
"gd",
"gp",
"gu",
"gt",
"gg",
"gn",
"gw",
"gy",
"ht",
"hm",
"va",
"hn",
"hk",
"hu",
"is",
"in",
"id",
"ir",
"iq",
"ie",
"im",
"il",
"it",
"je",
"jm",
"jp",
"jo",
"kz",
"ke",
"ki",
"kp",
"kr",
"kw",
"kg",
"la",
"lv",
"lb",
"ls",
"lr",
"ly",
"li",
"lt",
"lu",
"mo",
"mk",
"mg",
"mw",
"my",
"mv",
"ml",
"mt",
"mh",
"mq",
"mr",
"mu",
"yt",
"mx",
"fm",
"md",
"mc",
"mn",
"me",
"ms",
"ma",
"mz",
"mm",
"na",
"nr",
"np",
"nl",
"an",
"nc",
"nz",
"ni",
"ne",
"ng",
"nu",
"nf",
"mp",
"no",
"om",
"pk",
"pw",
"ps",
"pa",
"pg",
"py",
"pe",
"ph",
"pn",
"pl",
"pt",
"pr",
"qa",
"re",
"ro",
"ru",
"rw",
"sh",
"kn",
"lc",
"pm",
"vc",
"ws",
"sm",
"st",
"sa",
"sn",
"rs",
"sc",
"sl",
"sg",
"sk",
"si",
"sb",
"so",
"za",
"gs",
"es",
"lk",
"sd",
"sr",
"sj",
"sz",
"se",
"ch",
"sy",
"tw",
"tj",
"tz",
"th",
"tl",
"tg",
"tk",
"to",
"tt",
"tn",
"tr",
"tm",
"tc",
"tv",
"ug",
"ua",
"ae",
"uk",
"gb",
"us",
"um",
"uy",
"uz",
"vu",
"ve",
"vn",
"vg",
"vi",
"wf",
"eh",
"ye",
"zm",
"zw"
],
"description": "Parameter defines the country to use for the Google Flights search. It's a two-letter country code. (e.g., `us` for the United States, `uk` for United Kingdom, or `fr` for France) Head to the Google countries page for a full list of supported Google countries.",
"group": "localization"
},
"hl": {
"type": "select",
"options": [
"af",
"ak",
"sq",
"ws",
"am",
"ar",
"hy",
"az",
"eu",
"be",
"bem",
"bn",
"bh",
"xx-bork",
"bs",
"br",
"bg",
"bt",
"km",
"ca",
"chr",
"ny",
"zh-cn",
"zh-tw",
"co",
"hr",
"cs",
"da",
"nl",
"xx-elmer",
"en",
"eo",
"et",
"ee",
"fo",
"tl",
"fi",
"fr",
"fy",
"gaa",
"gl",
"ka",
"de",
"el",
"kl",
"gn",
"gu",
"xx-hacker",
"ht",
"ha",
"haw",
"iw",
"he",
"hi",
"hu",
"is",
"ig",
"id",
"ia",
"ga",
"it",
"ja",
"jw",
"kn",
"kk",
"rw",
"rn",
"xx-klingon",
"kg",
"ko",
"kri",
"ku",
"ckb",
"ky",
"lo",
"la",
"lv",
"ln",
"lt",
"loz",
"lg",
"ach",
"mk",
"mg",
"ms",
"ml",
"mt",
"mv",
"mi",
"mr",
"mfe",
"mo",
"mn",
"sr-me",
"my",
"ne",
"pcm",
"nso",
"no",
"nn",
"oc",
"or",
"om",
"ps",
"fa",
"xx-pirate",
"pl",
"pt",
"pt-br",
"pt-pt",
"pa",
"qu",
"ro",
"rm",
"nyn",
"ru",
"gd",
"sr",
"sh",
"st",
"tn",
"crs",
"sn",
"sd",
"si",
"sk",
"sl",
"so",
"es",
"es-419",
"su",
"sw",
"sv",
"tg",
"ta",
"tt",
"te",
"th",
"ti",
"to",
"lua",
"tum",
"tr",
"tk",
"tw",
"ug",
"uk",
"ur",
"uz",
"vu",
"vi",
"cy",
"wo",
"xh",
"yi",
"yo",
"zu"
],
"description": "Parameter defines the language to use for the Google Flights search. It's a two-letter language code. (e.g., `en` for English, `es` for Spanish, or `fr` for French). Head to the Google languages page for a full list of supported Google languages.",
"group": "localization"
},
"currency": {
"type": "select",
"options": [
"ALL",
"DZD",
"ARS",
"AMD",
"AWG",
"AUD",
"AZN",
"BSD",
"BHD",
"BYN",
"BMD",
"BAM",
"BRL",
"GBP",
"BGN",
"XPF",
"CAD",
"CLP",
"CNY",
"COP",
"CRC",
"CUP",
"CZK",
"DKK",
"DOP",
"EGP",
"EUR",
"GEL",
"HKD",
"HUF",
"ISK",
"INR",
"IDR",
"IRR",
"ILS",
"JMD",
"JPY",
"JOD",
"KZT",
"KWD",
"LBP",
"MKD",
"MYR",
"MXN",
"MDL",
"MAD",
"TWD",
"NZD",
"NOK",
"OMR",
"PKR",
"PAB",
"PEN",
"PHP",
"PLN",
"QAR",
"RON",
"RUB",
"SAR",
"RSD",
"SGD",
"ZAR",
"KRW",
"SEK",
"CHF",
"THB",
"TRY",
"USD",
"UAH",
"AED",
"VND"
],
"description": "Parameter defines the currency of the returned prices. Default to `USD`. Head to the Google Travel Currencies page for a full list of supported currency codes.",
"group": "localization"
},
"type": {
"type": "select",
"options": [
[
"1",
"Round trip (default) - 1"
],
[
"2",
"One way - 2"
],
[
"3",
"Multi-city - 3"
]
],
"description": "Parameter defines the type of the flights. Available options: `1` - Round trip (default) `2` - One way `3` - Multi-city When this parameter is set to `3`, use multi\\_city\\_json to set the flight information. To obtain the returning flight information for Round Trip `(1)`, you need to make another request using a departure\\_token.",
"group": "advanced_google_flights_parameters"
},
"outbound_date": {
"description": "Parameter defines the outbound date. The format is YYYY-MM-DD. e.g. `2026-08-23`",
"group": "advanced_google_flights_parameters"
},
"return_date": {
"description": "Parameter defines the return date. The format is YYYY-MM-DD. e.g. `2026-08-29` Parameter is required if type parameter is set to: `1` (Round trip)",
"group": "advanced_google_flights_parameters"
},
"travel_class": {
"type": "select",
"options": [
[
1,
"Economy (default) - 1"
],
[
2,
"Premium economy - 2"
],
[
3,
"Business - 3"
],
[
4,
"First - 4"
]
],
"description": "Parameter defines the travel class. Available options: `1` - Economy (default) `2` - Premium economy `3` - Business `4` - First",
"group": "advanced_google_flights_parameters"
},
"multi_city_json": {
"description": "Parameter defines the flight information for multi-city flights. It's a JSON string containing multiple flight information objects. Each object should contain the following fields: `departure_id` - The departure airport code or location kgmid. The format is the same as the main departure\\_id parameter. `arrival_id` - The arrival airport code or location kgmid. The format is the same as the main arrival\\_id parameter. `date` - Flight date. The format is the same as the outbound\\_date parameter. `times` - Time range for the flight. The format is the same as the outbound\\_times parameter. This parameter is optional. Example: `[{\"departure_id\":\"CDG\",\"arrival_id\":\"NRT\",\"date\":\"2026-08-29\"},{\"departure_id\":\"NRT\",\"arrival_id\":\"LAX,SEA\",\"date\":\"2026-09-05\"},{\"departure_id\":\"LAX,SEA\",\"arrival_id\":\"AUS\",\"date\":\"2026-09-12\",\"times\":\"8,18,9,23\"}]` The example is a multi-city flight from `CDG` to `NRT` on `2026-08-29`, then from `NRT` to `LAX` or `SEA` on `2026-09-05`, and finally from `LAX` or `SEA` to `AUS` on `2026-09-12`. The last flight has a departure time range from 8:00 AM to 7:00 PM and an arrival time range from 9:00 AM to 12:00 AM (Midnight).",
"group": "advanced_google_flights_parameters"
},
"show_hidden": {
"type": "checkbox",
"description": "Set to `true` to include the hidden flight results. This is equivalent to clicking 'View more flights' on Google Flights. Default to `false`.",
"group": "advanced_google_flights_parameters"
},
"exclude_basic": {
"type": "checkbox",
"description": "Set to `true` to exclude basic results. Resulting fares will have free seat selection and carry on bags. Default to `false`. As of now, this filter only works for domestic flights in the US. Parameter can only be used when gl is`us` and travel\\_class is`1`",
"group": "advanced_google_flights_parameters"
},
"deep_search": {
"type": "checkbox",
"description": "Set to `true` to enable deep search, which may yield better results but with a longer response time. Deep search results are identical to those found on Google Flights pages in the browser. By default, this option is set to `false` for performance reasons.",
"group": "advanced_google_flights_parameters"
},
"adults": {
"type": "number",
"description": "Parameter defines the number of adults. Default to 1.",
"group": "number_of_passengers"
},
"children": {
"type": "number",
"description": "Parameter defines the number of children. Default to 0.",
"group": "number_of_passengers"
},
"infants_in_seat": {
"type": "number",
"description": "Parameter defines the number of infants in seat. Default to 0.",
"group": "number_of_passengers"
},
"infants_on_lap": {
"type": "number",
"description": "Parameter defines the number of infants on lap. Default to 0.",
"group": "number_of_passengers"
},
"sort_by": {
"type": "select",
"options": [
[
"1",
"Top flights (default) - 1"
],
[
"2",
"Price - 2"
],
[
"3",
"Departure time - 3"
],
[
"4",
"Arrival time - 4"
],
[
"5",
"Duration - 5"
],
[
"6",
"Emissions - 6"
]
],
"description": "Parameter defines the sorting order of the results. Available options: `1` - Top flights (default) `2` - Price `3` - Departure time `4` - Arrival time `5` - Duration `6` - Emissions",
"group": "sorting"
},
"stops": {
"type": "select",
"options": [
[
0,
"Any number of stops (default) - 0"
],
[
1,
"Nonstop only - 1"
],
[
2,
"1 stop or fewer - 2"
],
[
3,
"2 stops or fewer - 3"
]
],
"description": "Parameter defines the number of stops during the flight. Available options: `0` - Any number of stops (default) `1` - Nonstop only `2` - 1 stop or fewer `3` - 2 stops or fewer",
"group": "advanced_filters"
},
"exclude_airlines": {
"description": "Parameter defines the airline codes to be excluded. Split multiple airlines with comma. It can't be used together with `include_airlines`. Each airline code should be a 2-character IATA code consisting of either two uppercase letters or one uppercase letter and one digit. You can search for airline codes on IATA. For example, `UA` is United Airlines. Additionally, alliances can be also included here: `STAR_ALLIANCE` - Star Alliance `SKYTEAM` - SkyTeam `ONEWORLD` - Oneworld exclude\\_airlines and include\\_airlines parameters can't be used together.",
"group": "advanced_filters"
},
"include_airlines": {
"description": "Parameter defines the airline codes to be included. Split multiple airlines with comma. It can't be used together with `exclude_airlines`. Each airline code should be a 2-character IATA code consisting of either two uppercase letters or one uppercase letter and one digit. You can search for airline codes on IATA. For example, `UA` is United Airlines. Additionally, alliances can be also included here: `STAR_ALLIANCE` - Star Alliance `SKYTEAM` - SkyTeam `ONEWORLD` - Oneworld exclude\\_airlines and include\\_airlines parameters can't be used together.",
"group": "advanced_filters"
},
"bags": {
"type": "number",
"description": "Parameter defines the number of carry-on bags. Default to `0`. Parameter should not exceed the total number of passengers with carry-on bag allowance (adults, children and infants\\_in\\_seat).",
"group": "advanced_filters"
},
"max_price": {
"type": "number",
"description": "Parameter defines the maximum ticket price. Default to unlimited.",
"group": "advanced_filters"
},
"outbound_times": {
"description": "Parameter defines the outbound times range. It's a string containing two (for departure only) or four (for departure and arrival) comma-separated numbers. Each number represents the beginning of an hour. For example: `4,18`: 4:00 AM - 7:00 PM departure `0,18`: 12:00 AM - 7:00 PM departure `19,23`: 7:00 PM - 12:00 AM departure `4,18,3,19`: 4:00 AM - 7:00 PM departure, 3:00 AM - 8:00 PM arrival `0,23,3,19`: unrestricted departure, 3:00 AM - 8:00 PM arrival",
"group": "advanced_filters"
},
"return_times": {
"description": "Parameter defines the return times range. It's a string containing two (for departure only) or four (for departure and arrival) comma-separated numbers. Each number represents the beginning of an hour. For example: `4,18`: 4:00 AM - 7:00 PM departure `0,18`: 12:00 AM - 7:00 PM departure `19,23`: 7:00 PM - 12:00 AM departure `4,18,3,19`: 4:00 AM - 7:00 PM departure, 3:00 AM - 8:00 PM arrival `0,23,3,19`: unrestricted departure, 3:00 AM - 8:00 PM arrival Parameter should only be used when type parameter is set to: `1` (Round trip)",
"group": "advanced_filters"
},
"emissions": {
"type": "select",
"options": [
[
1,
"Less emissions only - 1"
]
],
"description": "Parameter defines the emission level of the flight. Available options: `1` - Less emissions only",
"group": "advanced_filters"
},
"layover_duration": {
"description": "Parameter defines the layover duration, in minutes. It's a string containing two comma-separated numbers. For example, specify `90,330` for 1 hr 30 min - 5 hr 30 min.",
"group": "advanced_filters"
},
"exclude_conns": {
"description": "Parameter defines the connecting airport codes to be excluded. An airport ID is an uppercase 3-letter code. You can search for it on Google Flights or IATA. For example, `CDG` is Paris Charles de Gaulle Airport and `AUS` is Austin-Bergstrom International Airport. You can also combine multiple Airports by joining them with a comma (`value` + `,` + `value`; eg: `CDG,AUS`).",
"group": "advanced_filters"
},
"max_duration": {
"type": "number",
"description": "Parameter defines the maximum flight duration, in minutes. For example, specify `1500` for 25 hours. If your search returns no results, try increasing your max\\_duration by up to `200` minutes to account for route-specific scheduling variances.",
"group": "advanced_filters"
},
"selected_flights_json": {
"description": "Parameter pins the itinerary to specific flights, segment by segment. It's a JSON object with an `outbound` key (required) and a `return` key (required for round-trip, forbidden for one-way). Each value is an ordered array of flight segment objects, each containing: `flight_number` - IATA flight number (2-character airline code + 1–4 digits, e.g. `BA591`). `departure_id` - 3-letter IATA airport code for that segment's departure. `arrival_id` - 3-letter IATA airport code for that segment's arrival. `date` - Departure date of that segment, `YYYY-MM-DD`. Within a leg, each segment's `departure_id` must equal the previous segment's `arrival_id`, and dates must be non-decreasing. Example (round-trip `MXP → LHR → MAD` outbound, `MAD → MXP` nonstop return): `{\"outbound\":[{\"flight_number\":\"BA591\",\"departure_id\":\"MXP\",\"arrival_id\":\"LHR\",\"date\":\"2026-08-23\"},{\"flight_number\":\"BA460\",\"departure_id\":\"LHR\",\"arrival_id\":\"MAD\",\"date\":\"2026-08-23\"}],\"return\":[{\"flight_number\":\"IB675\",\"departure_id\":\"MAD\",\"arrival_id\":\"MXP\",\"date\":\"2026-08-29\"}]}` When this parameter is provided, the top-level departure\\_id, arrival\\_id, outbound\\_date and return\\_date are optional and derived from the first/last segments of each leg. If supplied, they must match. Cannot be used together with departure\\_token, booking\\_token, or multi\\_city\\_json (`type` = 3).",
"group": "selected_flights"
},
"departure_token": {
"description": "Parameter is used to select the flight and get returning flights (for Round trip) or flights for the next leg of itinerary (for Multi-city). Find this token in the departure flight results. It cannot be used together with booking\\_token.",
"group": "next_flights"
},
"booking_token": {
"description": "Parameter is used to get booking options for the selected flights. Find this token in the flight results. It cannot be used together with departure\\_token. When using this token, parameters related to date and parameters inside \"Advanced Filters\" section won't affect the result.",
"group": "booking_flights"
}
},
"common_params": {
"engine": {
"required": true,
"description": "Set parameter to `google_flights` to use the Google Flights API engine.",
"group": "serpapi_parameters"
},
"no_cache": {
"type": "checkbox",
"description": "Parameter will force SerpApi to fetch the Google Flights results even if a cached version is already present. A cache is served only if the query and all parameters are exactly the same. Cache expires after 1h. Cached searches are free, and are not counted towards your searches per month. It can be set to `false` (default) to allow results from the cache, or `true` to disallow results from the cache. no\\_cache and async parameters should not be used together.",
"group": "serpapi_parameters"
},
"async": {
"description": "Parameter defines the way you want to submit your search to SerpApi. It can be set to `false` (default) to open an HTTP connection and keep it open until you got your search results, or `true` to just submit your search to SerpApi and retrieve them later. In this case, you'll need to use our Searches Archive API to retrieve your results. async and no\\_cache parameters should not be used together. async should not be used on accounts with Ludicrous Speed enabled.",
"group": "serpapi_parameters"
},
"zero_trace": {
"description": "Enterprise only. Parameter enables ZeroTrace mode. It can be set to `false` (default) or `true`. Enable this mode to skip storing search parameters, search files, and search metadata on our servers. This may make debugging more difficult.",
"group": "serpapi_parameters"
},
"api_key": {
"required": true,
"description": "Parameter defines the SerpApi private key to use.",
"group": "serpapi_parameters"
},
"output": {
"description": "Parameter defines the format of the result. It can be set to `json` (default) to get a structured JSON of the results, `html` to get the raw HTML retrieved, or `md` to get a markdown-formatted version optimized for LLMs and AI agents.",
"group": "serpapi_parameters"
},
"json_restrictor": {
"description": "Parameter defines the fields you want to include in the output, reducing payload size for faster response. See the JSON Restrictor documentation for more details.",
"group": "serpapi_parameters"
}
}
}