API Reference
The API reference is auto-generated from the public exports of osu-files.
Use the sidebar to browse by declaration category or search for a symbol, parameter, return type, or import path.
Choose a module
Most database work starts at db.<module>.get:
- Beatmaps - Find and edit beatmap snapshots.
- Sets - Find and edit beatmapsets and their files.
- Scores - Find and edit scores by player, date, or beatmap.
- Collections - Find and edit named beatmap collections.
- Rulesets - Find installed rulesets.
- RulesetSettings - Read settings for each ruleset.
- Skins - Find and edit built-in and user skins.
- Files - Find file records by hash.
- Keybindings - Find and edit key bindings.
- ModPresets - Find saved mod presets.
- Metadata - Search embedded beatmap metadata.
Working with results
ts
const maps = db.beatmaps.get
.byArtistContains('Icon For Hire')
.limit(10)
.map(map => map.Metadata?.Title)
const first = db.beatmaps.get
.byOnlineId(506483)
.first()
return { maps, first }Editing results
Editing is part of the normal result-facade workflow. Use write.update() for one typed patch, or autoEdit() when several changes should be committed together.
ts
const session = db.beatmaps.get
.byBpmAbove(180)
.limit(1)
.autoEdit()
for (const beatmap of session) beatmap.Hidden = true
session.commit()
return session.lengthFor lower-level access, see Advanced APIs.