> ## Documentation Index
> Fetch the complete documentation index at: https://docs.diskograf.com/llms.txt
> Use this file to discover all available pages before exploring further.

# List albums

> Published albums with at least one published, non-deleted song and resolved artist avatar URLs. Returned whole by default; pass `limit` to page through them instead, optionally with `artist_id`, `label_id`, `keyword`, and an order. `meta.total` is then the filtered total, not the page size.



## OpenAPI

````yaml /openapi.json get /v1/albums
openapi: 3.1.0
info:
  title: Diskograf API
  description: >-
    A public, read-only REST API over the Diskograf catalogue of Malaysian
    music.


    Public endpoints require no authentication and expose only published

    catalogue rows. Requests are rate limited to 360 per 60 seconds per IP
    address.


    The `/v1/admin` endpoints are the exception: authenticated with a
    short-lived

    bearer token minted by diskograf.com for Backstage staff. They bypass API

    rate limits and are never cached because they expose unpublished rows.


    Every successful response is wrapped in an envelope. List endpoints return

    `{ "data": [...], "meta": { "total", "limit", "offset", "next_cursor" } }`;
    detail endpoints

    return `{ "data": {...} }`. Errors return `{ "error": { "code", "message" }
    }`.
  version: 1.0.0
servers:
  - url: https://api.diskograf.com
    description: Production
security: []
tags:
  - name: Songs
    description: The catalogue of published songs and their credits.
  - name: Albums
    description: Published albums and their track listings.
  - name: Curated Lists
    description: Published editorial song lists.
  - name: Artists
    description: Performers, writers and producers, and their discographies.
  - name: Genres
    description: The genre taxonomy and the songs in each genre.
  - name: Labels
    description: Record labels and their releases.
  - name: Users
    description: Public contributor profiles. Private account fields are never returned.
  - name: Search
    description: Cross-category keyword search.
  - name: Discovery
    description: Composite catalogue selections for exploring Malaysian music.
  - name: Meta
    description: Service index, statistics and health.
  - name: Backstage
    description: >-
      Authenticated, admin-only rows. Never cached. Requires a bearer token
      minted by diskograf.com.
paths:
  /v1/albums:
    get:
      tags:
        - Albums
      summary: List albums
      description: >-
        Published albums with at least one published, non-deleted song and
        resolved artist avatar URLs. Returned whole by default; pass `limit` to
        page through them instead, optionally with `artist_id`, `label_id`,
        `keyword`, and an order. `meta.total` is then the filtered total, not
        the page size.
      operationId: getV1Albums
      parameters:
        - name: keyword
          in: query
          schema:
            type: string
          description: >-
            Album search DSL over title and artist names (`artist:`, `year:`,
            `decade:`). Requires `limit`.
        - name: artist_id
          in: query
          schema:
            type: integer
          description: >-
            Restrict to albums where this artist is explicit, or primary on
            visible tracks when the album has no explicit artists.
        - name: label_id
          in: query
          schema:
            type: integer
          description: Restrict to albums directly assigned to this non-deleted label.
        - name: limit
          in: query
          schema:
            type: integer
            maximum: 100
          description: Page size. Omit to receive every album.
        - name: offset
          in: query
          schema:
            type: integer
            default: 0
        - name: order_column
          in: query
          schema:
            type: string
            enum:
              - released_at
              - song_count
              - title
            default: released_at
        - name: order_direction
          in: query
          schema:
            type: string
            enum:
              - asc
              - desc
            default: desc
      responses:
        '200':
          description: All public albums, or one page of them when `limit` is set.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          minimum: -9007199254740991
                          maximum: 9007199254740991
                        title:
                          type: string
                        album_type:
                          type: string
                          enum:
                            - album
                            - ep
                            - single
                          description: Album release type.
                        artwork_url:
                          description: Absolute CDN URL for the album artwork.
                          type:
                            - string
                            - 'null'
                        song_count:
                          type: integer
                          minimum: -9007199254740991
                          maximum: 9007199254740991
                        latest_released_at:
                          type:
                            - string
                            - 'null'
                        artists:
                          type: array
                          items:
                            type: object
                            properties:
                              id:
                                type: integer
                                minimum: -9007199254740991
                                maximum: 9007199254740991
                              name:
                                type: string
                              prefix_title:
                                type:
                                  - string
                                  - 'null'
                              is_group:
                                type:
                                  - boolean
                                  - 'null'
                              avatar_url:
                                description: Resolved public CDN URL for the artist avatar.
                                type:
                                  - string
                                  - 'null'
                            required:
                              - id
                              - name
                              - prefix_title
                              - is_group
                              - avatar_url
                          description: >-
                            Explicit album artists, or primary artists resolved
                            from visible tracks.
                      required:
                        - id
                        - title
                        - album_type
                        - artwork_url
                        - song_count
                        - latest_released_at
                        - artists
                  meta:
                    type: object
                    properties:
                      total:
                        type: integer
                        minimum: -9007199254740991
                        maximum: 9007199254740991
                        description: >-
                          Total rows matching the query, ignoring page size and
                          position.
                      limit:
                        type: integer
                        minimum: -9007199254740991
                        maximum: 9007199254740991
                        description: >-
                          Page size actually applied. Bounded by
                          apiConfig.maxLimit (80).
                      offset:
                        type: integer
                        minimum: -9007199254740991
                        maximum: 9007199254740991
                        description: >-
                          Zero-based row offset of this page. Legacy field when
                          a cursor is used.
                      next_cursor:
                        description: >-
                          Opaque cursor for the next page. Null means there is
                          no next page.
                        type:
                          - string
                          - 'null'
                    required:
                      - total
                      - limit
                      - offset
                required:
                  - data
                  - meta
        '400':
          $ref: '#/components/responses/BadRequest'
components:
  responses:
    BadRequest:
      description: >-
        A query or path parameter failed validation. The message names the
        offending field.
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: object
                properties:
                  code:
                    type: string
                    enum:
                      - not_found
                      - bad_request
                      - unauthorized
                      - forbidden
                      - rate_limited
                      - internal_error
                  message:
                    type: string
                required:
                  - code
                  - message
            required:
              - error

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.