Skip to main content

Jiro Search API ๐Ÿ”

Local-first, AI-native web search & scraping API โ€” a drop-in, self-hosted SerpAPI alternative with MCP server, agentic research, and built-in legal compliance.

GitHub stars GitHub forks PyPI version Docker License: MIT Tests Python

Jiro scrapes Google, Bing, DuckDuckGo, Brave, YouTube, Amazon, eBay, Yandex and Baidu directly โ€” no third-party search API, no per-query billing, no cloud lock-in. Results are cached locally in SQLite (sub-50 ms cached responses), exposed through a SerpAPI-compatible REST API, and built to be called by AI agents: function-calling schemas for OpenAI/Anthropic/Gemini, a Model Context Protocol (MCP) server, LangChain/LlamaIndex wrappers, and an agentic /ai/search loop that plans โ†’ searches โ†’ reads pages โ†’ synthesizes a cited answer. Bring your own keys (BYOK) for proxies, CAPTCHA solvers and LLM providers.

Status: Production-ready MVP (open-source, MIT). Self-host it for $0 or subscribe to Jiro Cloud for a managed proxy fleet, SLA and compliance dashboard. Responsible use: search engines actively fight bots. From residential IPs (and with BYOK proxies) Google/DuckDuckGo work; on datacenter IPs Jiro automatically falls back across engines (google โ†’ bing โ†’ brave โ†’ duckduckgo). Respect each engine's ToS and robots.txt.


Why Jiro? (SerpAPI Alternative, Self-Hosted)

Problem with closed search APIs Jiro's open-source solution
๐Ÿ’ธ SerpAPI costs $200+/mo for 100k requests Free forever โ€” run on your own infrastructure (MIT)
โ˜๏ธ Cloud lock-in, your queries leave your network 100% local-first โ€” your queries, your data, your compliance
๐Ÿค– No native AI-agent integration MCP + Function Calling + LangChain/LlamaIndex native
โš–๏ธ Legal gray area (robots.txt, ToS) Built-in compliance: robots.txt parser, ToS tracking, immutable audit logs
๐Ÿ”ง Fragile parsers break on UI changes Self-healing selectors + 9-engine automatic fallback chain

One-Command Start

pip install jirosearch          # or: uv tool install jirosearch

jiro serve                       # API on http://localhost:8000  (docs: /docs)

That's it โ€” a working self-hosted search API in one command.

# Search (SerpAPI-compatible endpoint)
curl "http://localhost:8000/search.json?engine=google&q=python+web+scraping&num=5"

# Scrape a page into clean markdown
curl -X POST http://localhost:8000/scrape \
  -H "Content-Type: application/json" \
  -d '{"url":"https://example.com","format":"markdown"}'

# Agentic research with citations
curl -X POST http://localhost:8000/ai/search \
  -H "Content-Type: application/json" \
  -d '{"query":"What is the best Python web scraping library in 2026?","max_sources":5}'

Feature Matrix

Capability Jiro (OSS) SerpAPI ScraperAPI Bright Data
Web Search โ€” 9 engines โœ… โœ… โŒ โŒ
Universal Web Scraper (markdown/text/html/JSON) โœ… โŒ โœ… โœ…
Agentic Research (/ai/search) โœ… โŒ โŒ โŒ
MCP Server (stdio + Streamable HTTP + SSE) โœ… โŒ โŒ โŒ
Function-Calling Schemas (OpenAI/Anthropic/Gemini) โœ… โŒ โŒ โŒ
Legal Compliance Layer (robots.txt, ToS, audit) โœ… โŒ โŒ โŒ
Self-Hosted / Air-Gapped โœ… โŒ โŒ โŒ
BYOK Proxies + CAPTCHA โœ… โŒ Partial โœ…
Open Source (MIT) โœ… โŒ โŒ โŒ
Pricing Free $200+/mo $299+/mo $500+/mo

What You Get

Area Features
Engines Google (web/images/news/videos/shopping/places), Bing (web/images/news/videos), Brave (web/videos), DuckDuckGo (web/images), YouTube, Amazon, eBay, Yandex, Baidu
Resilience Automatic engine fallback chain, UA rotation, retries + exponential backoff, per-engine circuit breaker, bot-wall detection, optional Playwright browser fallback for JS-heavy pages
Cache SQLite (WAL) or Redis with TTL, fresh=true to bypass; memory mode; semantic cache (embedding-based fuzzy reuse); sub-50 ms cached p95
Scraper URL โ†’ markdown/text/html/JSON, readability extraction, OpenGraph/Twitter/JSON-LD metadata, links & images, LLM schema extraction, custom CSS/XPath/JSONPath recipes
AI-native OpenAI/Anthropic/Gemini tool schemas, MCP server (jiro mcp), LangChain & LlamaIndex wrappers, /ai/search agent loop, /ai/agent multi-step research, SSE streaming, extractive fallback when no LLM key
BYOK Proxies (HTTP/SOCKS5, single list or presets: BrightData/Oxylabs/ScraperAPI/ZenRows/Smartproxy), CAPTCHA solvers (2Captcha/CapSolver), LLM keys (OpenAI, Anthropic, Gemini, OpenRouter, Ollama) โ€” all via config/env
Async jobs POST /jobs for long-running research/scrape batches, GET /jobs/{id} status, webhook delivery with HMAC signature
Team Hashed API keys, admin/user roles + scopes, per-key rate limits, JWT, usage tracking (/usage, /metrics)
Ops Prometheus /metrics, /proxy/status, /captcha/status, structured JSON logs, Helm chart
Privacy No telemetry, queries not logged by default, all data stays local
Lightweight Async httpx + selectolax (C parser), ~15 core deps, starts in < 1 s

Jiro vs SerpAPI, ScraperAPI & Bright Data

Jiro is the only open-source, self-hostable project that combines search + scrape + agentic AI research + MCP in one binary, with legal compliance built in. Closed competitors charge $200โ€“$3,000/month for subsets of this and never let you self-host.

โ†’ Full comparisons: vs SerpAPI ยท vs ScraperAPI ยท vs Bright Data


AI Agent Integration

Model Context Protocol (MCP)

Jiro ships a full MCP server (stdio, Streamable HTTP, legacy SSE) โ€” giving AI agents live web search, page scraping and research.

jiro mcp                           # MCP server over stdio
jiro mcp --transport http         # Streamable HTTP + SSE on :8000/mcp

Tools: search (9 engines, 6 search types) ยท scrape (markdown/text/html/json) ยท ai_search (agentic research with citations). Prompts: search_and_summarize, compare_engines. Autocompletion: engine names, search types, time ranges, formats.

Claude Desktop

{
  "mcpServers": {
    "jiro": {
      "command": "jiro",
      "args": ["mcp"],
      "env": { "JIRO_CONFIG": "~/.jiro/config.yaml" }
    }
  }
}

Cursor / Continue.dev / Zed / Cline

Point the MCP client at jiro mcp as the server command (see docs/mcp).

Function Calling (OpenAI / Anthropic / Gemini)

from jiro.ai.tools import openai_tools, anthropic_tools, gemini_tools
tools = openai_tools()           # OpenAI / OpenRouter / Ollama

LangChain / LlamaIndex

from jiro.ai.tools import langchain_tools, ToolSpec
tools = langchain_tools(search_fn=my_search, scrape_fn=my_scrape, ai_fn=my_ai_search)

โ†’ Tutorial: Build a Deep Research Agent with Jiro + Claude (MCP)


API Reference

Interactive docs at http://localhost:8000/docs (Swagger) and http://localhost:8000/openapi.json.

Method Path Notes
GET /search.json SerpAPI-compatible โ€” engine, q, num, start, hl, gl, api_key, โ€ฆ
GET/POST /search Alias / JSON body
POST /search/batch Up to 10 queries in parallel
GET /search/stream SSE stream (single or multi-engine)
POST /scrape {url, format, include_metadata, extract_schema, recipe}
POST /scrape/batch Up to 50 URLs
POST /ai/search Plan โ†’ search โ†’ scrape top N โ†’ synthesize cited answer
GET /ai/search/stream SSE stream (plan|search|source|synthesize|answer)
POST /ai/agent Multi-step autonomous research
POST /ai/extract LLM extraction from URL/text with a custom schema
POST /jobs ai_search / ai_agent / batch_scrape with webhook
GET /health, /engines, /metrics Status, engines, Prometheus counters
POST/GET/DELETE /api-keys Hashed key mgmt (admin)
POST /auth/token Exchange API key for JWT

Auth: X-API-Key: jsk_... header, ?api_key=... param, or Authorization: Bearer <jwt>. When auth.enabled: false (default) the API is open for local use.


CLI

jiro serve                        # start the API server
jiro search web "python scraping" --engine bing --num 5 --json
jiro scrape "https://example.com" --format markdown
jiro ask "best python scraping library?" --max-sources 5
jiro mcp                          # MCP server over stdio
jiro config init                  # write ~/.jiro/config.yaml
jiro config show
jiro keys create --name "ci" --role user        # prompts for admin key
jiro keys list
jiro keys revoke key_abc123
jiro usage --days 7
jiro plugins create myengine --author "Your Name"   # scaffold a new engine

Configuration & BYOK

Config at ~/.jiro/config.yaml (or $JIRO_CONFIG). Override anything with env: JIRO_SERVER__PORT=9000, JIRO_AUTH__ENABLED=true. Secrets interpolate from env: api_key: ${OPENAI_API_KEY}.

Service Config Env example
Proxy (custom) scraping.proxy.url (comma-separated rotates) http://user:pass@proxy.example:22225
Proxy (BrightData) scraping.proxy.provider: brightdata + api_key ${BRIGHTDATA_API_KEY}
Proxy (Oxylabs/ScraperAPI/ZenRows/Smartproxy) scraping.proxy.provider + api_key ${OXYLABS_API_KEY}
CAPTCHA (2Captcha / CapSolver) scraping.captcha.provider + api_key ${CAPSOLVER_API_KEY}
LLM (OpenAI/Anthropic/Gemini/OpenRouter) llm.provider/api_key/model ${OPENAI_API_KEY}
LLM (Ollama, local) llm.provider: ollama, base_url: http://localhost:11434/v1 โ€”
Redis cache cache.type: redis, cache.url JIRO_CACHE__TYPE=redis

Deployment

Docker

docker compose up -d            # http://localhost:8000

Helm (Kubernetes)

helm install jiro ./helm \
  --set config.env.JIRO_AUTH__ENABLED=true \
  --set config.envFromSecret=jiro-secrets

Ships Deployment, Service, PVC (SQLite data), optional Ingress and optional Redis cache (--set redis.enabled=true).

Team setup (auth on)

export JIRO_AUTH__ENABLED=true JIRO_JWT_SECRET=$(openssl rand -hex 32)
jiro keys create --name admin --role admin --admin-key "$ADMIN"
jiro keys create --name "alice" --role user --rate-limit 30

๐Ÿ’ก Open Core & Monetization

Jiro is open-source (MIT) and will always be free to self-host. The sustainable model:

Edition What License For
Jiro OSS Full search/scrape/AI/MCP, all engines, plugins, compliance MIT Everyone โ€” $0
Jiro Cloud (roadmap) Managed hosting, auto-scaling, global residential proxy pool, SLA, SSO, compliance dashboard SaaS Teams & agents
Jiro Enterprise (roadmap) Air-gapped license (BSL-1.0), SOC 2 path, dedicated support, private engine plugins Source-available Fintech/Legal/Gov/AI labs

We monetize convenience, compliance and support โ€” never the code. Community contributions stay MIT.

โ†’ Roadmap: docs/ROADMAP.md


Documentation


Performance

Metric Value
Startup < 1 s
Cached search (SQLite) ~1โ€“3 ms round-trip in-process
Live Bing search ~0.3โ€“0.8 s from a datacenter IP
/scrape of a small page ~0.3โ€“0.9 s first hit, then cached
Test suite 380 tests passing

Project Layout

jiro/
โ”œโ”€โ”€ ai/            LLM providers, tool schemas, agentic loop (research + multi-step agent + SSE)
โ”œโ”€โ”€ scraping/      HTTP client (UA rotation, retries, circuit breaker, proxy manager, browser fallback),
โ”‚                  engines: google/bing/brave/duckduckgo/youtube/amazon/ebay/yandex/baidu
โ”œโ”€โ”€ server/        FastAPI app: routers (search, scrape, ai, stream, jobs, admin, ops, system)
โ”œโ”€โ”€ auth.py        API keys (SHA-256 hashed), JWT, rate limiting
โ”œโ”€โ”€ browser.py     Playwright browser fallback (lazy, graceful degradation)
โ”œโ”€โ”€ cache.py       SQLite / memory cache manager
โ”œโ”€โ”€ captcha.py     BYOK CAPTCHA solvers (2Captcha, CapSolver)
โ”œโ”€โ”€ config.py      YAML + env config with ${VAR} interpolation
โ”œโ”€โ”€ db.py          SQLite (WAL): cache, api_keys, usage, jobs, semantic_cache, tos_acknowledgments
โ”œโ”€โ”€ extract.py     readability + metadata + HTMLโ†’Markdown
โ”œโ”€โ”€ jobs.py        async job queue + webhooks (HMAC-signed)
โ”œโ”€โ”€ mcp.py         MCP server (stdio): tools, prompts, resources, autocompletion
โ”œโ”€โ”€ models.py      Pydantic contracts
โ”œโ”€โ”€ proxy.py       BYOK proxy manager (provider presets, rotation, cooldown)
โ”œโ”€โ”€ recipes.py     CSS / XPath / JSONPath extraction recipes
โ”œโ”€โ”€ redis_cache.py Redis cache backend
โ”œโ”€โ”€ semantic.py    embedding-based semantic cache
โ””โ”€โ”€ cli.py         Typer CLI
tests/             parser fixtures + unit/API/integration/chaos/property tests

Development

git clone https://github.com/DevAnimecx/jiro.git && cd jiro
pip install -e ".[dev,browser,redis,recipes]"
pytest -m "not network"            # skip network-dependent tests
jiro serve --reload

Roadmap status

  • Phase 1 (MVP) โ€” โœ… CLI, config, FastAPI server, google/bing/ddg web engines, SerpAPI-compatible JSON, SQLite cache, API-key auth, OpenAI tool schema, /ai/search, Dockerfile.
  • Phase 2 โ€” โœ… Brave + Bing videos, images/news types, team keys, MCP server, LangChain/LlamaIndex wrappers, batch scrape, /metrics, Playwright fallback, BYOK proxy + CAPTCHA, SSE, Redis.
  • Phase 3 โ€” โœ… /ai/agent multi-step research, CSS/XPath/JSONPath recipes, LLM extraction, plugin registry, async jobs + webhooks.
  • Phase 4 โ€” partial: semantic cache in; RAG pipelines, horizontal scaling and the community parser marketplace remain future work. Helm chart provided.

License & Responsible Use

MIT. Jiro is a scraping tool: respect each search engine's Terms of Service and robots.txt, keep request rates respectful, and use proxies/CAPTCHA services at your own discretion. All traffic originates from your network; queries are only visible to the engines you query.


Community & Support


Developed by Adarsh Kushwah ยท Blackvault Technology Local-first, AI-native search & scraping โ€” free, open, and yours to self-host.

Download files

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

Source Distribution

jirosearch-0.1.2.tar.gz (188.6 kB view details)

Uploaded Source

Built Distribution

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

jirosearch-0.1.2-py3-none-any.whl (170.1 kB view details)

Uploaded Python 3

File details

Details for the file jirosearch-0.1.2.tar.gz.

File metadata

  • Download URL: jirosearch-0.1.2.tar.gz
  • Upload date:
  • Size: 188.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.28 {"installer":{"name":"uv","version":"0.11.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for jirosearch-0.1.2.tar.gz
Algorithm Hash digest
SHA256 51830df6bc5041ff20854a272a0f0258e6a94375d54a8f8a81c2138deb21bcbd
MD5 0b5e2433ac64f0ff25b1a5dac99b1b70
BLAKE2b-256 47ab8f3558965f617c1b07c66710431249a0d089a8f0a10cbf63c58ee7a2d744

See more details on using hashes here.

File details

Details for the file jirosearch-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: jirosearch-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 170.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.28 {"installer":{"name":"uv","version":"0.11.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for jirosearch-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 ed3eafc91b84ec4fa1dcac9c17ac5eb02172740e6f847e9888d618225fb07447
MD5 54e957f30209bfbfb64d53062dc0dc20
BLAKE2b-256 c85d11991325bc4e7d7414cfd35113e822396d3033c2bb1316da5da4075e18b1

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 files

0.1.1

2 files

Supported by

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