Skip to main content

LlamaIndex tools integration for SERPEX - Multi-engine web search API

Project description

LlamaIndex Tools Integration: SERPEX

This tool allows you to use SERPEX API to search the web and get real-time results from multiple search engines within your LlamaIndex application.

Installation

pip install llama-index-tools-serpex

Usage

from llama_index.tools.serpex import SerpexToolSpec
from llama_index.agent.openai import OpenAIAgent

# Initialize the tool
serpex_tool = SerpexToolSpec(api_key="your_serpex_api_key")

# Create agent with the tool
agent = OpenAIAgent.from_tools(serpex_tool.to_tool_list(), verbose=True)

# Use the agent
response = agent.chat("What are the latest AI developments?")
print(response)

Advanced Usage

# Use specific search engine
serpex_tool = SerpexToolSpec(
    api_key="your_api_key",
    engine="google",  # or 'bing', 'duckduckgo', 'brave', etc.
)

# Search with time filter
results = serpex_tool.search(
    "recent AI news",
    num_results=10,
    time_range="day",  # 'day', 'week', 'month', 'year'
)

# Use different engines for different queries
results = serpex_tool.search(
    "privacy tools", engine="duckduckgo", num_results=5
)

API Key

Get your API key from SERPEX Dashboard.

Set as environment variable:

export SERPEX_API_KEY=your_api_key

Features

  • Multiple Search Engines: Auto-routing, Google, Bing, DuckDuckGo, Brave, Yahoo, Yandex
  • Real-time Results: Get up-to-date search results via API
  • Time Filtering: Filter by day, week, month, or year
  • Fast & Reliable: 99.9% uptime SLA with global proxy network
  • Structured Data: Clean JSON responses optimized for AI applications
  • Cost Effective: Only 1 credit per request, failed requests free

Search Engines

  • auto - Automatically routes to the best available engine (default)
  • google - Google Search
  • bing - Microsoft Bing
  • duckduckgo - Privacy-focused DuckDuckGo
  • brave - Brave Search
  • yahoo - Yahoo Search
  • yandex - Yandex Search

Links

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_serpex-0.2.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_serpex-0.2.0-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: llama_index_tools_serpex-0.2.0.tar.gz
  • Upload date:
  • Size: 4.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for llama_index_tools_serpex-0.2.0.tar.gz
Algorithm Hash digest
SHA256 c97bdc58c8ec216240c8795a6a87240c5a856feb476e454d2bac08372e860f0a
MD5 b1faf0b229a4ac29e7c71ed9dabad2d8
BLAKE2b-256 e779fea00317df6270c0ed7495d0c9abef48690be549e636b246bdaa46b5d065

See more details on using hashes here.

File details

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

File metadata

  • Download URL: llama_index_tools_serpex-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 5.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for llama_index_tools_serpex-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 21bdce9e7e0c75d34a3eca351d5af66724e8f27e3f902b1a6d226dd743428d34
MD5 080d61437699f101ba482d0cb3c1d21f
BLAKE2b-256 e740c7d523fe7682f5a67ae11fef40df0de5bcb4d4ffee27913f6818cd76d292

See more details on using hashes here.

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