new Shazam()

Methods

async

artist_albums(endpoint_country, artist_id, limit, offset)

Albums by an artist

Parameters

Name Type Optional Description

endpoint_country

string

 

Endpoint country

artist_id

string

 

Shazam artist id

limit

string

 

limit to how many tracks are fetched

offset

string

 

the offset to start fetching from

async

fromFilePath(path, minimal, language) → (ShazamRoot or null)

Parameters

Name Type Optional Description

path

string

 

the path to the file

minimal

Boolean

 

false for full track data, true for simplified form

Defaults to false.

language

string

 

Song language

Defaults to en.

Deprecated
Recognise a song from an audio file
Returns

(ShazamRoot or null) 

async

fromVideoFile(path, minimal, language) → (ShazamRoot or null)

Parameters

Name Type Optional Description

path

string

 

the path to the file

minimal

Boolean

 

false for full track data, true for simplified form

Defaults to false.

language

string

 

Song language

Defaults to en.

Deprecated
Recognise a song from a video file
Returns

(ShazamRoot or null) 

async

list_locations()

List locations

async

listen_count(track)

Get number of times a track was shazamed

Parameter

Name Type Optional Description

track

string

 

Track ID

async

recognise(path, language, minimal) → (ShazamRoot or null)

Recognise a song from a file

Parameters

Name Type Optional Description

path

string

 

the path to the file

language

string

 

Song language

Defaults to en-US.

minimal

boolean

 

return minimal info

Defaults to false.

Returns

(ShazamRoot or null) 

async

recognizeSong(samples, language)

Parameters

Name Type Optional Description

samples

Array of number

 

Samples array

language

string

 

Song language

Defaults to en.

Deprecated
Recognise a song from Samples Array
async

recognizeSongMinimal(samples, language)

Parameters

Name Type Optional Description

samples

Array of number

 

Samples array

language

string

 

Song language

Defaults to en.

Deprecated
Recognise a song from Samples Array and return minial info
async

Related songs for a track

Parameters

Name Type Optional Description

language

string

 

Song language

endpoint_country

string

 

Endpoint country

track_id

string

 

Shazam track id

limit

string

 

limit to how many tracks are fetched

offset

string

 

the offset to start fetching from

async

search_artist(language, endpoint_country, query, limit, offset)

Search artist by name

Parameters

Name Type Optional Description

language

string

 

Song language

endpoint_country

string

 

Endpoint country

query

string

 

Artist name

limit

string

 

limit to how many tracks are fetched

offset

string

 

the offset to start fetching from

async

search_artist_v2(endpoint_country, artist_id)

Search artist by id

Parameters

Name Type Optional Description

endpoint_country

string

 

Endpoint country

artist_id

string

 

Artist ID

async

search_music(language, endpoint_country, query, limit, offset)

Search music on shazam

Parameters

Name Type Optional Description

language

string

 

Song language

endpoint_country

string

 

Endpoint country

query

string

 

Query to search

limit

string

 

limit to how many tracks are fetched

offset

string

 

the offset to start fetching from

async

top_genre_tracks_country(language, endpoint_country, country, genre, limit, offset)

Most shazamed tracks for a country

Parameters

Name Type Optional Description

language

string

 

Song language

endpoint_country

string

 

Endpoint country

country

string

 

ISO country code for the country

genre

string

 

Genre to search

limit

string

 

limit to how many tracks are fetched

offset

string

 

the offset to start fetching from

async

top_genre_tracks_world(language, endpoint_country, genre, limit, offset)

Most shazamed tracks globally for a genre

Parameters

Name Type Optional Description

language

string

 

Song language

endpoint_country

string

 

Endpoint country

genre

string

 

Genre to search

limit

string

 

limit to how many tracks are fetched

offset

string

 

the offset to start fetching from

async

top_tracks_city(language, endpoint_country, city_id, limit, offset)

Most shazamed tracks for a city

Parameters

Name Type Optional Description

language

string

 

Song language

endpoint_country

string

 

Endpoint country

city_id

string

 

Shazam city id

limit

string

 

limit to how many tracks are fetched

offset

string

 

the offset to start fetching from

async

top_tracks_country(language, endpoint_country, country_code, limit, offset)

Most shazamed tracks for a country

Parameters

Name Type Optional Description

language

string

 

Song language

endpoint_country

string

 

Endpoint country

country_code

string

 

ISO country code for the country

limit

string

 

limit to how many tracks are fetched

offset

string

 

the offset to start fetching from

async

top_tracks_global(language, endpoint_country, limit, offset)

Most shazamed tracks globally

Parameters

Name Type Optional Description

language

string

 

Song language

Defaults to en-US.

endpoint_country

string

 

Endpoint country

Defaults to GB.

limit

string

 

limit to how many tracks are fetched

Defaults to 10.

offset

string

 

the offset to start fetching from

Defaults to 0.

async

track_info(language, endpoint_country, track_id)

Info about a track

Parameters

Name Type Optional Description

language

string

 

Song language

endpoint_country

string

 

Endpoint country

track_id

string

 

Shazam track id