Skip to content

jackfperryjr/moogleapi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

53 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

moogleAPI moogleAPI

"I'm a SOLDIER, not a database." — Cloud Strife, probably

A free, open REST API for Final Fantasy data — characters, monsters, and games across the entire mainline series. Built with modern .NET 10 and designed to stay fast and cheap to run.

Build Status GitHub Sponsors .NET 10 FastEndpoints License


✨ Features

  • Characters, Monsters & Games across all 16 mainline Final Fantasy titles
  • Full-text search on names and descriptions (case-insensitive, PostgreSQL ILike)
  • Pagination on all list endpoints
  • HybridCache — stampede-proof L1/L2 caching out of the box
  • Rate limiting — 60 req/min anonymous, 600 req/min with an API key
  • Interactive docs at /scalar/v1 (far nicer than Swagger UI)
  • Auto-updating — a GitHub Action scrapes the Final Fantasy Wiki every Sunday

🚀 Quick Start

GET https://api.moogleapi.com/api/characters/search?query=Aerith
GET https://api.moogleapi.com/api/monsters?gameId=7
GET https://api.moogleapi.com/api/games

No API key required. Pass X-Api-Key: your-key to get 10× the rate limit.


📖 Endpoints

Characters

Method Route Description
GET /api/characters List all characters (gameId, page, pageSize)
GET /api/characters/{id} Get a character by ID
GET /api/characters/search Search by name/description (query, gameId)

Monsters

Method Route Description
GET /api/monsters List all monsters (gameId, category, page, pageSize)
GET /api/monsters/{id} Get a monster by ID
GET /api/monsters/search Search by name/description (query, gameId, category)

Games

Method Route Description
GET /api/games List all games (page, pageSize)
GET /api/games/{id} Get a game by ID (includes character + monster counts)

Full interactive docs at /scalar/v1.


🛠 Tech Stack

Layer Technology
Framework FastEndpoints v8 — REPR pattern, one folder per operation
Language C# 14 / .NET 10
Database EF Core 10 + PostgreSQL (Neon serverless)
Validation FluentValidation (built into FastEndpoints)
Caching HybridCache — L1 in-process + optional L2 Redis
Docs Scalar — replaces Swagger UI
Rate Limiting PartitionedRateLimiter (native .NET 10)
Data pipeline GitHub Actions scraper → Final Fantasy Wiki

Project Structure

MoogleApi.sln
├── src/
│   └── MoogleAPI.Web/
│       ├── Features/
│       │   ├── Characters/
│       │   │   ├── Get/          ← Endpoint + Models
│       │   │   ├── GetAll/
│       │   │   └── Search/       ← Endpoint + Models + Validator
│       │   ├── Games/
│       │   │   ├── Get/
│       │   │   └── GetAll/
│       │   └── Monsters/
│       │       ├── Get/
│       │       ├── GetAll/
│       │       └── Search/
│       ├── Infrastructure/
│       │   ├── Data/             ← AppDbContext
│       │   ├── Models/           ← Game, Character, Monster
│       │   └── RateLimiting/
│       ├── wwwroot/              ← Landing page
│       └── Program.cs
├── scripts/
│   └── MoogleAPI.Scraper/        ← Console app, runs in GitHub Actions
└── tests/
    └── MoogleAPI.Tests/

🤖 Data Pipeline

A GitHub Action runs every Sunday at 2 AM UTC and scrapes the Final Fantasy Wiki via the MediaWiki API. It upserts characters and monsters per game — no duplicates, no full reloads.


⚖️ Rate Limits

Tier Limit How
Anonymous 60 req / min Per IP, no setup needed
Premium 600 req / min Pass X-Api-Key: your-key header

Responses over the limit return 429 Too Many Requests.


📜 Disclaimer

MoogleAPI is a fan project and is not affiliated with or endorsed by Square Enix. All Final Fantasy names, characters, and related marks are trademarks of Square Enix Co., Ltd. Data is sourced from the community-maintained Final Fantasy Wiki.


Made with ♥ and too many Phoenix Downs moogleAPI kupo!

About

A free, open REST API for Final Fantasy data — characters, monsters, and games across the entire mainline series. Built with modern .NET 10 and designed to stay fast and cheap to run.

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Contributors