> ## 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 a song's albums

> Published albums containing this published, non-deleted song, ordered by album title.



## OpenAPI

````yaml /openapi.json get /v1/songs/{songId}/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/songs/{songId}/albums:
    get:
      tags:
        - Albums
      summary: List a song's albums
      description: >-
        Published albums containing this published, non-deleted song, ordered by
        album title.
      operationId: getV1SongsBySongIdAlbums
      parameters:
        - name: songId
          in: path
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: The song's public albums.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          minimum: -9007199254740991
                          maximum: 9007199254740991
                        title:
                          type: string
                        artwork_url:
                          default: null
                          description: Absolute CDN URL for the album artwork.
                          type:
                            - string
                            - 'null'
                        artwork_colors:
                          default: null
                          description: Saved colours sampled from the artwork, as hex.
                          anyOf:
                            - type: object
                              properties:
                                dominant:
                                  type: string
                                average:
                                  type: string
                              required:
                                - dominant
                                - average
                            - type: 'null'
                        released_at:
                          description: Manual album release date, when available.
                          type:
                            - string
                            - 'null'
                        position:
                          type: integer
                          minimum: -9007199254740991
                          maximum: 9007199254740991
                      required:
                        - id
                        - title
                        - artwork_url
                        - released_at
                        - position
                  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
        '404':
          $ref: '#/components/responses/NotFound'
components:
  responses:
    NotFound:
      description: The requested resource does not exist, or is not public.
      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.