# Shazam Songs Discovery (`alien_force/shazam-songs-discovery`) Actor

Shazam Songs Discover is an advanced songs search that finds songs based on your query, providing detailed information about the song, artist, album, lyrics, similar tracks, and more. Perfect for music discovery with structured, comprehensive data.

- **URL**: https://apify.com/alien\_force/shazam-songs-discovery.md
- **Developed by:** [Alien Force](https://apify.com/alien_force) (community)
- **Categories:** Automation, Social media
- **Stats:** 16 total users, 1 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## Pricing

$25.00/month + usage

To use this Actor, you pay a monthly rental fee to the developer. The rent is subtracted from your prepaid usage every month after the free trial period.You also pay for the Apify platform usage, which gets cheaper the higher Apify subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#rental-actors

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## Shazam Songs Discover

### 🌊 Introduction

**Shazam Songs Discover** is a powerful actor designed to help you search for songs effortlessly using an advanced search engine. It returns well-structured data, including detailed information about the song, its artist, a song preview, related albums, similar tracks, and more. This tool is perfect for developers, music enthusiasts, and data analysts who need rich metadata for music discovery and analysis.

### 🚀 Key Features

-   **Advanced Song Search:** Quickly find songs using keywords (e.g., song name, artist).
-   **Comprehensive Metadata:** Get details like song name, genres, release date, duration, and more.
-   **Lyrics Availability:** Check if lyrics are available and retrieve them.
-   **Artist Information:** Access detailed artist profiles with links and images.
-   **Album Details:** Retrieve album-related data with direct links.
-   **Similar Songs:** Discover songs related to your search.
-   **Credits Information:** View detailed credits for performing artists, songwriters, producers, and engineers.
-   **Audio Preview:** Listen to a preview of the song directly.

### ℹ️ Additional Notes

-   The maximum number of items returned is capped at 20.
-   Ensure your search keywords are accurate for the best results.
-   Data such as lyrics and similar songs may vary depending on availability.

### 💡 Pro Tip

Use specific search queries (e.g., "Bones Imagine Dragons") for more accurate results and richer data!
Use low limit value to enhance performance (3 is recommended)

### 📂 Input Schema

```json
{
    "song_search": "bones, imagine dragons",
    "limit": 3
}
````

#### Input Parameters:

- **`song_search`** *(string)*: Keywords to search for the desired song (e.g., song title, artist name).
- **`limit`** *(integer)*: Maximum number of results to return. The default is 3 and maximum is 20 items.

### 📃 Output Schema

```json
{
    "id": "1612321591",
    "link": "https://www.shazam.com/song/1612321591",
    "name": "Bones",
    "genres": ["Alternative", "Music"],
    "shazams": "7,485,173",
    "duration_in_ms": 165265,
    "image": "https://is1-ssl.mzstatic.com/image/thumb/Music116/v4/33/87/c8/3387c827-adaa-681d-bd10-ce7d8e888b9c/22UMGIM21054.rgb.jpg/3000x3000bb.jpg",
    "has_lyrcis": true,
    "lyrics": "Gimme, gimme, gimme some time to think...",
    "album_name": "Bones - Single",
    "track_number": 1,
    "release_date": "2021-03-11",
    "preview": {
        "url": "https://audio-ssl.itunes.apple.com/itunes-assets/AudioPreview122/..."
    },
    "audio_trails": ["atmos", "lossless", "lossy-stereo", "spatial"],
    "audioLocale": "en-US",
    "artist_info": {
        "id": "358714030",
        "name": "Imagine Dragons",
        "link": "https://www.shazam.com/artist/imagine-dragons/358714030",
        "image": "https://is1-ssl.mzstatic.com/image/thumb/..."
    },
    "albums": [
        {
            "id": "1612321587",
            "name": "Bones - Single",
            "artist": "Imagine Dragons",
            "image": "https://is1-ssl.mzstatic.com/image/thumb/Music116/v4/33/87/c8/3387c827-adaa-681d-bd10-ce7d8e888b9c/22UMGIM21054.rgb.jpg/400x400bb.webp",
            "link": "https://www.shazam.com/album/1612321587/bones-single"
        },
        {
            "id": "pl.2980463a4b2a440bad48155ef708c4a4",
            "name": "Halloween Party",
            "artist": "Apple Music",
            "image": "https://is1-ssl.mzstatic.com/image/thumb/Features115/v4/b2/d9/f9/b2d9f949-8c8d-8362-e7e9-ed7910d3976b/U0MtTVMtV1ctSGFsbG93ZWVuX1BhcnR5LUFEQU1fSUQ9MTI4NzU4MTE4MS5wbmc.png/400x400SC.CADC01.webp",
            "link": "https://www.shazam.com/playlist/pl.2980463a4b2a440bad48155ef708c4a4/halloween-party"
        },
        {
            "id": "pl.8961ea5622064d4dadd6fa3cadf1c89d",
            "name": "Imagine Dragons Essentials",
            "artist": "Apple Music Alternative",
            "image": "https://is1-ssl.mzstatic.com/image/thumb/AMCArtistImages221/v4/f2/7b/29/f27b29c0-49e6-4b40-e079-9a2163030444/0cd8f23b-d974-42e4-8fe7-1aaa533baf13_ami-identity-0dee3e31f20984eeb377fa8009444095-2024-04-03T19-26-12.960Z_cropped.png/400x400SC.FPESS04.webp",
            "link": "https://www.shazam.com/playlist/pl.8961ea5622064d4dadd6fa3cadf1c89d/imagine-dragons-essentials"
        }
    ],
    "similar_songs": [
        {
            "id": "1320781379",
            "name": "Beggin'",
            "artist": "Måneskin",
            "image": "/mkimage/image/thumb/Music115/v4/67/08/e0/6708e014-c1be-76b1-c520-a6567bf946a2/886446867755.jpg/375x375cc.webp",
            "link": "https://www.shazam.com/song/1320781379/beggin"
        },
        {
            "id": "1591640885",
            "name": "Enemy (From Arcane: League of Legends)",
            "artist": "Imagine Dragons & JID",
            "image": "/mkimage/image/thumb/Music126/v4/76/77/08/767708a7-ec93-3b3d-3bac-40086e5a265c/21UM1IM29634.rgb.jpg/375x375cc.webp",
            "link": "https://www.shazam.com/song/1591640885/enemy-from-arcane-league-of-legends"
        },
        {
            "id": "1411628233",
            "name": "Believer",
            "artist": "Imagine Dragons",
            "image": "/mkimage/image/thumb/Music126/v4/11/7a/b8/117ab805-6811-8929-18b9-0fad7baf0c25/17UMGIM98210.rgb.jpg/375x375cc.webp",
            "link": "https://www.shazam.com/song/1411628233/believer"
        }
    ],
    "performing_artists_credits": [
        {
            "name": "Ben McKee",
            "image": "https://shazam.com/mkimage/image/thumb/gen/300x300AM.SCM01.jpg?name=Qk0%3D&signature=a7d9b859abbd2fd22698ef36145b52fef65ac9652d759fdab69038ef0abcb7ce&vkey=1",
            "role": "Bass"
        },
        {
            "name": "Dan Reynolds",
            "image": "https://shazam.com/mkimage/image/thumb/Features118/v4/57/79/b7/5779b77f-d350-e900-8e6d-0108a521eaa4/mzl.shgicrxp.jpg/300x300bb.jpg",
            "role": "Vocals"
        },
        {
            "name": "Daniel Platzman",
            "image": "https://shazam.com/mkimage/image/thumb/gen/300x300AM.SCM01.jpg?name=RFA%3D&signature=d1b1750440c02270e274c821c2348b796fa24d53491e0a512cc1166712e950db&vkey=1",
            "role": "Drums"
        }
    ],
    "composition_and_lyrics_credits": [
        {
            "name": "Dan Reynolds",
            "image": "https://shazam.com/mkimage/image/thumb/Features118/v4/57/79/b7/5779b77f-d350-e900-8e6d-0108a521eaa4/mzl.shgicrxp.jpg/300x300bb.jpg",
            "role": "Songwriter"
        },
        {
            "name": "Wayne Sermon",
            "image": "https://shazam.com/mkimage/image/thumb/gen/300x300AM.SCM01.jpg?name=V1M%3D&signature=8651e19d5a6b945f0897d2d1d66b253acace2a3c309b2b5b6ab9b40ca4faeeaa&vkey=1",
            "role": "Songwriter"
        }
    ],
    "production_and_engineering_credits": [
        {
            "name": "Mattman & Robin",
            "image": "https://shazam.com/mkimage/image/thumb/...",
            "role": "Producer"
        }
    ]
}
```

#### Output Fields:

- **`id`** *(string)*: Unique identifier for the song.
- **`link`** *(string)*: Direct link to the song on Shazam.
- **`name`** *(string)*: Song title.
- **`genres`** *(array)*: List of genres associated with the song.
- **`shazams`** *(string)*: Number of times the song has been Shazamed.
- **`duration_in_ms`** *(integer)*: Duration of the song in milliseconds.
- **`image`** *(string)*: Cover image URL of the song.
- **`has_lyrcis`** *(boolean)*: Indicates if lyrics are available.
- **`lyrics`** *(string)*: Full lyrics of the song (if available).
- **`album_name`** *(string)*: Name of the album the song belongs to.
- **`track_number`** *(integer)*: Track number on the album.
- **`release_date`** *(string)*: Song's release date.
- **`preview`** *(object)*: URL for an audio preview of the song.
- **`audio_trails`** *(array)*: Audio quality types available.
- **`audioLocale`** *(string)*: Locale of the audio.
- **`artist_info`** *(object)*: Information about the artist, including ID, name, image, and link.
- **`albums`** *(array)*: List of albums the song is featured in.
- **`similar_songs`** *(array)*: Songs similar to the one searched.
- **`performing_artists_credits`**, **`composition_and_lyrics_credits`**, **`production_and_engineering_credits`** *(arrays)*: Detailed credits with roles and images.

### Related Actors

If you're interested in similar actors, check out:

- [Shazam Artists Discovery](https://apify.com/alien_force/shazam-artists-discovery)
- [Shazam Concerts Events Scraper](https://apify.com/alien_force/shazam-concerts-events-scraper)
- [Shazam Trending Songs Scraper](https://apify.com/alien_force/shazam-trending-songs-scraper)

# Actor input Schema

## `song_search` (type: `string`):

Search for a song name, you can include song name and artist name for better accuracy

## `limit` (type: `integer`):

Limit the number of results

## Actor input object example

```json
{
  "song_search": "Bad Liars",
  "limit": 3
}
```

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "song_search": "Bad Liars",
    "limit": 3
};

// Run the Actor and wait for it to finish
const run = await client.actor("alien_force/shazam-songs-discovery").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "song_search": "Bad Liars",
    "limit": 3,
}

# Run the Actor and wait for it to finish
run = client.actor("alien_force/shazam-songs-discovery").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "song_search": "Bad Liars",
  "limit": 3
}' |
apify call alien_force/shazam-songs-discovery --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=alien_force/shazam-songs-discovery",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Shazam Songs Discovery",
        "description": "Shazam Songs Discover is an advanced songs search that finds songs based on your query, providing detailed information about the song, artist, album, lyrics, similar tracks, and more. Perfect for music discovery with structured, comprehensive data.",
        "version": "0.0",
        "x-build-id": "9HDhpOEWlJOzmabbL"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/alien_force~shazam-songs-discovery/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-alien_force-shazam-songs-discovery",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/alien_force~shazam-songs-discovery/runs": {
            "post": {
                "operationId": "runs-sync-alien_force-shazam-songs-discovery",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/alien_force~shazam-songs-discovery/run-sync": {
            "post": {
                "operationId": "run-sync-alien_force-shazam-songs-discovery",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "song_search"
                ],
                "properties": {
                    "song_search": {
                        "title": "Song Search",
                        "type": "string",
                        "description": "Search for a song name, you can include song name and artist name for better accuracy",
                        "default": "Bad Liars"
                    },
                    "limit": {
                        "title": "Limit",
                        "maximum": 20,
                        "type": "integer",
                        "description": "Limit the number of results",
                        "default": 3
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
