FNaF API Docs
A REST API for Five Nights at Freddy's data — 335 characters and 48 books, fully filterable and searchable. Built on Cloudflare Workers.
Base URL & Conventions
How the API is structured
application/json. Trailing slashes are stripped automatically.-, special chars removed.e.g.
Freddy Fazbear -> freddy-fazbear?limit= and ?offset= for cursor-style pagination.GET / returns a live summary of all available routes and values.
Error Handling
How errors are returned
| Status | Meaning | Example body |
|---|---|---|
| 200 | Success | { ... data ... } |
| 400 | Bad request (e.g. non-numeric ID, missing ?q=) |
{ "error": "ID deve ser um número" } |
| 404 | Not found (unknown route or resource) | { "error": "Personagem \"...\" não encontrado" } |
Characters
335 animatronics, with 25 types and 55 animal categories
| Parameter | Type | Description |
|---|---|---|
| typeoptional | string | Filter by type (e.g. Classic) |
| animaloptional | string | Filter by animal (e.g. Bear) |
| coloroptional | string | Filter by body color (e.g. Purple) |
| eyeColoroptional | string | Filter by eye color |
| yearoptional | number | Filter by origin year (e.g. 1987) |
| limitoptional | number | Max results to return |
| offsetoptional | number | Results to skip (for pagination) |
No parameters. Returns a single character object chosen at random from all 335.
| Parameter | Type | Description |
|---|---|---|
| idrequired | number | Numeric character ID (1-based, sequential) |
| Parameter | Type | Description |
|---|---|---|
| namerequired | string | Slugified name (e.g. freddy-fazbear) |
| Parameter | Type | Description |
|---|---|---|
| qrequired | string | Search query (case-insensitive, partial match) |
GET /types returns all types with their slug and character count.GET /types/nightmare returns all characters of that type.
Identical structure to /types. 55 animal categories total, including Bear, Fox, Rabbit, and more exotic ones like Blob, Rainbow, or Slime.
Books
48 titles across 10 series
| Parameter | Type | Description |
|---|---|---|
| seriesoptional | string | Filter by series name |
| yearoptional | number | Filter by release year |
| limitoptional | number | Max results |
| offsetoptional | number | Skip N results |
No parameters. Returns one book object at random.
| Parameter | Type | Description |
|---|---|---|
| idrequired | number | Numeric book ID |
| Parameter | Type | Description |
|---|---|---|
| titlerequired | string | Slugified title (e.g. the-silver-eyes) |
| Parameter | Type | Description |
|---|---|---|
| qrequired | string | Case-insensitive partial match on title, series name, or year |
GET /books/series -> all series with slug + count.GET /books/series/trilogy -> all books in the Trilogy.
Images
Redirects to GitHub raw content
The API proxies image requests via a 302 redirect to the GitHub repository's raw content at raw.githubusercontent.com/emilia-gomes2008/fnaf-api/main/…