Ferret API Reference
Web search engine for AI agents β Open source alternative to Tavily Version 0.6.0 β 333 parsers, 363 routes, 121 MCP tools, 17 business endpoints
Overview
| Metric | Value |
|---|---|
| Parsers | 333 (39 categories) |
| API routes | 363 |
| MCP tools | 121 |
| Business endpoints | 17 (16 /llm routes) |
| Search engines | 18+ (Bing, DDG, Brave, Google, Yandex, Yahoo, AOL, Seznam, Baidu, Qwant, Startpage, Dogpile, You, Ask, Ramblerβ¦) |
| Export formats | JSON (default), CSV, XML |
| Rate limits | None (self-hosted) |
Base URL: http://localhost:9093
Quickstart
Installation
# Clone and build
git clone https://github.com/duan78/ferret.git
cd ferret
cargo build --release
# Start the REST API
./target/release/ferret serve
# β http://localhost:9093
# Or start MCP server
./target/release/ferret mcp --port 9094
# β http://localhost:9094/mcp
Your first search
curl -X POST http://localhost:9093/research \
-H "Content-Type: application/json" \
-d '{"query": "AI developments 2026"}'
Python SDK
from ferret import FerretClient
client = FerretClient("http://localhost:9093")
# Search
results = client.search("Who is Leo Messi?")
print(results)
# Research (multi-engine + summary)
report = client.research("AI developments 2026")
print(report["answer"])
# Extract
content = client.extract("https://example.com")
print(content["raw_content"])
Core Endpoints
1. Search
Single search engine:
curl "http://localhost:9093/search/bing?q=web+scraping"
Multi-engine aggregate:
curl "http://localhost:9093/search?q=web+scraping"
Parameters:
| Param | Type | Default | Description |
|---|---|---|---|
q | string | β | Search query (required) |
pagecount | int | 5 | Number of result pages |
no_cache | bool | false | Bypass cache |
format | string | json | Output format (json, csv, or xml) |
Response:
{
"success": true,
"items": [
{
"title": "Result Title",
"url": "https://...",
"snippet": "Description...",
"source": "bing"
}
],
"time_ms": 123
}
Available search engines (18+):
/search/bing, /search/ddg, /search/brave, /search/google, /search/yandex, /search/yahoo, /search/aol, /search/seznam, /search/baidu, /search/qwant, /search/startpage, /search/dogpile, /search/you, /search/ask, /search/rambler
2. Extract
Extract clean content from one or more URLs (Tavily-compatible format):
curl "http://localhost:9093/extract?q=https://example.com&include_images=true"
Parameters:
| Param | Type | Default | Description |
|---|---|---|---|
q | string | β | URL to extract (required) |
include_images | bool | false | Include page images |
include_raw_content | bool | true | Return raw text content |
Response (Tavily-compatible):
{
"results": [
{
"url": "https://example.com",
"raw_content": "Page content as plain text...",
"images": [],
"favicon": "https://example.com/favicon.ico"
}
],
"failed_results": [],
"response_time": "0.02"
}
3. Crawl
Crawl an entire website:
curl "http://localhost:9093/crawl?q=https://docs.ferret.guru"
Tavily-compatible crawl:
curl "http://localhost:9093/crawl/v1?q=https://docs.ferret.guru"
Response (Tavily-compatible):
{
"base_url": "docs.ferret.guru",
"results": [
{
"url": "https://docs.ferret.guru/page",
"raw_content": "...",
"favicon": "https://docs.ferret.guru/favicon.ico"
}
],
"failed_results": [],
"response_time": "1.23"
}
4. Map
Discover all URLs on a domain without extracting content:
curl "http://localhost:9093/map?q=https://example.com"
Response:
{
"urls": [
"https://example.com",
"https://example.com/about",
"https://example.com/contact"
],
"total": 3,
"response_time": "0.35"
}
5. Research
Deep research: multi-engine search with aggregated results and summary (Tavily-style):
curl -X POST http://localhost:9093/research \
-H "Content-Type: application/json" \
-d '{"query": "AI developments 2026", "max_results": 20}'
Parameters:
| Param | Type | Default | Description |
|---|---|---|---|
query | string | β | Research topic (required) |
max_results | int | 20 | Max results to return |
model | string | mini | mini (fast) or pro (deep) |
stream | bool | false | SSE streaming |
Response:
{
"query": "AI developments 2026",
"answer": "Summary of findings from 5 search engines...",
"results": [
{
"title": "Article Title",
"url": "https://...",
"content": "Snippet...",
"score": 0.95,
"source": "bing"
}
],
"usage": {"searches": 5, "results_total": 42},
"response_time": "2.34"
}
6. Batch
Run multiple parsers in one request:
curl -X POST http://localhost:9093/batch \
-H "Content-Type: application/json" \
-d '[
{"parser": "bing", "query": "rust"},
{"parser": "ddg", "query": "web scraping"}
]'
Business Endpoints
Ferret ships 17 business endpoints that aggregate multiple parsers into cross-cutting analyses. Each one has a paired /llm route returning an LLM-ready markdown prompt (~800 tokens). Full detail on the Business Endpoints page.
| Endpoint | Description |
|---|---|
GET /seo/corpus?q=<query> | TF-IDF, ngrams, intents, plan, opportunities |
GET /seo/audit?q=<site> | Technical SEO audit (CMS, Core Web Vitals, DNS, whois, hreflang, OG, Safe Browsing) |
GET /seo/competitors?q=<keyword> | SERP competitor analysis |
GET /seo/content?q=<url> | On-page content SEO analysis |
GET /seo/pagespeed?q=<url> | Core Web Vitals and performance |
GET /seo/serp-features?q=<keyword> | Featured snippets, People Also Ask, image packs |
GET /seo/hreflang?q=<url> | hreflang tags and languages |
GET /seo/opengraph?q=<url> | Open Graph, Twitter Cards, schema.org |
GET /seo/robots-txt?q=<url> | Robots.txt, sitemaps, constraints |
GET /seo/bukvarix?q=<keyword> | Bukvarix search volume |
GET /france/living?q=<city|zip> | Quality of life: real estate, health, transport, culture, risks, services |
GET /france/company?q=<siren> | Company profile: SIRENE, directors, RNA, DVF |
GET /realestate/estimate?q=<city|zip> | Real estate valuation: price/mΒ², rents, trends |
GET /product/intelligence?q=<product> | Multi-market pricing (Amazon, eBay, Google Shopping) |
GET /social/sentiment?q=<topic> | Cross-platform sentiment (Reddit, Quora) |
GET /finance/portfolio?q=<assets> | Crypto portfolio analysis (CoinGecko, Fear & Greed) |
GET /tech/trends?q=<topic> | Tech trends (GitHub, HN, StackExchange) |
GET /travel/trip?q=<destination> | Trip planner (accommodation, weather, activities) |
GET /culture/events?q=<city> | Cultural agenda (museums, monuments, events) |
GET /health/drugs?q=<drug> | Drug information (ANSM, FDA, PubChem) |
GET /research/literature?q=<topic> | Scientific literature review (OpenAlex, Crossref) |
GET /monitor/track?q=<url> | RSS monitoring + content extraction |
LLM routes
Each business endpoint has a /llm variant that returns an LLM-ready markdown prompt (~800 tokens), designed for direct injection into a chat completion:
# Structured JSON analysis
curl "http://localhost:9093/seo/audit?q=example.com"
# LLM-ready markdown prompt
curl "http://localhost:9093/seo/audit/llm?q=example.com"
There are 16 /llm routes in total. See Business Endpoints for request/response examples.
Export Formats
Every endpoint supports the ?format= query parameter. See Export Formats for full examples.
| Format | Param | Content-Type | Use case |
|---|---|---|---|
| JSON | ?format=json (default) | application/json | APIs, programmatic use |
| CSV | ?format=csv | text/csv | Spreadsheets, BI tools |
| XML | ?format=xml | application/xml | Legacy systems, RSS-style feeds |
curl "http://localhost:9093/search/bing?q=rust&format=csv"
Search Engines
Ferret supports 18+ search engines, each available at /search/<engine>:
| Engine | Endpoint | Notes |
|---|---|---|
| Bing | /search/bing | Default, very reliable |
| DuckDuckGo | /search/ddg | No tracking |
| Brave | /search/brave | Independent index |
/search/google | Slowest (~18s) but highest quality | |
| Yandex | /search/yandex | Strong for RU/CIS queries |
| Yahoo | /search/yahoo | Bing-backed |
| AOL | /search/aol | Bing-backed |
| Seznam | /search/seznam | Czech Republic |
| Baidu | /search/baidu | China |
| Qwant | /search/qwant | EU/France |
| Startpage | /search/startpage | Google results, no tracking |
| Dogpile | /search/dogpile | Meta-search |
| You | /search/you | AI-focused |
| Ask | /search/ask | Q&A |
| Rambler | /search/rambler | Russia |
The aggregate /search endpoint fans out across all engines, deduplicates by URL, scores, and ranks.
Rate Limits
Ferret is self-hosted β there are no rate limits. Your infrastructure, your rules.
| Environment | RPM |
|---|---|
| Development | Unlimited |
| Production | Unlimited |
| Crawl | Unlimited |
| Research | Unlimited |
SDKs
Python
pip install ferret-client
from ferret import FerretClient
client = FerretClient("http://localhost:9093")
# Search
client.search("rust programming", engine="bing")
# Multi-search
client.search_all("rust programming")
# Extract
client.extract("https://example.com")
# Research
client.research("AI 2026")
# Crawl
client.crawl("https://docs.ferret.guru")
See the Python SDK page for the full method list.
JavaScript
npm install ferret-client
import { FerretClient } from 'ferret-client';
const client = new FerretClient('http://localhost:9093');
const results = await client.search('web scraping');
See the JavaScript SDK page.
LangChain
from langchain_ferret import FerretSearchTool, FerretResearchTool
tools = [
FerretSearchTool(),
FerretResearchTool(),
]
MCP Server
Ferret exposes a Model Context Protocol (MCP) server on port 9094 with 121 tools, compatible with Cursor, Claude Desktop, Claude Code, and OpenAI. See the MCP Server page for full configuration.
Best Practices
Optimize performance
# Use cache
curl "http://localhost:9093/search/bing?q=rust&no_cache=false"
# Limit results
curl "http://localhost:9093/search/bing?q=rust&pagecount=1"
# Batch multiple queries
curl -X POST http://localhost:9093/batch \
-H "Content-Type: application/json" \
-d '[
{"parser": "bing", "query": "rust"},
{"parser": "ddg", "query": "web scraping"}
]'
Error handling
All endpoints return {"success": true/false, "error": "..."} on failure.
Support
- GitHub: github.com/duan78/ferret
- Issues: github.com/duan78/ferret/issues
- Self-hosted: your own infrastructure