Skip to main content

LlamaIndex tool 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

llama-index-tools-serpdive

The official LlamaIndex tool for SERPdive, the AI Search API: your agent asks a question, the tool returns Documents whose text is answer-ready web content, 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 llama-index-tools-serpdive

Get a free API key (no card required) at serpdive.com/dashboard/keys and set it:

export SERPDIVE_API_KEY="sd_live_..."

Use directly

from llama_index_tools_serpdive import SerpdiveToolSpec

spec = SerpdiveToolSpec()
documents = spec.serpdive_search("latest developments in solid state batteries")
# each Document: text = extracted page content; metadata = {url, title, date}

Use in an agent

from llama_index.core.agent.workflow import FunctionAgent
from llama_index.llms.anthropic import Anthropic
from llama_index_tools_serpdive import SerpdiveToolSpec

agent = FunctionAgent(
    tools=SerpdiveToolSpec().to_tool_list(),
    llm=Anthropic(model="claude-sonnet-5"),
)
await agent.run("What changed in the EU AI Act this month?")

Options

SerpdiveToolSpec(
    model="moby",     # "mako" (default): key sentences, fast. "moby": full page text, deep research
    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. 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

llama_index_tools_serpdive-0.1.0.tar.gz (4.7 kB view details)

Uploaded Source

Built Distribution

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

llama_index_tools_serpdive-0.1.0-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

Details for the file llama_index_tools_serpdive-0.1.0.tar.gz.

File metadata

File hashes

Hashes for llama_index_tools_serpdive-0.1.0.tar.gz
Algorithm Hash digest
SHA256 931358d79a976d56533ba9d6c0392f7cc4ce245e580c00b4aaae71fd78c251b5
MD5 bef2c76db7333759b925b80642471330
BLAKE2b-256 f9886cbe0264de38f362260b0ff90e7559fb6e52ff0669f215fc120569a7afa6

See more details on using hashes here.

Provenance

The following attestation bundles were made for llama_index_tools_serpdive-0.1.0.tar.gz:

Publisher: publish.yml on serpdive/llama-index-tools-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 llama_index_tools_serpdive-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for llama_index_tools_serpdive-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1e047f289a48b156ac76a6f986472906a86c73c72194fa18567a8cf6eb6737e8
MD5 b21ca89957a2cf712a6461157c210266
BLAKE2b-256 756a1cc0540a74536d1ec6e9e43e8e2d679e9a25cbbad8b3c8eef5bddffbe257

See more details on using hashes here.

Provenance

The following attestation bundles were made for llama_index_tools_serpdive-0.1.0-py3-none-any.whl:

Publisher: publish.yml on serpdive/llama-index-tools-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