Skip to main content

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.

There is a free tier, and it has no ceiling. The krill model is free and unlimited under fair use — no card, no credits, nothing to decrement. It returns the shortest set of sentences that still answers (about 700 tokens a search, roughly half what the usual alternatives send), one request at a time, at low priority. Use it to build; switch one word to mako when you need depth and steady latency.

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

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

langchain_serpdive-0.2.0.tar.gz (6.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

langchain_serpdive-0.2.0-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

Details for the file langchain_serpdive-0.2.0.tar.gz.

File metadata

  • Download URL: langchain_serpdive-0.2.0.tar.gz
  • Upload date:
  • Size: 6.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for langchain_serpdive-0.2.0.tar.gz
Algorithm Hash digest
SHA256 0d530eb1a7d72908f3649199f950fbf001d2fac0b9ce4843ab262c34accc9a4e
MD5 070d4a9de612ae690919c36e24702bf4
BLAKE2b-256 c7c9c45ca6d4d2e0bd23f183acf78f55964cf98014bd3daf66d56105bbcf4be2

See more details on using hashes here.

Provenance

The following attestation bundles were made for langchain_serpdive-0.2.0.tar.gz:

Publisher: publish.yml on serpdive/langchain-serpdive

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file langchain_serpdive-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for langchain_serpdive-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b5013227db18994eebcb8af285dea313486b6867fabbac36c3f5f2034b892eab
MD5 0ec709f5dba0a9aa05951dccd7ff8168
BLAKE2b-256 f7bb948b66480e90534c34dc49731a4386e1e4799c9c30c46881f2179a7bd79f

See more details on using hashes here.

Provenance

The following attestation bundles were made for langchain_serpdive-0.2.0-py3-none-any.whl:

Publisher: publish.yml on serpdive/langchain-serpdive

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page