LogoLogo
TwitterWebsite
  • Getting Started
    • Introduction
    • Human UI
    • Examples
    • Monitoring
    • Workflows
    • Getting Help
  • Documentation
    • Humans
      • Introduction
      • Prompts
      • Tools
      • Knowledge
      • Memory
      • Storage
      • Structured Output
      • Reasoning
      • Teams
    • Models
      • Introduction
      • Open AI
      • Open AI Like
      • Anthropic Claude
      • AWS Bedrock Claude
      • Azure
      • Cohere
      • DeepSeek
      • Fireworks
      • Gemini
      • Gemini - VertexAI
      • Groq
      • HuggingFace
      • Mistral
      • Nvidia
      • Ollama
      • OpenRouter
      • Sambanova
      • Together
      • xAI
    • Tools
      • Introduction
      • Functions
      • Writing your own Toolkit
      • Airflow
      • Apify
      • Arxiv
      • AWS Lambda
      • BaiduSearch
      • Calculator
      • Cal.com
      • Composio
      • Crawl4AI
      • CSV
      • Dalle
      • DuckDb
      • DuckDuckGo
      • Email
      • Exa
      • Fal
      • File
      • Firecrawl
      • Giphy
      • Github
      • Google Calendar
      • Google Search
      • Hacker News
      • Jina Reader
      • Jira
      • Linear
      • Lumalabs
      • MLX Transcribe
      • ModelsLabs
      • Newspaper
      • Newspaper4k
      • OpenBB
      • Bitca
      • Postgres
      • Pubmed
      • Pyton
      • Replicate
      • Resend
      • Searxng
      • Serpapi
      • Shell
      • Slack
      • Sleep
      • Spider
      • SQL
      • Tavily
      • Twitter
      • Website
      • Yfinance
      • Zendesk
    • Knowledges
      • Introduction
      • ArXiv Knowledge Base
      • Combined KnowledgeBase
      • CSV Knowledge Base
      • CSV URL Knowledge Base
      • Docx Knowledge Base
      • Document Knowledge Base
      • JSON Knowledge Base
      • LangChain Knowledge Base
      • LlamaIndex Knowledge Base
      • PDF Knowledge Base
      • PDF URL Knowledge Base
      • S3 PDF Knowledge Base
      • S3 Text Knowledge Base
      • Text Knowledge Base
      • Website Knowledge Base
    • Chunking
      • Fixed Size Chunking
      • Agentic Chunking
      • Semantic Chunking
      • Recursive Chunking
      • Document Chunking
    • VectorDBS
      • Introduction
      • PgVector Agent Knowledge
      • Qdrant Agent Knowledge
      • Pinecone Agent Knowledge
      • LanceDB Agent Knowledge
      • ChromaDB Agent Knowledge
      • SingleStore Agent Knowledge
    • Storage
      • Introduction
      • Postgres Agent Storage
      • Sqlite Agent Storage
      • Singlestore Agent Storage
      • DynamoDB Agent Storage
      • JSON Agent Storage
      • YAML Agent Storage
    • Embeddings
      • Introduction
      • OpenAI Embedder
      • Gemini Embedder
      • Ollama Embedder
      • Voyage AI Embedder
      • Azure OpenAI Embedder
      • Mistral Embedder
      • Fireworks Embedder
      • Together Embedder
      • HuggingFace Embedder
      • Qdrant FastEmbed Embedder
      • SentenceTransformers Embedder
    • Workflows
      • Introduction
      • Session State
      • Streaming
      • Advanced Example - News Report Generator
  • How To
    • Install & Upgrade
    • Upgrade to v2.5.0
Powered by GitBook
LogoLogo

© 2025 Bitca. All rights reserved.

On this page
  • Example
  • ​Toolkit Params
  • ​Toolkit Functions
Export as PDF
  1. Documentation
  2. Tools

Searxng

Example

Searxng enables an Agent to search the web for a query, scrape a website, or crawl a website.

cookbook/tools/searxng_tools.py

from bitca.agent import Agent
from bitca.tools.searxng import Searxng

# Initialize Searxng with your Searxng instance URL
searxng = Searxng(
    host="http://localhost:53153",
    engines=[],
    fixed_max_results=5,
    news=True,
    science=True
)

# Create an agent with Searxng
agent = Agent(tools=[searxng])

# Example: Ask the agent to search using Searxng
agent.print_response("""
Please search for information about artificial intelligence
and summarize the key points from the top results
""")
Parameter
Type
Default
Description

host

str

-

The host for the connection.

engines

List[str]

[]

A list of search engines to use.

fixed_max_results

int

None

Optional parameter to specify the fixed maximum number of results.

images

bool

False

Enables searching for images.

it

bool

False

Enables searching for IT-related content.

map

bool

False

Enables searching for maps.

music

bool

False

Enables searching for music.

news

bool

False

Enables searching for news.

science

bool

False

Enables searching for science-related content.

videos

bool

False

Enables searching for videos.

Function
Description

search

Performs a general web search using the specified query. Parameters include query for the search term and max_results for the maximum number of results (default is 5). Returns the search results.

image_search

Performs an image search using the specified query. Parameters include query for the search term and max_results for the maximum number of results (default is 5). Returns the image search results.

it_search

Performs a search for IT-related information using the specified query. Parameters include query for the search term and max_results for the maximum number of results (default is 5). Returns the IT-related search results.

map_search

Performs a search for maps using the specified query. Parameters include query for the search term and max_results for the maximum number of results (default is 5). Returns the map search results.

music_search

Performs a search for music-related information using the specified query. Parameters include query for the search term and max_results for the maximum number of results (default is 5). Returns the music search results.

news_search

Performs a search for news using the specified query. Parameters include query for the search term and max_results for the maximum number of results (default is 5). Returns the news search results.

science_search

Performs a search for science-related information using the specified query. Parameters include query for the search term and max_results for the maximum number of results (default is 5). Returns the science search results.

video_search

Performs a search for videos using the specified query. Parameters include query for the search term and max_results for the maximum number of results (default is 5). Returns the video search results.

PreviousResendNextSerpapi

Last updated 4 months ago

Toolkit Params

Toolkit Functions

​
​