Crate separates two distinct ideas of search: querying a remote provider (MusicBrainz, Deezer, or a custom gRPC backend) to discover artists and albums, and querying your local library to find content you’re already watching. The browse endpoints sit in between — they fetch rich detail from a provider about a specific artist or album without adding anything to your library. Once you’ve found what you want, the watch endpoints commit it.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/TheOutdoorProgrammer/crate/llms.txt
Use this file to discover all available pages before exploring further.
GET /api/search
Queries the active provider for artists matching the given string. By default it uses whichever provider is set as primary in Settings; passprovider to override per-request. Results are paginated with limit and offset.
Query Parameters
The artist search query. Returns a
400 error if omitted.Provider name to search against (e.g.
deezer, musicbrainz). Defaults to the configured primary provider.Maximum number of results to return. Defaults to
25.Number of results to skip for pagination. Defaults to
0.Array of artist results from the provider.
Total number of matching results available on the provider.
GET /api/library/search
Searches your local library — artists, albums, and tracks that are already in Crate’s database. Returns up to 50 results across all entity types. Pass an emptyq and the endpoint returns an empty array rather than an error.
Query Parameters
Search string matched against artist names, album titles, and track titles in the local database.
LibrarySearchResult objects. Each result represents a matching track and carries IDs and display names for the track, its parent album, and its artist, so the UI can navigate to any level without additional requests.
Crate’s internal ID for the artist.
Display name of the artist.
Crate’s internal ID for the album.
Title of the album.
Crate’s internal ID for the matching track.
Title of the matching track.
GET /api/browse/artist/
Fetches full artist detail from the provider — including the complete album list — without modifying the local library. Also returns which albums and tracks are already watched so the UI can highlight them. Thewatched_album_ids field contains the provider IDs of albums already in your library.
Path Parameters
Provider-specific artist ID (string). Obtained from
GET /api/search.Provider to query. Defaults to the configured primary.
Provider-specific artist ID.
Artist display name.
Artist image URL from the provider.
Arbitrary provider metadata key-value pairs.
Total number of albums returned by the provider.
Full list of albums from the provider, each with
id, title, cover_url, year, and record_type.Provider IDs of albums already in your Crate library.
true if this artist is in your library with watched status.GET /api/browse/artist//tracks
Searches within a specific artist’s catalog on the provider. Useful for finding individual tracks before using the watch-track endpoint. Path ParametersProvider-specific artist ID.
Search query to match against the artist’s tracks. Returns an empty
{ "tracks": [] } if omitted.Provider to query. Defaults to the configured primary.
GET /api/browse/album/
Fetches full album detail from the provider, including the complete track list. Also returns which tracks from this album are already in your library (watched_track_ids) and whether the entire album is considered watched.
Path Parameters
Provider-specific album ID (string). Obtain from
GET /api/browse/artist/{id} album list.Provider to query. Defaults to the configured primary.
Provider-specific album ID.
Album title.
Display name of the album artist.
Release year. May be
0 if unknown.URL to album artwork from the provider.
Complete ordered track list with
id, title, track_number, disc_number, and duration_ms.Arbitrary provider metadata.
true if every track on this album is already in your library.Provider IDs of individual tracks already in your Crate library.
The Crate internal album ID if this album is already in the library, otherwise
null.Watch Endpoints
The watch endpoints add a provider entity into your Crate library. All three accept an optionalprovider field in the request body to specify which provider to use; if omitted, the configured primary is used.
Watch endpoints return
201 Created for new entities and 200 OK if the entity already exists in your library.POST /api/watch/artist/
Watches a full artist discography. All albums are fetched from the provider and saved with statuswatched; all tracks are created as wanted and enqueued for download in the background. Pass watch_new_releases: true to automatically add albums released after this moment.
Provider-specific artist ID.
Artist object (see Artists API for the full model).
POST /api/watch/album/
Watches a single album. If the album’s artist is not yet in the library, a partial artist entry is created automatically. Tracks are created aswanted.
Provider-specific album ID.
Album object.
POST /api/watch/track/
Watches a single track. Creates minimal artist and album stubs if they don’t already exist in the library. The track is created with statuswanted.
Provider-specific track ID.
Track object.
Library Import
These endpoints drive the built-in library importer, which reads embedded tags from MP3 and FLAC files on disk and creates the corresponding artist, album, and track records in Crate. The importer never modifies any audio files.POST /api/library/import
Starts an import run. Only one import can run at a time; sending a second request while one is already running returns409 Conflict. Pass dry_run: true to preview what would be imported without writing anything to the database.
Request body (optional)
Absolute path to a directory to scan. Defaults to the configured library path when omitted.
When
true, the importer scans and reports results without making any database changes. Defaults to false.ImportState object (see GET /api/library/import below for the full shape). Poll that endpoint to track progress.
GET /api/library/import
Returns the current state of the importer. Poll this endpoint while status is"running" to track progress.
Response — 200 OK
Current importer state:
"idle" (not yet started), "running" (scan in progress), "done" (finished successfully), or "failed" (encountered a fatal error).Whether this run was a dry run.
The directory path that was (or is being) scanned. Omitted when idle.
RFC 3339 timestamp when the import started. Omitted when idle.
Number of files processed so far.
Total number of files to process.
Populated when
status is "done" or "failed". Contains a summary of what the import did.Error message when
status is "failed". Omitted otherwise.