Skip to content

feat(google): document the condensed Light Search response (0.89.0, SCR-774) - #118

Merged
0xGhostCasper merged 2 commits into
mainfrom
kasparasizi1/scr-774-light-phone
Dec 3, 2026
Merged

0xGhostCasper merged 2 commits into
mainfrom
kasparasizi1/scr-774-light-phone

Conversation

@0xGhostCasper

@0xGhostCasper 0xGhostCasper commented Dec 3, 2026 •

Copy link
Copy Markdown
Member

Google Light Search now returns each organic result's own URL and a smaller response (API: scrape-badger/scrapebadger#3741). This updates the Python SDK to match. Node SDK: scrape-badger/scrapebadger-node#108.

What changed

  • google.search.light() already calls GET /v1/google/light/search. Its docstring now describes the new response: search_parameters, search_metadata, search_information (query_displayed, url), organic_results (position, title, link, displayed_link, snippet, rank, page_rank) and pagination (current). Fields without a value are left out. It also covers the 422s (tbm, udm other than 14/web, ludocid, lsig, kgmid, ibp, uds) and the 503 with Retry-After: 1 (not billed).
  • resolve() docstring: only search() results carry link_token. Light results need no resolving.
  • docs/google.md: a new "Light Search" section, a methods-table row, and the link-resolving text now covers search() only.
  • Fix: get_raw() (used by output="html") sent every unset parameter as an empty value (lat=, tbm=, ...). It now leaves out None values, as JSON requests already did.
  • Tests: light() calls /v1/google/light/search with exactly its parameters, for JSON and HTML, and returns the condensed answer as is.
  • Version 0.89.0 and a CHANGELOG entry that lists the fields removed from the Light response.

No public method signature changed. light() matches the monorepo surface lock (sdk/codegen/facade/python-v1-surface.json) exactly.

Checks

  • ruff check, ruff format --check, mypy src/: pass
  • pytest --ignore=tests/e2e: all pass

Release is a separate step; nothing is published from this PR.

🤖 Generated with Claude Code

…CR-774)

GET /v1/google/light/search now returns each organic result's own URL in
`link` and a smaller response with no null fields
(scrape-badger/scrapebadger#3741). light() already calls that endpoint;
this brings what the SDK says about it in line and tests the request.

- light() docstring: the new response shape, the 422s for tbm / udm /
  ludocid / lsig / kgmid / ibp / uds, the 503 with Retry-After: 1 (not
  billed), and device / user_agent being echoed only. Signature unchanged.
- resolve() docstring: only search() results carry link_token.
- docs/google.md: a "Light Search" section, a methods-table row, and the
  link-resolving text limited to search().
- get_raw() leaves out None params, as JSON requests already did:
  output="html" sent every unset parameter as an empty value (lat=,
  tbm=, ...).
- Tests: light() calls /v1/google/light/search with exactly its params,
  for JSON and HTML, and returns the condensed answer as is.
- Version 0.89.0 and a CHANGELOG entry.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@codecov

codecov Bot commented Dec 3, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

The `if params:` guard left a branch no caller takes (both callers pass
params), which codecov/patch counted as a partial line.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@0xGhostCasper
0xGhostCasper merged commit 657fb3b into main Dec 3, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants