# Quick Start
Get Polymathy running and make your first search request.
## 1. Configure Environment
Create a `.env` file in the project root:
```env
# Required: SearxNG search endpoint
SEARXNG_URL=http://your-searxng-instance/search
# Required: Content processor service
PROCESSOR_URL=http://your-processor-service/v1/process
# Optional: Server configuration
SERVER_HOST=127.0.0.1
SERVER_PORT=8080
```
!!! tip "Using sample.env"
You can copy `sample.env` as a starting point:
```bash
cp sample.env .env
```
## 2. Start the Service
Run Polymathy:
```bash
# Development mode
cargo run
# Production mode
cargo run --release
```
You should see output like:
```
[INFO] Starting Polymathy server on 127.0.0.1:8080
```
## 3. Make Your First Query
Using curl:
```bash
curl "http://localhost:8080/v1/search?q=rust+programming"
```
Example response:
```json
{
"0": ["https://example.com/rust-intro", "Rust is a systems programming language..."],
"1": ["https://example.com/rust-tutorial", "Getting started with Rust requires..."],
"2": ["https://another-site.com/rust", "The Rust programming language focuses on..."]
}
```
## 4. Explore the API Documentation
Polymathy includes multiple API documentation UIs:
| Swagger UI | [http://localhost:8080/swagger](http://localhost:8080/swagger) |
| ReDoc | [http://localhost:8080/redoc](http://localhost:8080/redoc) |
| RapiDoc | [http://localhost:8080/rapidoc](http://localhost:8080/rapidoc) |
| Scalar | [http://localhost:8080/scalar](http://localhost:8080/scalar) |
| OpenAPI JSON | [http://localhost:8080/openapi.json](http://localhost:8080/openapi.json) |
## Understanding the Response
The search endpoint returns a map where:
- **Keys** are sequential chunk IDs (0, 1, 2, ...)
- **Values** are tuples of `[source_url, content_chunk]`
Each content chunk is a semantic segment of the original page, typically around 100 words.
## Next Steps
- [Configuration](configuration.md) - Learn about all configuration options
- [API Endpoints](../api/endpoints.md) - Full API reference
- [Examples](../examples/index.md) - More usage examples