# Melon Chart Scraper (`oxygenated_quagmire/melon-chart-scraper`) Actor

Scrape music chart rankings from Melon (멜론) — Korea's #1 music streaming platform. Extract kpop chart data, K-pop rankings, melon chart api alternative results, korean music chart statistics & full lyrics. The only dedicated melon scraper for K-pop trend analysis.

- **URL**: https://apify.com/oxygenated\_quagmire/melon-chart-scraper.md
- **Developed by:** [Session zero](https://apify.com/oxygenated_quagmire) (community)
- **Categories:** For creators, Social media, Other
- **Stats:** 19 total users, 0 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.50 / 1,000 tracks

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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

> **Keywords:** melon chart, K-pop chart, korean music chart, kpop streaming data, south korea, korean web scraping, naver data, apify actor, korean data extraction

## Melon Chart Scraper 🇰🇷🎵

Scrape [Melon](https://www.melon.com/) (멜론) — Korea's #1 music streaming platform — for real-time charts, song data, and search results. Extract K-pop rankings, song details, lyrics, and album metadata.

**No browser needed** — uses fast, lightweight HTML parsing. No proxies required.

### ⚡ Quick Start

#### Scrape TOP 100 chart

```json
{
    "mode": "top100",
    "maxResults": 100
}
```

#### Search for an artist

```json
{
    "mode": "search",
    "keyword": "아이유",
    "maxResults": 20
}
```

#### Get chart with full details (lyrics, genre, release date)

```json
{
    "mode": "daily",
    "fetchDetails": true,
    "maxResults": 50
}
```

### 🎯 Use Cases

- **K-pop Market Research** — Track chart performance of artists and songs
- **Music Data Analysis** — Build datasets for trend analysis and visualization
- **Playlist Curation** — Discover trending Korean music for playlist creation
- **Academic Research** — Collect K-pop chart data for music industry studies
- **A\&R / Label Intelligence** — Monitor chart movements and emerging artists
- **SEO & Content** — Create data-driven K-pop content with real chart data
- **Fan Community** — Track your favorite artists' chart rankings over time

### 📥 Input Parameters

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `mode` | string | `"top100"` | Chart type: `top100`, `hot100`, `daily`, `weekly`, `monthly`, or `search` |
| `keyword` | string | — | Search keyword (required when mode is `search`) |
| `fetchDetails` | boolean | `false` | Fetch song detail pages for genre, lyrics, release date |
| `maxResults` | integer | `100` | Maximum tracks to return (1–500) |
| `proxyConfiguration` | object | — | Apify Proxy settings (optional) |

#### Chart Modes

| Mode | Description | URL |
|------|-------------|-----|
| `top100` | Real-time TOP 100 | melon.com/chart/index.htm |
| `hot100` | HOT 100 | melon.com/chart/hot100/index.htm |
| `daily` | Daily chart | melon.com/chart/day/index.htm |
| `weekly` | Weekly chart | melon.com/chart/week/index.htm |
| `monthly` | Monthly chart | melon.com/chart/month/index.htm |
| `search` | Search by keyword | melon.com/search/song/index.htm |

### 📤 Output Fields

Each result contains:

| Field | Type | Description |
|-------|------|-------------|
| `rank` | integer | Chart ranking (1–100). Null for search results |
| `songId` | string | Melon song ID |
| `title` | string | Song title |
| `artist` | string | Artist name |
| `albumTitle` | string | Album title |
| `albumId` | string | Melon album ID |
| `albumImageUrl` | string | Album cover image URL |
| `songUrl` | string | Direct URL to song detail page |
| `genre` | string | Genre (when `fetchDetails: true`) |
| `releaseDate` | string | Release date (when `fetchDetails: true`) |
| `lyrics` | string | Full lyrics (when `fetchDetails: true`) |
| `flacInfo` | string | FLAC quality info (when `fetchDetails: true`) |
| `chartType` | string | Chart type used for this scrape |
| `scrapedAt` | string | Scrape timestamp (UTC) |

#### Sample Output

```json
{
    "rank": 1,
    "songId": "601237102",
    "title": "BANG BANG",
    "artist": "IVE (아이브)",
    "albumTitle": "REVIVE+",
    "albumId": "12845274",
    "albumImageUrl": "https://cdnimg.melon.co.kr/cm2/album/images/128/45/274/12845274_20260223113048_500.jpg/melon/resize/120/quality/80/optimize",
    "songUrl": "https://www.melon.com/song/detail.htm?songId=601237102",
    "genre": "댄스",
    "releaseDate": "2026.02.09",
    "lyrics": "It's a new scene It's aggressive...",
    "flacInfo": "Flac 16/24bit",
    "chartType": "top100",
    "scrapedAt": "2026-02-28T04:30:00.000000"
}
```

### 💰 Pricing

- **$0.50 per 1,000 tracks** — Pay only for results
- Detail page fetching included in the price
- No hidden fees or minimum spend

### ⚙️ Performance

| Mode | Speed | Data |
|------|-------|------|
| `fetchDetails: false` | ~100 tracks/sec | Titles, artists, albums |
| `fetchDetails: true` | ~3-5 tracks/sec | + Genre, lyrics, release date |

### 🔧 Technical Details

- **Method**: Server-side rendered HTML parsing (httpx + BeautifulSoup)
- **Rate limiting**: Built-in delays to respect Melon's servers
- **Proxy**: Optional (Melon doesn't block bots by default)
- **Language**: Python 3.12+
- **No browser**: Pure HTTP requests — fast and cost-effective

### 📋 Notes

- Melon is Korea's largest music streaming platform with 28M+ users
- Chart data updates in real-time (TOP100) or periodically (daily/weekly/monthly)
- Song details include Korean lyrics — great for language learning and analysis
- All public data — no authentication required

# Actor input Schema

## `mode` (type: `string`):

Chart type to scrape, or 'search' to find songs by keyword

## `keyword` (type: `string`):

Search keyword (required when mode is 'search'). Examples: '아이유', 'BTS', 'NewJeans'

## `fetchDetails` (type: `boolean`):

If true, fetches each song's detail page to get genre, release date, lyrics, and FLAC info. Slower but provides richer data.

## `maxResults` (type: `integer`):

Maximum number of tracks to return (1-500)

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

Apify Proxy settings (optional — Melon doesn't require proxies)

## Actor input object example

```json
{
  "mode": "top100",
  "fetchDetails": false,
  "maxResults": 100
}
```

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("oxygenated_quagmire/melon-chart-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 = {}

# Run the Actor and wait for it to finish
run = client.actor("oxygenated_quagmire/melon-chart-scraper").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 '{}' |
apify call oxygenated_quagmire/melon-chart-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=oxygenated_quagmire/melon-chart-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/acts/rlRoB8abdsbWGp4hX/builds/SmGNrwWnmLqhshUlJ/openapi.json
