From 8665b8410427a2c9c3fa6f04ae5b43d8886cec86 Mon Sep 17 00:00:00 2001 From: kasparasizi1 <132673909+kasparasizi1@users.noreply.github.com> Date: Wed, 25 Nov 2026 23:09:10 +0200 Subject: [PATCH] Google Maps: place/photos docs match the API (0.82.1) (SCR-711) place() lists the hours fields, price_level (Google's price per person), thumbnail/image and a null service_options. photos() returns one page of the photos Google exposes, and total_results is Google's count. The old text promised photo categories, category_id and page_size, which the API never supported. No code or signature changes. Co-Authored-By: Claude Opus 5.5 --- CHANGELOG.md | 5 +++++ pyproject.toml | 2 +- src/scrapebadger/__init__.py | 2 +- src/scrapebadger/_internal/client.py | 2 +- src/scrapebadger/google/maps.py | 30 +++++++++++++++------------- uv.lock | 2 +- 6 files changed, 25 insertions(+), 18 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f8881b6..5ea1437 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +## [0.82.1] - 2026-11-25 + +### Changed +- **Google Maps docstrings (SCR-711).** `google.maps.place()` and `google.maps.photos()` now describe what the API returns. Place details carry opening hours (`open_state`, `hours`, `operating_hours`), `price_level` (Google's price per person), and `thumbnail`/`image`; `service_options` is None. Photos are one page, usually the first 8 that Google exposes, and `pagination.total_results` is the place's total photo count on Google. `category_id`, `next_page_token` and `page_size` are kept for compatibility but have no effect: the API never supported them. No signature changes. + ## [0.82.0] - 2026-11-23 ### Added diff --git a/pyproject.toml b/pyproject.toml index cda700b..9fb201a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "scrapebadger" -version = "0.82.0" +version = "0.82.1" description = "Official Python SDK for ScrapeBadger - Async web scraping APIs for Twitter and more" readme = "README.md" license = { text = "MIT" } diff --git a/src/scrapebadger/__init__.py b/src/scrapebadger/__init__.py index 209327a..e96b1d2 100644 --- a/src/scrapebadger/__init__.py +++ b/src/scrapebadger/__init__.py @@ -1356,7 +1356,7 @@ async def main(): ZestimateHistoryPoint as ZillowZestimateHistoryPoint, ) -__version__ = "0.82.0" +__version__ = "0.82.1" __all__ = [ # TikTok core models diff --git a/src/scrapebadger/_internal/client.py b/src/scrapebadger/_internal/client.py index 40e4fe8..e228618 100644 --- a/src/scrapebadger/_internal/client.py +++ b/src/scrapebadger/_internal/client.py @@ -56,7 +56,7 @@ T = TypeVar("T") # User agent for SDK requests -SDK_VERSION = "0.82.0" +SDK_VERSION = "0.82.1" USER_AGENT = f"scrapebadger-python/{SDK_VERSION}" diff --git a/src/scrapebadger/google/maps.py b/src/scrapebadger/google/maps.py index 7e4b5c9..28f9260 100644 --- a/src/scrapebadger/google/maps.py +++ b/src/scrapebadger/google/maps.py @@ -104,10 +104,13 @@ async def place( """Get full place detail by ``place_id`` or ``data_id``. Returns title, address, phone, website, GPS, rating, reviews_count, - rating_summary (per-star distribution), categories, extensions - (service_options, accessibility, offerings, payments, etc.), - weekly operating hours, popular_times graph (per-weekday busyness), - provider_id, permanently_closed flag, thumbnail, and photo list. + categories, extensions (amenity groups such as accessibility), + opening hours (``open_state``, today's ``hours``, and + ``operating_hours`` for the coming seven days), ``price_level`` + (Google's price per person, e.g. "฿2,000+"), popular_times, + provider_id, ``thumbnail``/``image``, and up to 20 photo URLs. + ``service_options`` is None: Google no longer exposes those flags + to signed-out clients. At least one of ``place_id`` or ``data_id`` must be provided. """ @@ -175,21 +178,20 @@ async def photos( ) -> dict[str, Any]: """Get photos for a place. - Returns place-specific photo categories (Menu, Vibe, Comfort food, - individual dish names, etc.), photo URLs from all CDN families - (``/p/AF1Qip*``, ``/gps-cs-s/*``, ``/gps-proxy/*``), the total - photo count, and a pagination token. + Returns the photos Google exposes to signed-out clients (usually + the first 8 of the gallery) as ``thumbnail`` and ``image`` URLs. + ``pagination.total_results`` is the place's total photo count on + Google. There is one page (``pagination.next`` is None). To get + another size, replace a URL's ``=w..-h..-k-no`` suffix and keep + its path. Args: data_id: Google Maps data ID (``0x...:0x...``). hl: Language code. gl: Country code. - category_id: Filter by category ID from - ``response.categories[].id`` (e.g. Menu, Vibe). - next_page_token: Pagination token from previous - ``response.pagination.next``. - page_size: Photos per page (1-200). Use 200 to fetch all - photos in a single call for places with <~120 photos. + category_id: Accepted for compatibility; has no effect. + next_page_token: Accepted for compatibility; has no effect. + page_size: Accepted for compatibility; has no effect. """ params: dict[str, Any] = {"data_id": data_id, "hl": hl, "gl": gl, "page_size": page_size} if category_id: diff --git a/uv.lock b/uv.lock index c5e2f8d..84946d6 100644 --- a/uv.lock +++ b/uv.lock @@ -930,7 +930,7 @@ wheels = [ [[package]] name = "scrapebadger" -version = "0.82.0" +version = "0.82.1" source = { editable = "." } dependencies = [ { name = "httpx" },