Dictionary API

The Dictionary API provides access to the Jarvis dictionary database, including definitions, word metadata, Word of the Day, word search, Wordle helpers, Hangman helpers, Scrabble helpers and anagram tools.

Base Endpoint
/api/dictionary/[action]/[object]
Part Description
action The operation being performed.
object Optional value used by the action.
Available Endpoints
Endpoint Description
/api/dictionary List dictionary words.
/api/dictionary/random Random word.
/api/dictionary/wotd Word of the Day.
/api/dictionary/id/{id} Lookup by internal ID.
/api/dictionary/word/{word} Lookup an exact word.
/api/dictionary/search/{query} Search for words.
/api/dictionary/type/{type} List words by type.
/api/dictionary/types List available word types.
/api/dictionary/length/{length} Words of a specific length.
/api/dictionary/starts/{text} Words beginning with text.
/api/dictionary/ends/{text} Words ending with text.
/api/dictionary/contains/{text} Words containing text.
/api/dictionary/wordle Random Wordle-compatible word.
/api/dictionary/hangman Random Hangman-compatible word.
/api/dictionary/scrabble/{letters} Find valid words from supplied letters.
/api/dictionary/count Dictionary statistics.
Query Parameters
Parameter Example Description
limit 25 Maximum results returned.
type noun Filter by word type.
length 5 Filter by word length.
Word Lookup Examples
GET /api/dictionary/word/example
GET /api/dictionary/id/12345
GET /api/dictionary/search/game
GET /api/dictionary/search/light
Word Filtering Examples
GET /api/dictionary/type/noun
GET /api/dictionary/type/verb
GET /api/dictionary/length/5
GET /api/dictionary/length/10
GET /api/dictionary/starts/un
GET /api/dictionary/ends/ing
GET /api/dictionary/contains/able
Random Word Examples
GET /api/dictionary/random
GET /api/dictionary/random?length=5
GET /api/dictionary/random?type=noun
GET /api/dictionary/random?length=8&type=verb
Word Of The Day
WOTD Generation Rules
  • If a word already exists with today's WOTD date, it is returned.
  • If no WOTD exists for today, a new random word is selected.
  • The selected word cannot have appeared within the previous 30 WOTD selections.
  • The selected word is automatically assigned today's date.
  • The assigned word is returned to the caller.
GET /api/dictionary/wotd
Wordle Helper

Returns a random word suitable for Wordle games. Words do not contain apostrophes, hyphens or multiple words.

GET /api/dictionary/wordle
GET /api/dictionary/wordle?length=5
GET /api/dictionary/wordle?length=6
Example Response:
{
    "word": "apple",
    "word_length": 5,
    "type": "noun"
}
Hangman Helper

Returns a random word suitable for Hangman games.

GET /api/dictionary/hangman
GET /api/dictionary/hangman?length=8
GET /api/dictionary/hangman?length=12
Example Response:
{
    "word": "elephant",
    "word_length": 8
}
Scrabble Helper

Supply available letters and the API returns all valid words which can be formed using those letters.

GET /api/dictionary/scrabble/stream
GET /api/dictionary/scrabble/example
GET /api/dictionary/scrabble/computer
Example Response:
[
    {
        "word": "master",
        "word_length": 6
    },
    {
        "word": "stream",
        "word_length": 6
    },
    {
        "word": "teams",
        "word_length": 5
    },
    {
        "word": "steam",
        "word_length": 5
    }
]
Example:
Input Letters Possible Words
stream stream, master, steam, teams, meats
listen listen, silent, enlist, inlets
stone stone, tones, notes, ones, tone
Word Types
GET /api/dictionary/types
Example Response:
[
    {
        "type": "noun",
        "word_count": 45213
    },
    {
        "type": "verb",
        "word_count": 18245
    },
    {
        "type": "adjective",
        "word_count": 11238
    }
]
Statistics
GET /api/dictionary/count
Example Response:
{
    "total": 275643,
    "types": 8,
    "shortest": 1,
    "longest": 45
}
Example Dictionary Response
{
    "id": 12345,
    "word": "example",
    "word_length": 7,
    "type": "noun",
    "multi": false,
    "hyphens": 0,
    "apostrophe": 0,
    "data": [
        {
            "definition": "A representative form or pattern."
        }
    ]
}

Authentication & Rate Limits

All Jarvis APIs require a valid API token. Tokens are issued through the Jarvis Developer Portal and are associated with an account plan which determines access levels and request limits.

Authentication

Every request must include a valid API token. Requests made without a token or with an invalid token will be rejected.

Authorization Header (Recommended)
Authorization: YOUR_API_TOKEN
X-API-Token Header
X-API-Token: YOUR_API_TOKEN
Query String
GET /api/flags/random?token=YOUR_API_TOKEN
For security reasons, the Authorization header method is strongly recommended. Avoid exposing API tokens in URLs where possible.
Example Requests
cURL
curl \
-H "Authorization: YOUR_API_TOKEN" \
https://jarvisbot.uk/api/flags/random
JavaScript (Fetch)
fetch("https://jarvisbot.uk/api/jokes/random", {
    headers: {
        "Authorization": "YOUR_API_TOKEN"
    }
})
.then(r => r.json())
.then(console.log);
PHP
$response = file_get_contents(
    "https://jarvisbot.uk/api/questions/random",
    false,
    stream_context_create([
        'http' => [
            'header' => [
                'Authorization: YOUR_API_TOKEN'
            ]
        ]
    ])
);

$data = json_decode($response, true);
Account Plans
Plan Daily Requests API Access
Free 100 Requests Basic APIs
Premium 10,000 Requests All APIs
Enterprise Unlimited All APIs + Priority Support
Rate Limiting

API usage is automatically monitored based on your account type. Once your limit is reached, requests will be temporarily blocked until your allowance resets.

Plan Limit Window
Free 100 Requests 24 Hours
Premium 10,000 Requests 24 Hours
Enterprise Unlimited No Restriction
Authentication Error Response
{
    "success": false,
    "error": "invalidToken",
    "msg": "API token required"
}
Invalid Token Response
{
    "success": false,
    "error": "invalidToken",
    "msg": "Invalid API token"
}
Rate Limit Response
{
    "success": false,
    "error": "rateLimit",
    "msg": "API limit exceeded",
    "plan": "free",
    "limit": 100
}
Best Practices
  • Store API tokens securely and never expose them publicly.
  • Use the Authorization header whenever possible.
  • Cache responses where appropriate to reduce API calls.
  • Monitor your daily usage to avoid rate limiting.
  • Upgrade your account if your application requires higher throughput.
Supported APIs
  • Flags API
  • Dictionary API
  • Questions API
  • Riddles API
  • Jokes API
  • Pickup Lines API
  • Truth Or Dare API
  • Harry Potter Spells API
  • Future Jarvis APIs
Need additional capacity or custom limits? Contact the Jarvis team to discuss Premium and Enterprise API access.