> ## Documentation Index
> Fetch the complete documentation index at: https://docs.prixo.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# PRIXO REST API — query prices, restaurants, and trends

> The PRIXO REST API lets you search restaurants, compare delivery prices, chat with the AI assistant, and query trending food intents with JSON responses.

The PRIXO REST API gives you programmatic access to the core capabilities that power prixo.ai — restaurant search, live delivery price comparison, AI-assisted chat, and trending query data. Every JSON endpoint can be called from scripts, dashboards, or any tool that can make HTTP requests. Community price snapshot submissions are handled through the PRIXO web interface rather than this API.

## Base URL

All API requests go to:

```
https://prixo.ai/api
```

## Response format

Every successful response returns a JSON body. There are no XML or plain-text responses. Set the `Content-Type: application/json` header on all requests that include a body, and expect `Content-Type: application/json` on every response.

## Authentication

PRIXO uses session cookies. Most **read** endpoints are fully public — you can call them without any credentials. **Write** endpoints and personalized features require a signed-in session cookie. See the [Authentication guide](/api/authentication) for setup details.

## Available endpoints

| Method | Path                       | Auth required | Description                                                 |
| ------ | -------------------------- | :-----------: | ----------------------------------------------------------- |
| POST   | `/api/search`              |       No      | Search restaurants and compare item prices across platforms |
| POST   | `/api/chat`                |      Yes      | Streaming AI chat for price and restaurant queries          |
| GET    | `/api/places`              |       No      | Find nearby restaurants by location or area                 |
| GET    | `/api/intents/popular`     |       No      | Trending food queries by area                               |
| GET    | `/api/leaderboard`         |       No      | Community leaderboard of top contributors                   |
| GET    | `/api/profile/me`          |      Yes      | Fetch the current user's profile                            |
| —      | `/contribute/snapshot/new` |      Yes      | Submit a community price snapshot (web form)                |
| POST   | `/api/feedback`            |      Yes      | Submit feedback on a result or experience                   |

## Rate limits

PRIXO enforces per-user rate limits on high-traffic and write endpoints to ensure fair access for everyone. Limits are tracked by authenticated user ID or IP address.

| Endpoint                   | Limit                         |
| -------------------------- | ----------------------------- |
| `POST /api/chat`           | 30 requests / minute per user |
| `POST /api/feedback`       | 3 requests / minute per user  |
| `GET /api/intents/popular` | 60 requests / minute per user |

When you exceed a limit, the API responds with HTTP **429** and the following JSON body:

```json theme={null}
{ "error": "rate_limit_exceeded" }
```

<Note>
  PRIXO's rate limiter is **fail-open** by design. If the rate-limiting service experiences a transient outage, requests are allowed through rather than blocked — your integration will never be hard-stopped by an infrastructure hiccup.
</Note>

## Error format

All errors follow a single, consistent shape:

```json theme={null}
{ "error": "error_message" }
```

The `error` field contains a human-readable string describing what went wrong. Pair it with the HTTP status code to handle errors programmatically.

## Common status codes

| Status | Meaning                                        |
| ------ | ---------------------------------------------- |
| `200`  | Success — request completed normally           |
| `400`  | Bad request — missing or invalid input         |
| `401`  | Unauthorized — a signed-in session is required |
| `404`  | Not found — the resource does not exist        |
| `429`  | Rate limit exceeded — slow down and retry      |
| `500`  | Server error — something went wrong on our end |

<Tip>
  For `500` errors, wait a moment and retry with exponential back-off. If the problem persists, reach out via the feedback endpoint or through prixo.ai.
</Tip>
