LIVE

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.

No auth required
JSON responses
GET only
CORS enabled

Base URL & Conventions

How the API is structured

Base URL
https://fnaf-api.gsarvente.workers.dev
Format
All responses are application/json. Trailing slashes are stripped automatically.
Slug convention
Name/title URL params are slugified: lowercased, spaces -> -, special chars removed.
e.g. Freddy Fazbear -> freddy-fazbear
Pagination
All list endpoints support ?limit= and ?offset= for cursor-style pagination.
All endpoints are read-only (GET). No API key is required. The root endpoint GET / returns a live summary of all available routes and values.

Error Handling

How errors are returned

StatusMeaningExample 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

Character object
idnumber
namestring
animalstring
typestring
colorstring[]
eyeColorstring[]
yearnumber|"Unknown"
imgstring
Available types
ClassicWitheredToy ShadowNightmareFuntime GlamrockRockstarPhantom SpringlockRuinedS.T.A.F.F. Bot EndoPlushMascot Suit Jack-OTrashOther + more

GET
/characters
List all characters — filterable and paginated
Query parameters
ParameterTypeDescription
typeoptionalstringFilter by type (e.g. Classic)
animaloptionalstringFilter by animal (e.g. Bear)
coloroptionalstringFilter by body color (e.g. Purple)
eyeColoroptionalstringFilter by eye color
yearoptionalnumberFilter by origin year (e.g. 1987)
limitoptionalnumberMax results to return
offsetoptionalnumberResults to skip (for pagination)
Response
{ "total": 335, "count": 2, "offset": 0, "limit": 2, "characters": [ { "id": 1, "name": "Freddy Fazbear", "animal": "Bear", "type": "Classic", "color": ["Brown"], "eyeColor": ["Blue"], "year": 1993, "img": "images/chars/classic/freddy.png" }, ... ] }
GET
/characters/random
Returns a single random character

No parameters. Returns a single character object chosen at random from all 335.

Response
{ "id": 42, "name": "Nightmare Bonnie", "animal": "Rabbit", "type": "Nightmare", "color": ["Dark Blue"], "eyeColor": ["Red"], "year": 2015, "img": "images/chars/nightmare/nightmare_bonnie.png" }
GET
/characters/:id
Fetch a character by numeric ID
ParameterTypeDescription
idrequirednumberNumeric character ID (1-based, sequential)
{ /* single character object */ }
GET
/characters/name/:name
Fetch a character by slugified name
ParameterTypeDescription
namerequiredstringSlugified name (e.g. freddy-fazbear)
GET /characters/name/golden-freddy
GET
/types  &  /types/:type
List all types, or get characters of a specific type

GET /types returns all types with their slug and character count.
GET /types/nightmare returns all characters of that type.

{ "total": 25, "types": [ { "name": "Classic", "slug": "classic", "count": 14 }, ... ] }
GET
/animals  &  /animals/:animal
List all animals, or get characters of a specific animal

Identical structure to /types. 55 animal categories total, including Bear, Fox, Rabbit, and more exotic ones like Blob, Rainbow, or Slime.

GET /animals/fox -> returns all fox-type characters

Books

48 titles across 10 series

Book object
idnumber
titlestring
seriesstring
yearnumber
numbernumber
imgstring
Available series
Trilogy Fazbear's Frights Tales from the Pizzaplex Fazbear Frights Graphic Novel Collection Tales from the Pizzaplex Graphic Novel Collection Freddy Files Encyclopedia Interactive Novels Lore Relevant Movie

GET
/books
List all books — filterable and paginated
ParameterTypeDescription
seriesoptionalstringFilter by series name
yearoptionalnumberFilter by release year
limitoptionalnumberMax results
offsetoptionalnumberSkip N results
Response
{ "total": 48, "count": 3, "offset": 0, "limit": 3, "books": [ /* book objects */ ] }
GET
/books/random
Returns a single random book

No parameters. Returns one book object at random.

GET
/books/:id
Fetch a book by numeric ID
ParameterTypeDescription
idrequirednumberNumeric book ID
GET
/books/title/:title
Fetch a book by slugified title
ParameterTypeDescription
titlerequiredstringSlugified title (e.g. the-silver-eyes)
GET /books/title/the-silver-eyes
GET
/books/series  &  /books/series/:series
List all series, or get books from a specific series

GET /books/series -> all series with slug + count.
GET /books/series/trilogy -> all books in the Trilogy.

{ "total": 10, "series": [ { "name": "Trilogy", "slug": "trilogy", "count": 3 }, ... ] }

Images

Redirects to GitHub raw content

GET
/images/:category/:type/:filename
Redirects (302) to GitHub raw image

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/…

Image paths from the database
images/chars/classic/freddy.png images/chars/nightmare/… images/chars/toy/… images/books/trilogy/1.png images/books/…
GET /images/chars/classic/freddy.png -> 302 -> https://raw.githubusercontent.com/emilia-gomes2008/fnaf-api/main/images/chars/classic/freddy.png