---
title: "Deploy searchapi"
description: "SearchAPI is a api only search engine built on top of searxng"
category: "AI/ML"
url: https://railway.com/deploy/6EC5D8
---

# Deploy searchapi

SearchAPI is a api only search engine built on top of searxng

**[Deploy searchapi on Railway](https://railway.com/template/6EC5D8)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/6EC5D8/manifest.json

- **Creator:** PRATYAY MUSTAFI's Projects
- **Category:** AI/ML

## Template content

### pratyay360/searchapi:latest https://www.flaticon.com/free-icon/search_10629681

- **Image:** quay.io/pratyay360/searchapi:latest
- **Start command:** `uv fastapi run`
- **Public domain:** Yes

## Documentation

# Deploy and Host searchapi on Railway

searchapi is a free, SearXNG-style meta search API built with FastAPI. It provides REST endpoints for web, PDF, wiki, news, books, repositories, and academic-paper search. It also works as an MCP server, allowing LLM clients and AI agents to consume the same search capabilities without paid API keys or query quotas.

## About Hosting searchapi

searchapi is a stateless FastAPI service served by Uvicorn and packaged in a container, making it straightforward to deploy on Railway. You can deploy directly from the repository or use the prebuilt GHCR image, expose the application port, and connect it to the public internet. The service requires outbound internet access to communicate with upstream search engines but does not require a database, cache server, or message broker. A single Railway instance is sufficient for modest traffic, while larger workloads can scale vertically or horizontally with multiple replicas.

## Common Use Cases

- **LLM data collection and RAG pipelines** — provide structured web, PDF, and academic search results to retrieval and agentic workflows.
- **Backend search for applications and bots** — integrate endpoints such as `/search`, `/news`, `/wiki`, `/books`, and `/repositories` without relying on paid search APIs.
- **Research and discovery tools** — search academic papers, PDFs, repositories, news, books, and other sources from a single API.

## Dependencies for searchapi Hosting

- **Python 3.13+ and [uv](https://docs.astral.sh/uv/)** — used for dependency management and running the FastAPI application. The included Containerfile handles the environment setup.
- **Outbound internet access** — required to query upstream search engines through the application's HTTP clients. No database or other persistent infrastructure is required.

### Implementation Details

The repository includes a container configuration suitable for Railway:

```dockerfile
FROM ghcr.io/astral-sh/uv:alpine

WORKDIR /app

ENV UV_NO_DEV=1
ENV PYTHONUNBUFFERED=1

COPY . .

RUN uv sync --frozen

EXPOSE 8000

CMD ["uv", "run", "fastapi", "run"]
```

Configure Railway to listen on the `PORT` environment variable and bind the server to `0.0.0.0` (for example, by passing `--host 0.0.0.0 --port $PORT` to the start command). The application exposes:

- **Health check:** `/health` — returns `{"status": "ok"}`
- **MCP endpoint:** `/mcp` — connect MCP-compatible clients using your Railway deployment URL.
- **Search endpoints:** web, news, wiki, books, repositories, PDF, and academic search.

Search concurrency, result limits, and cache behavior can be tuned through the search service configuration. For heavier workloads, consider using an outbound proxy and appropriate request delays to reduce upstream rate limiting and CAPTCHA challenges.

## Why Deploy searchapi on Railway?

Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.

By deploying searchapi on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.

## Similar templates

- [Chat Chat](https://railway.com/deploy/-WWW5r) — Chat Chat, your own unified chat and search to AI platform.
- [stella](https://railway.com/deploy/stella) — Self-host stella with web, API, Postgres, Redis, and object storage.
- [Hermes Agent | OpenClaw Alternative with Dashboard](https://railway.com/deploy/hermes-agent-or-openclaw-alternative-wit) — Self-Hosted Hermes AI Agent for Telegram, Discord & Slack

Open this page in a browser: https://railway.com/deploy/6EC5D8
