Function findLyrics

  • Finds lyrics for a given track using the API at https://lrclib.net/api/get.

    Example Usage:

    const lyrics = await findLyrics({ track_name: "The Chain", artist_name: "Fleetwood Mac" });
    

    Parameters

    • info: Query

      An object containing query parameters:

      • id: The unique identifier of the track (conditional).
      • track_name: The name of the track (conditional).
      • artist_name: The artist's name (conditional).
      • album_name: The album's name (optional).
      • duration: The song duration in milliseconds (optional).

    Returns Promise<FindLyricsResponse>

    A promise that resolves to a FindLyricsResponse object containing the track's lyrics.

    Will throw an error if the request fails or the track is not found.