# Hangman Word Generator API

> Hangman Word Generator provides random hangman words for word games, with difficulty levels based on word length and, on paid plans, category filtering.

**Endpoint:** `GET https://api.apiverve.com/v1/hangmanword`  
**Category:** Games  
**Cost:** 1 credit per call  
**Canonical page:** https://apiverve.com/marketplace/hangmanword

## Overview

A hangman generator API for games, classrooms, and party apps. Each of the six categories holds roughly 70 to 100 words across all lengths, including short ones for young players, and multi-word answers such as New Zealand or ice cream keep their space. Each word includes its length, unique letter count, and suggested maximum guesses. Paid plans also return printable HTML for offline play.

## Authentication

Every call carries your key in an `x-api-key` header. The same key works across the whole
APIVerve catalog — there are no per-API subscriptions. Responses always use the same three
top-level keys: `status`, `error`, and `data`.

## Example request

```bash
curl "https://api.apiverve.com/v1/hangmanword?category=animals&difficulty=medium&count=1&image=true" \
  -H "x-api-key: YOUR_API_KEY"
```

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `category` | string | No | Word category. default random. One of: random, animals, countries, foods, sports, colors, occupations. Premium field |
| `difficulty` | string | No | Difficulty by letter count: easy is 6 letters or fewer, medium 5-9, hard 8 or more. default medium. One of: easy, medium, hard |
| `count` | integer | No | Number of words. default 1. range 1-10. Premium field |
| `image` | boolean | No | Set to true to generate a downloadable puzzle image. default false. Premium field |

## Response fields

  - `words.0.word` — string · The actual word to guess in uppercase
  - `words.0.blanks` — string · One underscore per letter separated by spaces; a multi-word answer such as NEW ZEALAND keeps a wider three-space gap between its words
  - `words.0.length` — number · Total number of letters in the word, not counting the space in a multi-word answer
  - `words.0.uniqueLetters` — number · Count of distinct letters in the word
  - `words.0.difficulty` — string · Difficulty level of the word difficulty
  - `words.0.category` — string · Category classification of the word
  - `words.0.maxGuesses` — number · Recommended maximum wrong guesses allowed
- `count` — number · Number of words returned in response
- `difficulty` — string · Overall difficulty level requested
- `category` — string · Overall category requested in query
- `html` — string · Rendered HTML for offline hangman game play · (premium)
- `image` — object · The rendered puzzle image, present only when image=true is requested · (premium)
  - `image.imageName` — string · Unique identifier name of generated image file · (premium)
  - `image.format` — string · File format of the generated image file · (premium)
  - `image.downloadURL` — string · Signed URL for downloading the generated image · (premium)
  - `image.expires` — number · Unix timestamp when download URL expires · (premium)

## Sample response

```json
{
  "status": "ok",
  "error": null,
  "data": {
    "words": [
      {
        "word": "PORCUPINE",
        "blanks": "_ _ _ _ _ _ _ _ _",
        "length": 9,
        "uniqueLetters": 8,
        "difficulty": "medium",
        "category": "animals",
        "maxGuesses": 7
      }
    ],
    "count": 1,
    "difficulty": "medium",
    "category": "animals",
    "html": "<html><head><title>Hangman Words</title><style>body {font-family: Arial, sans-serif; padding: 20px; max-width: 600px; margin: 0 auto;}h1 {text-align: center;}.word-card {background: #f5f5f5; padding: 25px; margin: 20px 0; border-radius: 10px; text-align: center;}.blanks {font-size: 32px; font-family: monospace; letter-spacing: 8px; margin: 20px 0;}.info {font-size: 14px; color: #666;}.category {background: #2196F3; color: white; padding: 5px 15px; border-radius: 20px; display: inline-block; margin-bottom: 15px;}.hangman {font-size: 40px; margin: 20px 0;}</style></head><body><h1>Hangman</h1><div class='word-card'><span class='category'>animals</span><div class='hangman'>&#128128;</div><div class='blanks'>_ _ _ _ _ _ _ _ _</div><div class='info'>9 letters | 8 unique | Max 7 wrong guesses</div></div></body></html>",
    "image": {
      "imageName": "d6e69eac-546c-4a2b-8413-2b65fd4a109a_hangman.png",
      "format": ".png",
      "downloadURL": "https://storage.googleapis.com/apiverve/APIData/hangmanword/d6e69eac-546c-4a2b-8413-2b65fd4a109a_hangman.png?GoogleAccessId=635500398038-compute%40developer.gserviceaccount.com&Expires=1766010232&Signature=En2KyqlZwODc1wOwqTyuVtHq5LqNHuFXdn9Xw6nKlwhmB2SMV9HTSwpfVi9SS1tC6tnq0sntOPZ4ANH8McPxnjqFJhT2VKXAObQSRha6IHR9J1ymSpH%2F5TJ4AmlRZ8nLvW1jXPWjNvnUvgrd%2BfN5zK1u9pQ1MYatBVeg63y0rOdxSPcJBMX%2BDdgzG1lJK3Rmugr0HWoVb9ocfk8R%2FGVPsLXzHuwZySOk%2BCyQ1IZAWoqYuX7v3wKf3JHhiK9ZQ%2FG58j2dSychhcDsBZyKXN1wSpRsRB%2F03F6zKkykiiVw%2FuGr9kjPGK1QRJ9XJZzLZ0Z9S%2BQ6ZoD5FrCJwTIVXTPHxg%3D%3D",
      "expires": 1766010232291
    }
  }
}
```

## Use cases

- **Game Development** — Power hangman games with curated word lists
- **Educational Apps** — Create vocabulary games with categorized words
- **Party Games** — Generate words for group hangman activities
- **Language Learning** — Build vocabulary exercises with themed word lists

## SDKs

- **npm** — `npm install @apiverve/hangmanword` (https://www.npmjs.com/package/@apiverve/hangmanword)
- **NuGet** — `dotnet add package APIVerve.API.HangmanWordGenerator` (https://www.nuget.org/packages/APIVerve.API.HangmanWordGenerator)
- **Source** — https://github.com/apiverve/hangmanword-api

## More

- Full reference: https://docs.apiverve.com/ref/hangmanword
- Get an API key: https://dashboard.apiverve.com
- Full catalog: https://apiverve.com/marketplace
