LangChain integration for SERPdive, the AI Search API and Tavily alternative: answer-ready web content for agents, same speed, 20.2% fewer tokens, higher answer quality (60.7% of decided duels) on a public benchmark
Project description
langchain-serpdive
The official LangChain integration for SERPdive, the AI Search API: your agent asks a question, the tool returns answer-ready web content that is extracted, cleaned, and sized for an LLM. On a public, replayable 1,000-question benchmark, SERPdive runs at the same speed as Tavily, feeds your LLM 20.2% fewer tokens, and wins 60.7% of decided quality duels.
Install
pip install langchain-serpdive
Get a free API key (no card required) at serpdive.com/dashboard/keys and set it:
export SERPDIVE_API_KEY="sd_live_..."
Use as a tool
from langchain_serpdive import SerpdiveSearch
tool = SerpdiveSearch()
tool.invoke({"query": "latest developments in solid state batteries"})
The output is a lean dict your model can quote and cite directly:
{
"query": "latest developments in solid state batteries",
"results": [
{
"url": "https://...",
"title": "...",
"date": "2026-07-11",
"content": "The fact-carrying text of the page, extracted and cleaned...",
},
...
],
}
Use in an agent
from langchain.chat_models import init_chat_model
from langgraph.prebuilt import create_react_agent
from langchain_serpdive import SerpdiveSearch
agent = create_react_agent(
init_chat_model("claude-sonnet-5"),
tools=[SerpdiveSearch()],
)
agent.invoke({"messages": [("user", "What changed in the EU AI Act this month?")]})
Options
SerpdiveSearch(
model="moby", # "mako" (default): key sentences, fast. "moby": full page text, deep research
answer=True, # also return a direct answer synthesized from the sources
max_results=5, # hard cap on delivered results, 1-10
api_key="sd_live_...", # defaults to SERPDIVE_API_KEY
)
Localization is automatic: the language of the query picks where we search. There is no country parameter to configure. Failed searches are never billed.
Links
- API reference
- Public benchmark (replayable end to end: same questions, same judge, your machine)
- Python SDK (this package is a thin layer over it)
- MCP server for Claude, Cursor and other MCP clients
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file langchain_serpdive-0.1.0.tar.gz.
File metadata
- Download URL: langchain_serpdive-0.1.0.tar.gz
- Upload date:
- Size: 5.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
10e9e1c2937c0ee7185bc3b24ee6bbf588ccaf4eca20d2af177a646d726c5109
|
|
| MD5 |
91445f60a3f37762702afb1565e38826
|
|
| BLAKE2b-256 |
cb4cf632cc99bd9b65e6e16cc27d5c9bbcb9fe2b6382e843a4a9ba547c07c650
|
Provenance
The following attestation bundles were made for langchain_serpdive-0.1.0.tar.gz:
Publisher:
publish.yml on serpdive/langchain-serpdive
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
langchain_serpdive-0.1.0.tar.gz -
Subject digest:
10e9e1c2937c0ee7185bc3b24ee6bbf588ccaf4eca20d2af177a646d726c5109 - Sigstore transparency entry: 2195650824
- Sigstore integration time:
-
Permalink:
serpdive/langchain-serpdive@ede3cd0e33df62d15afc32fa33d4a98d195ad7a3 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/serpdive
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@ede3cd0e33df62d15afc32fa33d4a98d195ad7a3 -
Trigger Event:
push
-
Statement type:
File details
Details for the file langchain_serpdive-0.1.0-py3-none-any.whl.
File metadata
- Download URL: langchain_serpdive-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
68cdb03d9c45fd5cc97a58d54721eec0e22fe0f1e5f08c9de38a2c0a77b0204a
|
|
| MD5 |
82d1ec5d73a5d2b567f3453503a09665
|
|
| BLAKE2b-256 |
c6e02f145943fb2e2d8ef04da5e056a7e44e5f74588a43f85191df463c59aae5
|
Provenance
The following attestation bundles were made for langchain_serpdive-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on serpdive/langchain-serpdive
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
langchain_serpdive-0.1.0-py3-none-any.whl -
Subject digest:
68cdb03d9c45fd5cc97a58d54721eec0e22fe0f1e5f08c9de38a2c0a77b0204a - Sigstore transparency entry: 2195650830
- Sigstore integration time:
-
Permalink:
serpdive/langchain-serpdive@ede3cd0e33df62d15afc32fa33d4a98d195ad7a3 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/serpdive
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@ede3cd0e33df62d15afc32fa33d4a98d195ad7a3 -
Trigger Event:
push
-
Statement type: