Skip to content

Related to [SCR-44]: Add support for remaining ScrapingBee APIs#20

Open
sahilsunny wants to merge 8 commits into
mainfrom
add-remaining-apis
Open

Related to [SCR-44]: Add support for remaining ScrapingBee APIs#20
sahilsunny wants to merge 8 commits into
mainfrom
add-remaining-apis

Conversation

@sahilsunny

@sahilsunny sahilsunny commented Jan 5, 2026

Copy link
Copy Markdown

Summary

  • Add a unified html_api() method for HTML API requests and deprecate legacy get() / post() methods for removal in version 3.0.0.
  • Add dedicated methods for Google Search, Fast Search, Amazon Search, Amazon Product, Amazon Pricing, Walmart Search, Walmart Product, YouTube Search, YouTube Metadata, YouTube Subtitles, ChatGPT, Gemini, and Usage APIs.
  • Align YouTube support with the current documentation by replacing the obsolete Transcript and Trainability helpers with Subtitles.
  • Refactor the internal request method to support all API endpoints and update SDK documentation, unit tests, and manual tests.

Compatibility

  • Require Python 3.10 or newer and test Python 3.10 through 3.14.
  • Correct optional parameter annotations using dict | None and int | None.
  • Use typing_extensions.deprecated for legacy method warnings.
  • Refresh development dependencies for Python 3.14 compatibility while allowing patch updates.

Test plan

  • Flake8 passes.
  • All 49 unit tests pass.
  • Dependency installation and test workflow verified across Python 3.10–3.14.

Notes

  • Migration from query-string API keys to Bearer authentication is intentionally deferred to a separate pull request.

- Changed the request method such that it can work with all of our APIs
- Added all APIs. Now it supports HTML API, Google Search API, Amazon Search API, Amazon Product API, Walmart Search API, Walmart Product API, ChatGPT API, YouTube Search API, YouTube Metadata API, YouTube Trainability API, YouTube Transcript API
- Added a method to call our usage endpoint
- Create a new method for accessing our HTML API. So that in future, we can deprecate the get and post methods.
Fixed lint issue due to incorrect spacing
@kirby81 kirby81 added the enhancement New feature or request label Jan 22, 2026

@kirby81 kirby81 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please try to use the correct typing, especially for optional parameters. Also, I think we should now drop support for Python versions prior to 3.10, based on this: https://devguide.python.org/versions/#versions and adapt the test workflow matrix.

Comment thread scrapingbee/client.py Outdated
Comment thread scrapingbee/client.py Outdated
Comment thread scrapingbee/client.py Outdated
Comment thread scrapingbee/client.py Outdated
Comment thread scrapingbee/client.py Outdated
Update ScrapingBeeClient method signatures in scrapingbee/client.py to use PEP 604 union types (e.g. `dict | None` and `int | None`) instead of bare `dict = None` / `int = None`. This clarifies optional parameter typing for modern type checkers and requires Python 3.10+; changes touch request, get, post, html_api and several API helper methods (Google, Amazon, Walmart, YouTube, ChatGPT, usage, etc.).
Align package metadata and CI with the 3.10+ requirement needed for PEP 604 union typing.
Add the latest documented endpoints, remove obsolete YouTube APIs, and update supported Python tooling and documentation so the SDK matches the current public API surface.
@sahilsunny sahilsunny changed the title Related to [SCR-44]: Add support for multiple ScrapingBee APIs (Google, Amazon, Walmart, YouTube, ChatGPT) + Usage endpoint Related to [SCR-44]: Add support for remaining ScrapingBee APIs Jul 16, 2026
Resolve the CI workflow conflict by adopting the split test/publish workflows from main and keeping the Python 3.10–3.14 test matrix.
Switch echo endpoints away from flaky httpbin.org so manual verification of the HTML API is more reliable without masking response failures.
@sahilsunny
sahilsunny requested a review from kirby81 July 16, 2026 10:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants