Skip to content

feat: support configurable Serper base URL - #1167

Open
litescraper wants to merge 1 commit into
ScrapeGraphAI:pre/betafrom
litescraper:feat/serper-base-url
Open

litescraper wants to merge 1 commit into
ScrapeGraphAI:pre/betafrom
litescraper:feat/serper-base-url

Conversation

@litescraper

Copy link
Copy Markdown

Summary

Allow users to point the existing Serper web-search integration at any Serper.dev-compatible endpoint (like litescrape.com, serpbase.dev, serpensapi.org, and others). This lets users choose another search provider or route requests through their own proxy without modifying the source.

Set SERPER_BASE_URL to the provider’s base URL, without /search, and SERPER_API_KEY to a key issued by that provider. The integration removes trailing slashes and appends /search, while retaining the existing authentication, request payload, and result parsing.

For example:

SERPER_BASE_URL=https://api.litescrape.com
SERPER_API_KEY=<your-provider-api-key>

When SERPER_BASE_URL is unset or empty, requests continue to use https://google.serper.dev/search.

The change adds the optional environment setting and documents its usage. No new dependencies are required.

Validation

  • Focused Ruff, Black, and isort checks passed.
  • Actual search helper HTTP checks passed against a local endpoint and the live Litescrape endpoint.
  • Existing research-web suite: 2 passed, 2 failed. Both failures also occur on the unmodified base: stale Google-engine coverage and an exception expectation.
  • No tests added.

This branch has not been deployed

No deployments
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.

1 participant