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

# NaijaTaste developer API overview and endpoints

> Public REST API for Nigerian restaurant recommendations and Pidgin review generation — endpoints, base URL, multilingual input, implicit learning, and errors.

If you're building a food delivery app, a review platform, a hospitality product, or any tool that touches Nigerian food discovery, NaijaTaste has a public REST API for you.

## What you get

<CardGroup cols={2}>
  <Card title="Restaurant recommendations" icon="map-pin" href="/api/recommend">
    POST city, food preference, price range, and persona. Get back ranked Nigerian restaurant picks from real Google Places data.
  </Card>

  <Card title="Pidgin review generation" icon="star" href="/api/simulate-review">
    POST a restaurant name, persona, and features. Get back an authentic Nigerian review with a tone label.
  </Card>

  <Card title="Top picks" icon="trophy" href="/api/top-picks">
    GET top-rated Nigerian restaurants, filtered by GPS location and persona.
  </Card>

  <Card title="Place details" icon="info" href="/api/place-details">
    GET full restaurant details by Google Places ID — address, phone, hours, photos, open status.
  </Card>
</CardGroup>

## Authentication

Core endpoints are **publicly accessible**. No API key. No token. No Authorization header.

```bash theme={null}
curl -X POST https://naijataste-api-vcp4.onrender.com/recommend \
  -H "Content-Type: application/json" \
  -d '{
    "cold_start_signals": {
      "city": "Lagos",
      "preferred_food": "jollof rice",
      "price_range": "budget"
    }
  }'
```

## Base URL

```text theme={null}
https://naijataste-api-vcp4.onrender.com
```

Interactive docs: [naijataste-api-vcp4.onrender.com/docs](https://naijataste-api-vcp4.onrender.com/docs)

## Endpoints at a glance

| Method | Endpoint                    | Description                    |
| ------ | --------------------------- | ------------------------------ |
| `POST` | `/recommend`                | Get restaurant recommendations |
| `POST` | `/simulate-review`          | Generate a Nigerian review     |
| `GET`  | `/places/top-picks`         | Top-rated restaurants          |
| `GET`  | `/place-details/{place_id}` | Full restaurant details        |
| `GET`  | `/cache/stats`              | View cached query stats        |
| `GET`  | `/health`                   | Check API health               |

## Multilingual support

The recommendation and review engines understand input and produce output in:

* English
* Nigerian Pidgin
* Yoruba
* Hausa
* Igbo

Pass your query or prompt text in the user's language — the engine detects it and responds in kind.

## Implicit learning via API

Pass `past_adjustments` in your simulate-review call to apply a user's learned preferences:

```json theme={null}
{
  "persona": { ... },
  "item_name": "Restaurant Name",
  "past_adjustments": [
    { "action": "save", "tone": "pidgin-heavy", "rating": 5 },
    { "action": "regenerate", "tone": "formal" }
  ]
}
```

The engine extracts patterns from the last 50 signals and applies them silently to the generation.

## Error handling

All errors return standard HTTP codes with a JSON body:

```json theme={null}
{
  "error": "invalid_persona",
  "message": "persona must include avg_rating and rating_tendency"
}
```

| Code  | Meaning                                |
| ----- | -------------------------------------- |
| `400` | Bad request — missing or invalid field |
| `404` | Resource not found                     |
| `422` | Validation error                       |
| `500` | Server error — retry with backoff      |

<CardGroup cols={2}>
  <Card title="API keys" icon="key" href="/developers/api-keys">
    How authentication works now and what the key tier will cover.
  </Card>

  <Card title="Rate limits" icon="gauge" href="/developers/rate-limits">
    Per-IP limits and how to handle 429 responses.
  </Card>
</CardGroup>
