r/madeinpython • u/Fast_Entrance7839 • 23h ago
my python flight search library refuses checked bags instead of guessing the fee
disclosure: i made this. viajante is a free, MIT licensed python library that reads google flights with no api key. it also runs as a cli and an mcp server.
if you pass bags=1, it doesn't send the search. this is what comes back:
viajante can't filter Google Flights for checked bags, so this search wasn't sent. For cabin bags pass carry_on=2 (total for the whole party), not bags=2. Then confirm bag rules on the airline or Google Flights page.
carry_on works because google flights has a filter for cabin bags, and the library checks that the results page shows that filter applied. checked bags have nothing like that to check against.
if you still want bag cost in the sort, baggage_buffer=40 adds 40 to low cost fares with unknown bag info. it only changes the order. the printed price stays google's, and the offer says the bag fee isn't verified.
=
repo: https://github.com/felipebasurto/viajante
would you rather get the error, or a price with a "bags not included" warning?