# Shazam Trending Songs Scraper (`alien_force/shazam-trending-songs-scraper`) Actor

Track the hottest Shazamed songs worldwide with this scraper! Get trending tracks by country, including rank, song & artist details, Shazam count, and direct links. Perfect for music marketers, DJs, and trend analysts. Stay ahead of global music trends in real-time! 🎵🚀

- **URL**: https://apify.com/alien_force/shazam-trending-songs-scraper.md
- **Developed by:** [Alien Force](https://apify.com/alien_force) (community)
- **Categories:** Automation, Developer tools
- **Stats:** 17 total users, 2 monthly users, 96.2% runs succeeded, 4 bookmarks
- **User rating**: No ratings yet

## Pricing

from $6.40 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## 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.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Shazam Trending Songs Scraper

Discover the hottest tracks worldwide with the **Shazam Trending Songs Scraper**! Whether you're a music enthusiast, DJ, marketer, or researcher, this actor helps you stay ahead by fetching the most trending Shazamed songs worldwide or in any country.

### 🌟 Key Features

- **🔥 Real-Time Trends** – Get the most Shazamed songs in any country.
- **🏆 Rank Tracking** – Know which tracks are topping the charts.
- **🎤 Song & Artist Info** – Fetch details like song title, artist name, and profile links.
- **📊 Shazam Count** – See how many times a song has been identified.
- **💿 Song Details** – Album, release date, label, language, duration, preview, lyrics, BPM, and audio traits from the track page.
- **🌍 Country-Based Insights** – Get trends for a specific country or explore global hits.
- **🔗 Direct Links** – Access the full song and artist page on Shazam instantly.

🎯 Whether you're a **music industry professional**, **content creator**, or just a **trend watcher**, this tool provides real-time insights into what’s trending in the music world.

***

### 👩‍💻 Built For

- **Music marketers** 🎵
- **DJs & playlist curators** 🎧
- **Trend analysts** 📊
- **Social media managers** 🚀

Start tracking the top Shazamed songs today and stay in tune with global music trends! 🎶

***

### Input Schema

```json
{
    "country": "egypt",
    "target": "top200",
    "limit": 20,
    "proxyConfiguration": {
        "useApifyProxy": true
    }
}
```

Use `target: "viral"` to scrape the Viral chart instead of Top 200 (`/charts/viral/{country}`).

`limit` is not hard-capped by the actor. Shazam currently provides up to about **200** songs for Top 200 and about **50** for Viral (often fewer on country Viral charts), so those are the expected result sizes.

### Output Schema

```json
[
    {
        "rank": 1,
        "id": "6768469976",
        "name": "Dai Dai",
        "link": "https://www.shazam.com/song/6768469976/dai-dai",
        "image": "https://is1-ssl.mzstatic.com/image/thumb/Music221/v4/61/49/8d/61498ded-f0dc-227d-cd1d-2051b5d9f195/196874328590.jpg/375x375bb.webp",
        "artist": {
            "id": "889327",
            "name": "Shakira & Burna Boy",
            "link": "https://www.shazam.com/artist/shakira-and-burna-boy/889327"
        },
        "shazams": "2,684,769",
        "trending_country": "world",
        "target": "top200",
        "genres": ["Pop"],
        "on_tour": true,
        "album_name": "Dai Dai - Single",
        "release_date": "May 14, 2026",
        "label": "Sony Music Latin",
        "language": "English",
        "duration_in_ms": 223000,
        "preview": "https://audio-ssl.itunes.apple.com/itunes-assets/AudioPreview221/.../preview.m4a",
        "has_lyrics": true,
        "lyrics": "...",
        "bpm": 115,
        "audio_traits": {
            "melodicness": true,
            "acousticness": true,
            "valence": true,
            "danceability": true,
            "energy": true
        }
    }
]
```

### Output Attributes

Each dataset item includes chart-level fields plus enrichment scraped from the song page. Only songs with a successful enrichment (including a non-empty `shazams` count) are saved.

| Attribute | Type | Description |
| --- | --- | --- |
| `rank` | integer | Position on the selected Shazam chart |
| `id` | string | Shazam song ID |
| `name` | string | Song title |
| `link` | string | URL of the Shazam song page |
| `image` | string | Artwork URL |
| `artist` | object | Artist metadata: `id`, `name`, `link` |
| `shazams` | string | Formatted total Shazam count from the track page (required) |
| `trending_country` | string | Chart country code used for the run (e.g. `world`, `egypt`) |
| `target` | string | Chart target used for the run (`top200` or `viral`) |
| `genres` | string\[] | Genres from the song page header |
| `on_tour` | boolean | Whether the track/artist is marked **On Tour** |
| `album_name` | string | Album name from Song Details |
| `release_date` | string | null | Release date from Song Details |
| `label` | string | Record label from Song Details |
| `language` | string | Track language from Song Details |
| `duration_in_ms` | integer | Track duration in milliseconds |
| `preview` | string | Audio preview URL when available |
| `has_lyrics` | boolean | `true` only when lyrics text was extracted |
| `lyrics` | string | Lyrics text when available |
| `bpm` | integer | null | Beats per minute when available |
| `audio_traits` | object | Presence flags for Song Details traits (`melodicness`, `acousticness`, `valence`, `danceability`, `energy`) |

### Proxy Configuration (Recommended for Long Runs)

Apify Proxy is **enabled by default** via the actor input (`proxyConfiguration.useApifyProxy: true`).

For short smoke tests you can turn it off, but for longer runs (higher `limit`, full Top 200, or frequent re-runs) keep Apify Proxy enabled. Shazam may return blocked responses (`405`) under heavier traffic; proxy rotation greatly improves enrichment success so songs are not dropped after retries.

```json
{
    "country": "world",
    "limit": 200,
    "proxyConfiguration": {
        "useApifyProxy": true
    }
}
```

### Related Actors

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

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

# Actor input Schema

## `country` (type: `string`):

Country chart to scrape (or Global).

## `target` (type: `string`):

Chart to scrape on Shazam: Top 200 (`top200`) or Viral (`viral`). Viral charts usually contain up to 50 songs.

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

Maximum number of trending songs to return. Shazam currently lists up to about 200 songs for Top 200 and about 50 for Viral (often fewer for country Viral charts), so those are the expected result sizes even if you set a higher limit.

## `proxyConfiguration` (type: `object`):

Apify proxy configuration used for chart and song page requests.

## Actor input object example

```json
{
  "country": "world",
  "target": "top200",
  "limit": 10,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `overview` (type: `string`):

No description

# 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 = {
    "country": "world",
    "target": "top200",
    "limit": 10,
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("alien_force/shazam-trending-songs-scraper").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 = {
    "country": "world",
    "target": "top200",
    "limit": 10,
    "proxyConfiguration": { "useApifyProxy": True },
}

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

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

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

```

## CLI example

```bash
echo '{
  "country": "world",
  "target": "top200",
  "limit": 10,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call alien_force/shazam-trending-songs-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,alien_force/shazam-trending-songs-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/TfH7XMnkKhHSTp90J/builds/7wk7C0hoy0rouWgNP/openapi.json
