ScavioScavio
ProductPricingDocs
Sign InGet Started
  1. Home
  2. Tutorials
  3. How to Self-Host SearXNG and When to Pay Instead
Tutorial

How to Self-Host SearXNG and When to Pay Instead

r/searchengines and r/Searx posts shipped self-hosted SearXNG aggregators. Walk-through to deploy plus the operational-cost reality.

Get Free API KeyAPI Docs

Two recent Reddit posts shipped self-hosted SearXNG variants as free SerpAPI alternatives. This walks the deployment plus the operational reality that decides when to pay for hosted instead.

Prerequisites

  • A small VPS or Railway/Render account
  • Docker basics
  • Awareness that you own captcha/Cloudflare handling

Walkthrough

Step 1: Deploy SearXNG via Docker

Official image, settings.yml with JSON output enabled.

Bash
docker run -d --name searxng -p 8888:8080 \
  -v $(pwd)/searxng:/etc/searxng \
  -e BASE_URL=http://localhost:8888 \
  -e INSTANCE_NAME=my-searxng \
  searxng/searxng:latest

Step 2: Enable JSON output in settings.yml

By default, JSON is off on public instances.

# /etc/searxng/settings.yml
search:
  formats:
    - html
    - json

Step 3: Hit /search with format=json

Standard SearXNG API shape.

Bash
curl 'http://localhost:8888/search?q=ai+agents+2026&format=json' | jq .results[0]

Step 4: Add a Redis rate-limit layer

SearXNG rate-limits per IP via Redis.

Bash
docker run -d --name searxng-redis -p 6379:6379 redis:alpine
# Update settings.yml: redis.url: redis://searxng-redis:6379

Step 5: Decide: keep self-hosted or pay

Decision rule based on volume and uptime.

Text
# Stay self-hosted when:
# - <500 queries/day and intermittent failure is OK
# - Privacy / no-vendor is a hard requirement
# - You enjoy operating things
# Pay $30/mo Scavio when:
# - Production agents on cron need stable uptime
# - You hit Cloudflare/captcha walls weekly
# - Ops time costs more than $30/mo

Python Example

Python
import requests
result = requests.get('http://localhost:8888/search', params={'q': 'ai agents', 'format': 'json'}).json()

JavaScript Example

JavaScript
const result = await fetch('http://localhost:8888/search?q=ai+agents&format=json').then(r => r.json());

Expected Output

JSON
Self-hosted SearXNG returning JSON. Works for personal-research load. Production agents on cron will eventually hit captcha/IP issues; that is when paid hosted alternatives earn their fee.

Related Tutorials

  • How to Migrate from SerpAPI to Scavio in 2026

Frequently Asked Questions

Most developers complete this tutorial in 15 to 30 minutes. You will need a Scavio API key (free tier works) and a working Python or JavaScript environment.

A small VPS or Railway/Render account. Docker basics. Awareness that you own captcha/Cloudflare handling. A Scavio API key gives you 50 free credits on signup.

Yes. The free tier includes 50 credits on signup, which is more than enough to complete this tutorial and prototype a working solution.

Scavio has a native LangChain package (langchain-scavio), an MCP server, and a plain REST API that works with any HTTP client. This tutorial uses the raw REST API, but you can adapt to your framework of choice.

Related Resources

Best Of

Best Self-Hosted vs Hosted Search API Alternatives 2026

Read more
Best Of

Best Agent Search APIs with Free Tiers (2026)

Read more
Glossary

Free Search API Tier Comparison

Read more
Comparison

Scavio vs SearXNG (self-hosted)

Read more
Glossary

Search Paywall Era (2026)

Read more
Comparison

Self-Hosted Search (SearXNG, YaCy) vs Commercial Search APIs (Scavio, Tavily, SerpAPI)

Read more

Start Building

r/searchengines and r/Searx posts shipped self-hosted SearXNG aggregators. Walk-through to deploy plus the operational-cost reality.

Get Free API KeyRead the Docs
ScavioScavio

Real-time search API for AI agents. Search every platform, not just Google.

Product

  • Features
  • Pricing
  • Dashboard
  • Affiliates

Developers

  • Documentation
  • API Reference
  • Quickstart
  • MCP Integration
  • Python SDK

Alternatives

  • Tavily Alternative
  • SerpAPI Alternative
  • Firecrawl Alternative
  • Exa Alternative

Tools

  • JSON Formatter
  • cURL to Code
  • Token Counter
  • All Tools

© 2026 Scavio. All rights reserved.

Featured on TAAFT
Terms of ServicePrivacy Policy