Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.22.0] - 2026-07-23

### Added

- **Google Flights `sort_by`** — `client.google.flights.search(..., sort_by="price")` now returns the FULL price-sorted inventory (every carrier, the cheap long-layover fares) plus Google's own price floor, typical range, and price history, instead of only the ~6-8 "best" preview. Default `sort_by="top"` keeps the fast best-picks behaviour. (SCR-123)

## [0.21.0] - 2026-07-17

### Added
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "scrapebadger"
version = "0.21.0"
version = "0.22.0"
description = "Official Python SDK for ScrapeBadger - Async web scraping APIs for Twitter and more"
readme = "README.md"
license = { text = "MIT" }
Expand Down
2 changes: 1 addition & 1 deletion src/scrapebadger/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -863,7 +863,7 @@ async def main():
ZestimateHistoryPoint as ZillowZestimateHistoryPoint,
)

__version__ = "0.21.0"
__version__ = "0.22.0"

__all__ = [
# TikTok core models
Expand Down
2 changes: 1 addition & 1 deletion src/scrapebadger/_internal/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
T = TypeVar("T")

# User agent for SDK requests
SDK_VERSION = "0.20.0"
SDK_VERSION = "0.22.0"
USER_AGENT = f"scrapebadger-python/{SDK_VERSION}"


Expand Down
9 changes: 9 additions & 0 deletions src/scrapebadger/google/flights.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
TripType = Literal["round_trip", "one_way", "multi_city"]
TravelClass = Literal["economy", "premium_economy", "business", "first"]
StopsFilter = Literal["any", "nonstop", "one_stop", "two_stops"]
SortBy = Literal["top", "price"]


class FlightsClient:
Expand Down Expand Up @@ -60,6 +61,7 @@ async def search(
hl: str = "en",
stops: StopsFilter = "any",
max_price: int | None = None,
sort_by: SortBy = "top",
) -> dict[str, Any]:
"""Search Google Flights for available itineraries.

Expand All @@ -80,6 +82,12 @@ async def search(
hl: Language code.
stops: Max stops filter.
max_price: Upper price filter.
sort_by: "top" (default) returns Google's ~6-8 "best" picks
(fast). "price" returns the FULL price-sorted inventory
(every carrier, the cheap long-layover fares) plus Google's
own price floor, typical range, and price history — slower,
and falls back to the "top" set under load. Round-trip
initial search only.

Returns:
Response with `best_flights[]`, `other_flights[]`,
Expand All @@ -99,6 +107,7 @@ async def search(
"gl": gl,
"hl": hl,
"stops": stops,
"sort_by": sort_by,
}
if return_date is not None:
params["return_date"] = return_date
Expand Down
2 changes: 1 addition & 1 deletion uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading