5 min read
Ghost Land

๐Ÿš€ NLib API v2.0.0 โ€” Rewritten with Hono and Node.js for Extreme Performance

Completely rebuilt with Hono and Node.js, the new NLib API delivers up to 30ร— faster responses, multilingual content, optimized media, and prepares for direct metadata sync with Tinfoil and the Nintendo eShop.

Weโ€™re excited to announce NLib API v2.0.0, a full rewrite built for performance, stability, and scalability.
๐Ÿ‘‰ https://api.nlib.cc

Originally developed in Python, the API has been completely rebuilt using Hono and Node.js, backed by a redesigned PostgreSQL database.
This major overhaul brings incredible speed improvements โ€” with some requests now up to 30ร— faster than before.


โš™๏ธ Powered by Hono + Node.js

The new NLib API runs on Hono, a lightweight and high-performance web framework for Node.js.
Its minimal overhead, modern async architecture, and modular design provide unmatched efficiency and reliability.

Key improvements:

  • Average latency under 5 ms in optimized environments
  • Smarter SQL queries that return only requested data
  • Automatic caching for both metadata and media
  • Efficient file and image handling with disk-level optimization

This new foundation sets the stage for future expansion across the Ghost Land ecosystem.


โšก Performance Benchmarks

Hereโ€™s an overview of real-world benchmarks comparing the old Python version with the new Hono + Node.js implementation:

Request TypeOld API (Python)New API (Hono + Node)Speed Gain
Full game info~80 ms6 msร—13 faster
Filtered fields (?fields=name,publisher)~45 ms1.5 msร—30 faster
Image requests (cached)~100 ms4 msร—25 faster

Note:
These benchmarks were performed in a controlled test environment (dedicated host, warm cache, and local PostgreSQL).
Actual response times may vary depending on factors such as network latency, cache state, concurrent load, and hosting configuration.

Even under heavy load, the new API consistently performs far better than the previous version.


๐ŸŽฎ Comprehensive Nintendo Switch Data

  • Complete catalog of Nintendo Switch games
  • Detailed metadata including name, publisher, release date, categories, and version
  • Short introductions and full localized descriptions
  • Direct access to icons, banners, and screenshots

All data is updated multiple times a day to ensure accuracy and freshness.


๐ŸŒ Multi-Language Support

Game data is available in 11 languages:
en, ja, es, de, fr, nl, pt, it, zh, ko, ru

Example request:

GET /nx/01007EF00011E000?lang=fr

If the requested language isnโ€™t available, English is used as fallback.
This makes the API ideal for multilingual platforms and global applications.


๐Ÿ“Š Real-Time Statistics

Developers can access live insights at:

GET /nx/stats

Provides:

  • Total number of indexed titles
  • Breakdown by type (base, update, DLC)
  • Region and console distribution
  • Top publishers and recent updates

Perfect for dashboards, monitoring tools, or data analysis systems.


๐Ÿ–ผ๏ธ Optimized Media Handling

All media is served faster than ever with dynamic resizing and caching.

  • Icons: Resized automatically (30โ€“4096 px, always square)
  • Banners: Multiple presets (240p โ†’ 1080p) or custom dimensions
  • Screenshots: Optimized serving with persistent caching

Example requests:

GET /nx/01007EF00011E000/icon/256
GET /nx/01007EF00011E000/banner/720p
GET /nx/01007EF00011E000/screen/3

Images are delivered in high-quality JPEG with near-instant load times after first access.


๐Ÿ”„ Automatic Synchronization

The synchronization process now runs automatically in multiple stages:

  1. NX Title IDs Sync (daily at 3:00 AM)
    Fetches and indexes all known Nintendo Switch Title IDs.

  2. TitleDB Metadata Sync (3:00 AM & 3:00 PM)
    Updates detailed game data and descriptions in all supported languages.

  3. Upcoming Nintendo eShop Scraper (soon)
    A new automatic scraping system will soon connect directly to Nintendo eShop servers,
    allowing real-time data collection, improved metadata accuracy, and instant updates for new releases.

All synchronization tasks are logged and executed safely, without overwriting existing verified data.


๐Ÿ”ง Upcoming Tinfoil Integration

In the coming days, NLib API v2.0.0 will also power the complete replacement of all metadata directly from Tinfoil.
This major upgrade will:

  • Resolve missing or outdated game information
  • Provide localized, consistent metadata across all users
  • Improve accuracy and loading speed inside Tinfoil

A more unified and reliable experience is on the way for all users.


๐Ÿงฐ Technical Enhancements

  • Modular, Hono-based architecture
  • Simple .env configuration and setup
  • Built-in caching for frequent queries
  • Fine-grained field filtering (?fields=name,publisher)
  • Standardized HTTP responses (200, 404, 500)
  • Clean and predictable structure for integration

Easy to deploy, maintain, and expand as Ghost Land grows.


๐Ÿงพ Database Overhaul

The PostgreSQL schema has been completely restructured for better performance:

  • nx: Core metadata
  • nx_[lang]: Language-specific description tables
  • sync_log: Tracks synchronization operations and statistics

Optimized indexes and query paths ensure minimal database load and faster lookups.


๐Ÿ’ก Why This Rewrite Matters

The old Python version served its purpose but had performance and scalability limits.
With this rewrite, NLib API now offers:

  • Up to 30ร— faster performance
  • A robust Hono + Node.js foundation
  • Global language and media support
  • Real-time synchronization
  • Future eShop scraping integration
  • Direct metadata synchronization with Tinfoil

NLib API v2.0.0 marks a major step forward for Ghost Landโ€™s infrastructure and ecosystem.


๐Ÿ’ฌ Thank You

A sincere thank you to everyone who supported the transition to this new version and provided valuable feedback during development.
Your engagement helps us continue improving Ghost Land services and deliver better performance for all users.

NLib API v2.0.0 is now live - faster, smarter, and ready for whatโ€™s next.