Skip to content
Open
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
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -258,3 +258,6 @@ ScrapeGraphAI is licensed under the MIT License. See the [LICENSE](https://githu
Made with ❤️ by [ScrapeGraph AI](https://scrapegraphai.com)

[Scarf tracking](https://static.scarf.sh/a.png?x-pxid=102d4b8c-cd6a-4b9e-9a16-d6d141b9212d)


Support any Serper.dev-compatible endpoint (like litescrape.com, serpbase.dev, serpensapi.org, and others). Set `SERPER_BASE_URL` to the provider base URL (without `/search`) and `SERPER_API_KEY` to a key issued by that provider. The default base URL is `https://google.serper.dev`.
4 changes: 3 additions & 1 deletion scrapegraphai/utils/research_web.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
error handling, validation, and security features.
"""

import os
import random
import re
import time
Expand Down Expand Up @@ -394,7 +395,8 @@ def _search_serper(

try:
response = requests.post(
"https://google.serper.dev/search",
(os.getenv("SERPER_BASE_URL") or "https://google.serper.dev").rstrip("/")
+ "/search",
json=data,
headers=headers,
timeout=timeout,
Expand Down