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

# GetSong

> GetSong retrieves a single song by its unique identifier.



## OpenAPI

````yaml /api/anghami-sdk.openapi.yaml get /v1/music/songs/{id}
openapi: 3.1.0
info:
  title: Anghami + OSN+ SDK
  description: >-
    Unified OpenAPI bundle covering all Anghami + OSN+ SDK services (music +
    video streaming).
  contact:
    name: Anghami Developer Platform
    email: developers@anghami.com
  version: 1.0.0
servers:
  - url: https://sdk.anghami.com
security: []
paths:
  /v1/music/songs/{id}:
    get:
      tags:
        - MusicCatalogService
      summary: GetSong
      description: GetSong retrieves a single song by its unique identifier.
      operationId: GetSong
      parameters:
        - name: Authorization
          in: header
          description: >-
            OAuth 2.0 Bearer token for user-authenticated requests. Format:
            Bearer <access_token>. Optional if x-api-key is provided.
          required: false
          schema:
            type: string
            example: Bearer eyJhbGciOiJSUzI1NiIs...
        - name: x-api-key
          in: header
          description: >-
            API key for server-to-server access without user context. Optional
            if Authorization is provided.
          required: false
          schema:
            type: string
            example: ang_live_...
        - name: Accept-Language
          in: header
          description: >-
            Preferred locale for localized content (BCP 47). Determines which
            language variant is returned for LocalizedString fields.
          required: false
          schema:
            type: string
            example: ar
        - name: id
          in: path
          description: Unique identifier of the song to retrieve.
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/sdk_catalog_v1_GetSongResponse'
        '400':
          description: Validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    sdk_catalog_v1_GetSongResponse:
      type: object
      properties:
        song:
          $ref: '#/components/schemas/sdk_catalog_v1_Song'
      description: GetSongResponse is the response message containing the requested song.
    ValidationError:
      type: object
      properties:
        violations:
          type: array
          items:
            $ref: '#/components/schemas/FieldViolation'
          description: List of validation violations
      required:
        - violations
      description: >-
        ValidationError is returned when request validation fails. It contains a
        list of field violations describing what went wrong.
    Error:
      type: object
      properties:
        message:
          type: string
          description: Error message (e.g., 'user not found', 'database connection failed')
      description: >-
        Error is returned when a handler encounters an error. It contains a
        simple error message that the developer can customize.
    sdk_catalog_v1_Song:
      type: object
      properties:
        id:
          $ref: '#/components/schemas/sdk_shared_v1_SongID'
        title:
          $ref: '#/components/schemas/sdk_shared_v1_LocalizedString'
        artists:
          type: array
          items:
            $ref: '#/components/schemas/sdk_catalog_v1_SongArtistRef'
        albumId:
          $ref: '#/components/schemas/sdk_shared_v1_AlbumID'
        durationMs:
          type: integer
          format: int32
          description: Duration of the song in milliseconds.
        trackNumber:
          type: integer
          format: int32
          description: Track number within the album.
        discNumber:
          type: integer
          format: int32
          description: Disc number for multi-disc albums.
        releaseDate:
          type: string
          description: Release date in YYYY-MM-DD format.
        genres:
          type: array
          items:
            type: string
            description: Genres associated with this song.
        isExplicit:
          type: boolean
          description: Whether the song contains explicit content.
        isrc:
          type: string
          description: |-
            International Standard Recording Code.
             May be empty for some regional content.
        hasLyrics:
          type: boolean
          description: Whether lyrics are available for this song.
        popularity:
          type: integer
          format: int32
          description: |-
            Popularity score from 0 to 100.
             Higher values indicate more popular songs.
        artwork:
          type: array
          items:
            $ref: '#/components/schemas/sdk_shared_v1_Image'
        previewUrl:
          type: string
          description: |-
            URL to a short audio preview clip.
             May be empty if no preview is available.
      description: Song represents a playable audio track in the music catalog.
    FieldViolation:
      type: object
      properties:
        field:
          type: string
          description: >-
            The field path that failed validation (e.g., 'user.email' for nested
            fields). For header validation, this will be the header name (e.g.,
            'X-API-Key')
        description:
          type: string
          description: >-
            Human-readable description of the validation violation (e.g., 'must
            be a valid email address', 'required field missing')
      required:
        - field
        - description
      description: FieldViolation describes a single validation error for a specific field.
    sdk_shared_v1_SongID:
      type: object
      properties:
        value:
          type: string
          description: The string value of the song identifier.
      required:
        - value
      description: SongID is a typed identifier for a song.
    sdk_shared_v1_LocalizedString:
      type: object
      properties:
        value:
          type: string
          description: |-
            The text value resolved for the requested locale.
             The server selects this based on the Accept-Language header.
        originalValue:
          type: string
          description: |-
            The text value in its original language.
             For content originally in Arabic, this is the Arabic text.
             For content originally in English/Latin, this is the English text.
             May be identical to value when the requested locale matches the original.
      description: |-
        LocalizedString provides a text value in the requested locale along with
         the original-language value. The resolved value is determined server-side
         from the Accept-Language request header.

         Anghami's catalog is Arabic-first, meaning most content has both Arabic and
         Latin/transliterated titles. This message allows clients to display either
         representation as needed by the user interface.
    sdk_catalog_v1_SongArtistRef:
      type: object
      properties:
        id:
          $ref: '#/components/schemas/sdk_shared_v1_ArtistID'
        name:
          $ref: '#/components/schemas/sdk_shared_v1_LocalizedString'
      description: |-
        SongArtistRef is a lightweight reference to an artist within a song.
         Contains only identification and display name. Use GetArtist for full profile.
    sdk_shared_v1_AlbumID:
      type: object
      properties:
        value:
          type: string
          description: The string value of the album identifier.
      required:
        - value
      description: AlbumID is a typed identifier for an album.
    sdk_shared_v1_Image:
      type: object
      properties:
        url:
          type: string
          description: URL of the image.
        width:
          type: integer
          format: int32
          description: Width in pixels.
        height:
          type: integer
          format: int32
          description: Height in pixels.
      description: Image represents artwork or visual media at a specific size.
    sdk_shared_v1_ArtistID:
      type: object
      properties:
        value:
          type: string
          description: The string value of the artist identifier.
      required:
        - value
      description: ArtistID is a typed identifier for an artist.

````