Quick start
The production base URL is:/v1. Every catalogue request uses GET and is available without an API key.
GET /v1 to retrieve the current route index, or GET /health to check whether the service can reach its database.
The API is for reading public data. Use Diskograf’s web app to sign in, contribute catalogue data, or manage an account.
Access, visibility, and limits
Access
- No authentication or API key is required.
- The API accepts
GETand CORS preflightOPTIONSrequests. - The API is read-only. It does not expose write, account, or administrative operations.
Public data rules
The API applies the same public visibility rules as the web app:- Song endpoints return published, non-deleted songs only.
- User endpoints return public, claimed, non-banned member profiles.
- A public user profile may link to a claimed artist profile. Private account fields are never returned.
- Labels are included when they are associated with at least one published song.
Rate limits
Production traffic is limited to 60 requests per 60 seconds per IP address. When the limit is reached, the API returns429 Too Many Requests with a Retry-After: 60 header.
Caching
Catalogue responses include these cache directives:Response format
Most endpoints use one of these envelopes:
For list responses,
meta.total is the number of matching or returned records, depending on the endpoint. Full lists such as genres and roles use the list envelope even though they do not accept pagination parameters.
The health endpoint is the exception. It returns a direct status object rather than a data envelope.
Pagination and filtering
limit and offset
limitis the number of records to return. The default is20.offsetis zero-based. The default is0.- Invalid, negative, or out-of-range values return
400 Bad Request. - The effective maximum depends on the collection:
Genres and roles return their complete public lists and do not use
limit or offset query parameters.
Repeated filters
Array filters accept either comma-separated values or repeated query parameters. These requests are equivalent:genre and role filters use slugs. Empty values are ignored.
Search and ordering
qis trimmed and accepts up to 200 characters.orderacceptsascordescwhere the endpoint supports ordering.- Invalid
sort,order, filter, or identifier values return400 Bad Request. - When stable ordering matters, provide both
sortandorderinstead of relying on a resource’s default.
Endpoint reference
Service endpoints
Songs
For
/v1/songs, q searches song titles and credited artists. artist_id and label_id accept positive integer IDs. Song list responses contain song cards; see Song data.
Artists
Artist-specific routes return
404 when the artist is unknown or not publicly available. For the directory endpoint:
qsearches artist names and aliases.letterfilters by the first character. Use#for names that begin with a non-letter.statusacceptsuserornot-user.bandacceptstrueorfalseto filter groups or individuals.
Genres
An unknown genre slug returns
404 rather than an empty collection.
Labels
An unknown label returns
404. The label detail endpoint intentionally returns only public label metadata; internal import metadata is not part of the API.
Public users and contributors
For
/v1/users:
qsearches names and usernames.filteracceptseveryone,fans,artists, orcontributors.sortacceptsactive,newest,contributions, orname.
404 for an unavailable username. The songs endpoint also returns 404 when the member does not have a claimed artist profile.
Search and reference data
Search is not paginated. It currently returns up to 50 songs, 30 artists, and 20 labels in the response.
Resource data
Song data
Song card
Song cards are used by song lists, search results, similar songs, artist and label discographies, and contribution history.Song detail
Song detail addspublished_at, views, claps, and the complete credit and classification data:
order, an artist object, and a role object. A role can be null for an unclassified credit. Each genre contains id, slug, and title; each label contains id and name.
Song contributors
GET /v1/songs/{songId}/contributors returns:
{ "username", "name", "avatar_url" }. The contributions array contains the action name, timestamp, and public user for each event. This is a timeline, not a full historical snapshot of every version of a song.
Artist data
Artist cards contain:null. Artist detail adds:
aliases,biodata,country, andplace.linkswithwebsite,instagram,twitter,tiktok,youtube, andfacebookkeys.roles, each withid,slug,title, and a creditcount.genres, each withid,slug,title, and a songcount.associated_acts, each withid,name, andslug.
Genre and label data
Genre list items containid, slug, title, color, and song_count. A genre detail item also includes description.
Label list items contain id, name, slug, and song_count. Label detail contains id and name.
User data
A public user profile contains:artist is either null or an object containing the claimed artist’s id, name, slug, is_group, total_songs, total_credits, first_release_year, last_release_year, and avatar_url.
User directory items also include joined_at and contribution_count. The overview endpoint returns:
active represents the recent 30-day window. active and all_time contain the top public contributors and are capped at 10 entries each.
Contribution history items contain id, action, action_at, and song. song is either a song card or null when the related song is no longer publicly available.
Search data
GET /v1/search returns one item envelope with three arrays:
songs array contains song cards. Artist search results contain the public artist card fields needed for discovery. Label search results contain id, name, and slug.
Roles and stats
Role items containid, slug, title, and order.
The stats response contains:
Errors
Errors use the same JSON shape:
Unknown routes return
404 and include a message pointing you to GET /v1. The health endpoint uses 503 for a database connectivity failure and returns its direct health status shape.
Versioning
Use the/v1 prefix in production integrations. Backward-compatible fields and routes may be added. Treat existing fields and route behavior as stable within the version, and handle unknown response fields without failing.
The API is intentionally read-only. For contributions, account features, and authenticated workflows, direct users to diskograf.com.