Skip to content

Getting Started

The API is hosted at https://l2api.dev and all routes live under /api/[chronicle]/....

Here are four quick curl examples to get a feel for the API:

Fetch an item (Adena):

Terminal window
curl https://l2api.dev/api/interlude/items/57

Fetch a monster (Queen Ant):

Terminal window
curl https://l2api.dev/api/interlude/monsters/29001

Fetch a quest (Letters of Love):

Terminal window
curl https://l2api.dev/api/interlude/quests/1

Fetch the OpenAPI spec:

Terminal window
curl https://l2api.dev/api/openapi.json

All examples use the interlude chronicle. The chronicle is a required URL segment on every endpoint.

The generated dataset (data/generated/interlude/) is committed to the repository, so a fresh clone runs the full API without needing a local datapack.

Terminal window
# Clone and install
git clone https://github.com/cuteshaun/lineage2-api
cd lineage2-api
pnpm install
# Start the development server
pnpm dev

The API will be available at http://localhost:3000/api/interlude/.

Terminal window
pnpm build
pnpm start

The data/generated/interlude/ JSON files are the source of truth the API serves. To regenerate them:

Terminal window
pnpm build:data

This command requires:

  • A local aCis Interlude datapack checkout configured in scripts/chronicle-sources.ts
  • Optionally, Lineage 2 client DAT files for enhanced data extraction

The datapack and DAT files are not redistributed. After regenerating, the JSON diff is reviewed in PR alongside any parser changes—the dataset is an audited artifact.

The machine-readable OpenAPI 3.0.3 specification is available at:

GET https://l2api.dev/api/openapi.json

This is a Phase-A stub covering shared reference schemas but not full per-route coverage. See docs/api-contract.md in the repository for the detailed contract.