# National Dishes API
> The dish most associated with each country as an API — a small, fun reference for travel, food, quiz and trivia apps. Built on the open country-json national-dish dataset and enriched with each country's ISO 3166-1 alpha-2 code and Unicode flag emoji. Look up a country's national dish by country name or code, search dishes and countries by keyword (for example, find every country whose national dish involves rice), or list them all. Served from memory — always fast.

## Authentication
All requests require your oanor API key in the `x-oanor-key` header. Get one at https://www.oanor.com/developer/keys.

```bash
curl -H "x-oanor-key: oanor_live_…" "https://api.oanor.com/nationaldishes-api/..."
```

## Pricing
- **Free** (Free) — 10,000 calls/Mo, 3 req/s
- **Starter** ($3/Mo) — 120,000 calls/Mo, 8 req/s
- **Pro** ($9/Mo) — 600,000 calls/Mo, 20 req/s
- **Mega** ($22/Mo) — 3,000,000 calls/Mo, 50 req/s

## Endpoints

### Lookup

#### `GET /v1/dish` — National dish by country or code

**Parameters:**
- `country` (query, optional, string) — Country name Example: `Italy`
- `code` (query, optional, string) — ISO 3166-1 alpha-2 code Example: `it`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/nationaldishes-api/v1/dish?country=Italy&code=it"
```

**Response:**
```json
{
    "data": {
        "national_dish": {
            "code": "IT",
            "dish": "Pasta,Polenta,Pizza, Risotto",
            "emoji": "🇮🇹",
            "country": "Italy"
        }
    },
    "meta": {
        "timestamp": "2026-06-08T18:25:08.991Z",
        "request_id": "2d608af9-c632-40d6-832d-9715c36282d0"
    },
    "status": "ok",
    "message": "National dish retrieved successfully",
    "success": true
}
```

### Search

#### `GET /v1/search` — Search dishes and countries

**Parameters:**
- `q` (query, required, string) — Search query (min 2 chars) Example: `rice`
- `limit` (query, optional, string) — Max results (1-100) Example: `25`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/nationaldishes-api/v1/search?q=rice&limit=25"
```

**Response:**
```json
{
    "data": {
        "count": 7,
        "query": "rice",
        "total": 7,
        "dishes": [
            {
                "code": "BS",
                "dish": "Crack conch with peas and rice",
                "emoji": "🇧🇸",
                "country": "Bahamas"
            },
            {
                "code": "BD",
                "dish": "Rice, Fish, Chicken Korma",
                "emoji": "🇧🇩",
                "country": "Bangladesh"
            },
            {
                "code": "DO",
                "dish": "rice, red beans, and meat",
                "emoji": "🇩🇴",
                "country": "Dominican Republic"
            },
            {
                "code": "HT",
                "dish": "Red beans and rice",
                "emoji": "🇭🇹",
                "country": "Haiti"
            },
            {
                "code": "NG",
                "dish": "Jollof rice",
                "emoji": "🇳🇬",
                "country": "Nigeria"
            },
            {
                "code": "SG",
                "dish": "Chilli crab,Hainanese Chicken Rice",
                "emoji": "🇸🇬",
                "country": "Singapore"
            },
            {
                "code": "LK",
                "dish": "Rice and curry, pittu, kiribath, wholemeal roti, string hoppers, wattalapam, kottu, and appam",
                "emoji": "🇱🇰",
                "country": "Sri Lanka"
            }
        ]
    },
    
…(truncated, see openapi.json for full schema)
```

### List

#### `GET /v1/list` — List national dishes

**Parameters:**
- `limit` (query, optional, string) — Page size (1-300) Example: `50`
- `offset` (query, optional, string) — Offset Example: `0`
- `with_dish` (query, optional, string) — Only countries that have a dish Example: `true`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/nationaldishes-api/v1/list?limit=50&offset=0&with_dish=true"
```

**Response:**
```json
{
    "data": {
        "count": 50,
        "total": 145,
        "dishes": [
            {
                "code": "AF",
                "dish": "Kabuli Palaw",
                "emoji": "🇦🇫",
                "country": "Afghanistan"
            },
            {
                "code": "AL",
                "dish": "Tavë kosi",
                "emoji": "🇦🇱",
                "country": "Albania"
            },
            {
                "code": "DZ",
                "dish": "Couscous",
                "emoji": "🇩🇿",
                "country": "Algeria"
            },
            {
                "code": "AO",
                "dish": "Moamba de galinha",
                "emoji": "🇦🇴",
                "country": "Angola"
            },
            {
                "code": "AG",
                "dish": "Pepperpot, Fungee",
                "emoji": "🇦🇬",
                "country": "Antigua and Barbuda"
            },
            {
                "code": "AR",
                "dish": "Asado",
                "emoji": "🇦🇷",
                "country": "Argentina"
            },
            {
                "code": "AM",
                "dish": "Harissa, Dolma, Khorovats",
                "emoji": "🇦🇲",
                "country": "Armenia"
            },
            {
                "code": "AW",
                "dish": "Keshi yena",
                "emoji": "🇦🇼",
                "country": "Aruba"
            },
            {

…(truncated, see openapi.json for full schema)
```

### Meta

#### `GET /v1/meta` — Service metadata

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/nationaldishes-api/v1/meta"
```

**Response:**
```json
{
    "data": {
        "service": "nationaldishes-api",
        "endpoints": {
            "GET /v1/dish": "National dish by country (country=, e.g. Italy) or code (code=, e.g. it).",
            "GET /v1/list": "List national dishes (limit, offset, with_dish=true to skip empties).",
            "GET /v1/meta": "This document.",
            "GET /v1/search": "Search dishes and countries by keyword (q=, e.g. rice)."
        },
        "with_dish": 145,
        "description": "The national dish of each country (open country-json dataset) enriched with ISO 3166-1 alpha-2 code and flag emoji. Look up by country or code, search dishes by keyword, or list them. No key.",
        "total_countries": 243
    },
    "meta": {
        "timestamp": "2026-06-08T18:25:09.327Z",
        "request_id": "b3c219dd-cd1e-4421-b4b8-06051aaea62d"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}
```


---
Marketplace page: https://www.oanor.com/api/nationaldishes-api
OpenAPI spec: https://www.oanor.com/api/nationaldishes-api/openapi.json
