Getting Started
Making your first API call
Section titled “Making your first API call”The API is hosted at https://l2api.dev and all routes live under /api/[chronicle]/....
Example requests
Section titled “Example requests”Here are four quick curl examples to get a feel for the API:
Fetch an item (Adena):
curl https://l2api.dev/api/interlude/items/57Fetch a monster (Queen Ant):
curl https://l2api.dev/api/interlude/monsters/29001Fetch a quest (Letters of Love):
curl https://l2api.dev/api/interlude/quests/1Fetch the OpenAPI spec:
curl https://l2api.dev/api/openapi.jsonAll examples use the interlude chronicle. The chronicle is a required URL segment on every endpoint.
Running the API locally
Section titled “Running the API locally”The generated dataset (data/generated/interlude/) is committed to the repository, so a fresh clone runs the full API without needing a local datapack.
# Clone and installgit clone https://github.com/cuteshaun/lineage2-apicd lineage2-apipnpm install
# Start the development serverpnpm devThe API will be available at http://localhost:3000/api/interlude/….
Building for production
Section titled “Building for production”pnpm buildpnpm startRegenerating the dataset
Section titled “Regenerating the dataset”The data/generated/interlude/ JSON files are the source of truth the API serves. To regenerate them:
pnpm build:dataThis 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.
OpenAPI spec
Section titled “OpenAPI spec”The machine-readable OpenAPI 3.0.3 specification is available at:
GET https://l2api.dev/api/openapi.jsonThis 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.