Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time
February 12, 2023 00:11
June 14, 2021 19:35
February 1, 2021 22:21
February 12, 2023 00:11
February 12, 2023 00:07
June 14, 2021 19:27
February 12, 2023 00:07
June 14, 2021 19:08

GoDoc MIT licensed Twitter Follow

Table of Contents

Quick Start


go get

API Token

To send >10 requests, obtain a token from our API Dashboard and change "test" to the obtained token in NewClient("test").

Sending the files

For recognize and recognizeWithOffset API methods, you have to send a file for recognition. There are two ways to send files to our API: you can either

  • 🔗 provide an HTTP URL of the file (our server will download and recognize the music from the file), or
  • 📤 post the file using multipart/form-data in the usual way a browser uploads files.

Recognize music from a file with a URL

It's straightforward.

package main

import (

func main()  {
    // initialize the client with "test" as a token
	client := audd.NewClient("test")
    // recognize music in and return Apple Music, Deezer and Spotify metadata
	song, err := client.RecognizeByUrl("", "apple_music,deezer,spotify", nil)
	if err != nil {
	fmt.Printf("%s - %s.\nTimecode: %s, album: %s. ℗ %s, %s\n\n"+
		"Listen: %s\nOr directly on:\n- Apple Music: %s, \n- Spotify: %s,\n- Deezer: %s.",
		song.Artist, song.Title, song.Timecode, song.Album, song.Label, song.ReleaseDate,
		song.SongLink, song.AppleMusic.URL, song.Spotify.ExternalUrls.Spotify, song.Deezer.Link)
	if len(song.AppleMusic.Previews) > 0 {
		fmt.Printf("\n\nPreview: %s", song.AppleMusic.Previews[0].URL)

If you run this code, you should see a result like

Imagine Dragons - Warriors.
Timecode: 00:40, album: Warriors. ℗ Universal Music, 2014-09-18

Or directly on:
- Apple Music:,
- Spotify:,
- Deezer:


Recognize music from a local file

You can also send your local files to the API.

	file, _ := os.Open("/path/to/example.mp3/path/to/example.mp3")
	result, err := client.RecognizeByFile(file, "apple_music,deezer,spotify", nil)

file in client.RecognizeByFile could be any variable that implements the io.Reader interface. If you have, e.g., var data []byte, you can use bytes.NewReader(data) as file.

There is also the Recognize function that accepts io.Reader and []byte for local files; string and url.URL for HTTP addresses of files.

Also, there's client.UseExperimentalUploading() that allows starting sending a file before it's loaded in the memory. Useful for large files sent to the enterprise endpoint (see the scanFiles example).

Searching the lyrics

It's easy with the FindLyrics function.

	result, err := client.FindLyrics("You were the shadow to my light", nil)
	if len(result) == 0 {
		fmt.Println("AudD can't find any lyrics by this query")
	firstSong := result[0]
	fmt.Printf("First match: %s - %s\n\n%s", firstSong.Artist, firstSong.Title, firstSong.Lyrics)

Use Cases

How you can use the AudD Music Recognition API:

Content analysis

Use our Music Recognition API to detect and identify songs in any audio content.

Create upload filters for UGC when the law requires. Find out what songs are used in any content on the Internet – or in the videos uploaded to your server. Recognize music from hours-long DJ mixes. Analyze the trends. Display the recognition results to your users. Use the metadata the API returns for your recommendation systems.

In-app music recognition and lyrics searching

Make your own music recognition application using AudD Music Recognition API. Detect and recognize music. Identify the songs your users are listening to and display the lyrics of the recognized songs. Or just let your users search lyrics by text.

Audio streams

Use AudD real-time music recognition service for audio streams to identify the songs that are being played on radio stations (or any other streams).

Monitor radio airplay, create radio song charts. Get real-time insights. If you have your own content DB, we can recognize songs that you upload (it's cheaper).

See for more info.


The MIT License (MIT)