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

# Get Songs

> Retrieve songs from the database with optional filtering by ISRC (International Standard Recording Code) or artist account. This endpoint joins the songs table with song_artists and accounts tables to provide comprehensive song information.

<Note>
  The Songs API also supports POST requests for bulk create/fetch operations. See the [Create Songs](/api-reference/songs/create) endpoint.
</Note>


## OpenAPI

````yaml get /api/songs
openapi: 3.1.0
info:
  title: Recoup API - Releases
  description: >-
    API documentation for the Recoup platform - an AI agent platform for the
    music industry
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.recoupable.dev
security: []
paths:
  /api/songs:
    get:
      description: >-
        Retrieve songs from the database with optional filtering by ISRC
        (International Standard Recording Code) or artist account. This endpoint
        joins the songs table with song_artists and accounts tables to provide
        comprehensive song information.
      parameters:
        - name: isrc
          in: query
          description: International Standard Recording Code to filter by specific song
          required: false
          schema:
            type: string
        - name: artist_account_id
          in: query
          description: Artist account ID to filter songs by artist
          required: false
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Songs retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SongsResponse'
        '400':
          description: Bad request - invalid parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SongsErrorResponse'
        '401':
          description: Unauthorized - missing or invalid credentials
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SongsErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SongsErrorResponse'
components:
  schemas:
    SongsResponse:
      type: object
      description: Response containing songs data
      properties:
        status:
          type: string
          enum:
            - success
            - error
          description: Status of the request
        songs:
          type: array
          items:
            $ref: '#/components/schemas/Song'
          description: Array of song objects with artist information
        error:
          type: string
          description: Error message (only present if status is 'error')
    SongsErrorResponse:
      type: object
      properties:
        status:
          type: string
          enum:
            - error
          description: Status of the request
        error:
          type: string
          description: Error message describing what went wrong
    Song:
      type: object
      description: A song with its metadata and associated artists
      properties:
        isrc:
          type: string
          description: International Standard Recording Code (primary key)
        name:
          type: string
          description: Name of the song
        album:
          type: string
          description: Name of the album the song belongs to
        notes:
          type: string
          description: Notes for the song
        updated_at:
          type: string
          format: date-time
          description: ISO timestamp of when the song data was last updated
        artists:
          type: array
          items:
            $ref: '#/components/schemas/SongArtist'
          description: Array of artist objects associated with this song
    SongArtist:
      type: object
      description: Artist associated with a song
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier for the artist account
        name:
          type: string
          nullable: true
          description: Name of the artist (can be null)
        timestamp:
          type: integer
          nullable: true
          description: Timestamp associated with the artist account (can be null)

````