# Wordle API
> A complete toolkit for Wordle-style word games: score a guess against a hidden answer and get the exact green/yellow/grey feedback pattern (with correct duplicate-letter handling), validate any word against the official dictionary, solve a puzzle from the clues collected so far (returns the remaining consistent answers and a suggested next guess that best narrows them down), pull a random answer word, and fetch the deterministic daily word for any date with its puzzle number. Built on the official answer list (2,315 words) and the full set of ~13,000 accepted guesses. Every endpoint accepts input via the query string or the request body and returns lean JSON. Pure server-side compute (no third-party upstream), so responses are instant and always available. Ideal for word-game backends, solvers and assistants, bots and educational apps.

## 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/wordle-api/..."
```

## Pricing
- **Free** (Free) — 16,000 calls/Mo, 4 req/s
- **Basic** ($5/Mo) — 130,000 calls/Mo, 8 req/s
- **Pro** ($13/Mo) — 1,100,000 calls/Mo, 25 req/s
- **Mega** ($33/Mo) — 6,000,000 calls/Mo, 60 req/s

## Endpoints

### Wordle

#### `GET /v1/daily` — Deterministic daily word

**Parameters:**
- `date` (query, optional, string) — YYYY-MM-DD (default today) Example: `2026-01-01`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/wordle-api/v1/daily?date=2026-01-01"
```

**Response:**
```json
{
    "data": {
        "date": "2026-01-01",
        "word": "scalp",
        "puzzle_number": 1657
    },
    "meta": {
        "timestamp": "2026-05-30T22:48:31.737Z",
        "request_id": "f85d3fc0-057e-462c-9846-c41ab839b994"
    },
    "status": "ok",
    "message": "Daily word retrieved",
    "success": true
}
```

#### `GET /v1/meta` — Dictionary sizes

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

**Response:**
```json
{
    "data": {
        "answers": 2315,
        "word_length": 5,
        "valid_guesses": 12972
    },
    "meta": {
        "timestamp": "2026-05-30T22:48:31.810Z",
        "request_id": "b4e57139-0631-4b02-9047-12fc56c975ef"
    },
    "status": "ok",
    "message": "Meta retrieved",
    "success": true
}
```

#### `GET /v1/random` — Random answer word

**Parameters:**
- `size` (query, optional, string) — 1..20 (default 1) Example: `1`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/wordle-api/v1/random?size=1"
```

**Response:**
```json
{
    "data": {
        "word": "tasty"
    },
    "meta": {
        "timestamp": "2026-05-30T22:48:31.857Z",
        "request_id": "00f35047-d122-42ab-ab56-e624f851c6aa"
    },
    "status": "ok",
    "message": "Random word retrieved",
    "success": true
}
```

#### `GET /v1/score` — Score a guess against an answer

**Parameters:**
- `guess` (query, required, string) — 5-letter guess Example: `crane`
- `answer` (query, required, string) — 5-letter answer Example: `crate`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/wordle-api/v1/score?guess=crane&answer=crate"
```

**Response:**
```json
{
    "data": {
        "guess": "crane",
        "answer": "crate",
        "legend": {
            "g": "correct position",
            "x": "not in word",
            "y": "wrong position"
        },
        "solved": false,
        "pattern": "gggxg"
    },
    "meta": {
        "timestamp": "2026-05-30T22:48:31.926Z",
        "request_id": "1e26bef2-17c2-42d1-a1d8-6e077a8d33cd"
    },
    "status": "ok",
    "message": "Guess scored",
    "success": true
}
```

#### `GET /v1/solve` — Solve from clues

**Parameters:**
- `guesses` (query, required, string) — word:pattern pairs (g/y/x), comma-separated Example: `crane:xxxgx,slate:ggxxx`
- `limit` (query, optional, string) — Max candidates 1..500 Example: `50`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/wordle-api/v1/solve?guesses=crane%3Axxxgx%2Cslate%3Aggxxx&limit=50"
```

**Response:**
```json
{
    "data": {
        "remaining": 4,
        "candidates": [
            "sling",
            "slink",
            "slung",
            "slunk"
        ],
        "suggestion": "sling",
        "constraints": [
            {
                "guess": "crane",
                "pattern": "xxxgx"
            },
            {
                "guess": "slate",
                "pattern": "ggxxx"
            }
        ]
    },
    "meta": {
        "timestamp": "2026-05-30T22:48:32.006Z",
        "request_id": "daa60328-f37f-4126-8447-78f1d6396aee"
    },
    "status": "ok",
    "message": "Solved",
    "success": true
}
```

#### `GET /v1/validate` — Validate a word

**Parameters:**
- `word` (query, required, string) — 5-letter word Example: `aalii`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/wordle-api/v1/validate?word=aalii"
```

**Response:**
```json
{
    "data": {
        "word": "aalii",
        "valid_guess": true,
        "possible_answer": false
    },
    "meta": {
        "timestamp": "2026-05-30T22:48:32.053Z",
        "request_id": "83af0fc8-3ce4-427e-91be-fbbb57bbdf11"
    },
    "status": "ok",
    "message": "Word validated",
    "success": true
}
```


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