# Genius Search & Lyrics Scraper (`headlessagent/genius-search-lyrics-scraper`) Actor

Search Genius for songs and extract full lyrics. Provide search queries or song IDs to get structured JSON with song details, artist info, media links, stats, and clean plain-text lyrics. Apify proxy support included.

- **URL**: https://apify.com/headlessagent/genius-search-lyrics-scraper.md
- **Developed by:** [Headless Agent](https://apify.com/headlessagent) (community)
- **Categories:** Developer tools, Integrations, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.90 / 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.

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

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

## Genius Search & Lyrics Scraper

Search Genius for songs and scrape lyrics. Get structured JSON with song details, artist info, and full lyrics text.

### 🤔 What can Genius Search & Lyrics Scraper do?

This Actor lets you **search Genius for songs and extract lyrics data**. Just provide search queries or song IDs and get structured results:

🔍 Search Genius by song title or artist name and get back detailed song data

🎤 Fetch full lyrics by song ID — extracted as clean plain text

📝 Get song metadata: title, release date, recording location, description

👤 Collect artist info — primary, featured, producer, and writer artists

📊 Get song stats: pageviews, annotation count, pyongs count

🎵 Fetch media links (YouTube, Spotify, SoundCloud)

🔁 Use Apify proxy to rotate IPs and avoid rate limiting (optional)

📦 Download results in **JSON, CSV, XML, or Excel** from the Apify Dataset

🦾 Integrate via **API, webhooks, SDKs** (Python & Node.js), or connect with tools like Zapier, n8n, Make, and more

### ✅ What data can I scrape from Genius?

#### From each search result:

- 🆔 Song ID and Genius URL
- 📝 Title and full title
- 🖼️ Header image and song art image URLs
- 👤 Primary artist names and artist details
- 📋 Lyrics state (complete, incomplete, etc.)
- 💬 Annotation count and pyongs count
- 📊 Song stats (hot, pageviews)

#### From each song detail (lyrics fetch):

- All search result fields above
- 🎤 Full lyrics as plain text
- 📅 Release date
- 📍 Recording location
- 📄 Song description
- 💬 Comment count
- 🕐 Lyrics updated timestamp
- 👥 Featured, producer, and writer artists
- 🎵 Media links (YouTube, Spotify, SoundCloud)

### 🔧 How to scrape lyrics from Genius

1. [Create](https://console.apify.com/sign-up) a free Apify account.
2. Open Genius Search & Lyrics Scraper.
3. Add **search queries** (one or more) to search for songs, or provide **song IDs** to fetch lyrics directly.
4. Optionally set **max results per query** and configure **proxy**.
5. Click **Save & Start** and wait for the data to be extracted.
6. Download your data in JSON, CSV, XML, Excel, or access it via API.

### ⬇️ Input

| Field       | Type       | Description                                                                 |
|-------------|------------|-----------------------------------------------------------------------------|
| `queries`   | `string[]` | List of search queries to search on Genius.                                |
| `songIds`   | `number[]` | List of Genius song IDs to fetch lyrics for (e.g. from search results).    |
| `maxResults` | `integer`  | Maximum number of results per search query.                                 |
| `proxy`     | `object`   | Optional. Apify proxy configuration with `useApifyProxy`, `apifyProxyGroups`, `apifyProxyCountry`. |

#### Example input — Search

```json
{
    "queries": ["Bohemian Rhapsody", "Shape of You"],
    "maxResults": 5
}
````

#### Example input — Fetch lyrics by ID

```json
{
    "songIds": [1063, 2554116]
}
```

#### Example input — Both

```json
{
    "queries": ["Bohemian Rhapsody"],
    "maxResults": 3,
    "songIds": [1063],
    "proxy": {
        "useApifyProxy": true,
        "apifyProxyGroups": ["RESIDENTIAL"],
        "apifyProxyCountry": "US"
    }
}
```

### ⬆️ Output

Results are pushed to the Apify Dataset. Search results include the `search_query` field so you know which query produced each result.

#### 🔎 Search result sample

```json
{
    "search_query": "Bohemian Rhapsody",
    "id": 1063,
    "title": "Bohemian Rhapsody",
    "full_title": "Bohemian Rhapsody by Queen",
    "url": "https://genius.com/Queen-bohemian-rhapsody-lyrics",
    "header_image_url": "https://images.genius.com/xxx.jpg",
    "song_art_image_url": "https://images.genius.com/xxx.jpg",
    "primary_artist_names": "Queen",
    "primary_artists": [
        {
            "id": 563,
            "name": "Queen",
            "url": "https://genius.com/artists/Queen",
            "image_url": "https://images.genius.com/xxx.jpg",
            "is_verified": false
        }
    ],
    "lyrics_state": "complete",
    "annotation_count": 33,
    "pyongs_count": 701,
    "stats": {
        "status": "",
        "hot": false,
        "pageviews": 11195763,
        "concurrency": 0,
        "contributors": 0
    }
}
```

#### 🎤 Lyrics detail sample

```json
{
    "id": 1063,
    "title": "Bohemian Rhapsody",
    "full_title": "Bohemian Rhapsody by Queen",
    "url": "https://genius.com/Queen-bohemian-rhapsody-lyrics",
    "release_date": "1975-10-31",
    "release_date_for_display": "October 31, 1975",
    "recording_location": "Rockfield Studios, Wales",
    "lyrics": "[Intro]\n\nIs this the real life? Is this just fantasy?\n...\n\n[Verse 1]\n\nMama, just killed a man\n...",
    "primary_artists": [...],
    "featured_artists": [],
    "producer_artists": [...],
    "writer_artists": [...],
    "media": [
        { "provider": "youtube", "type": "video", "url": "https://www.youtube.com/watch?v=fJ9rUzIMcZQ" },
        { "provider": "spotify", "type": "audio", "url": "https://open.spotify.com/track/..." }
    ],
    "stats": { "pageviews": 11195764, "contributors": 521 }
}
```

### 🔗 Integrations

You can connect Genius Search & Lyrics Scraper with almost any cloud service or web app through [Apify integrations](https://apify.com/integrations). Connect with **Zapier, n8n, Make, Slack, Google Sheets, Google Drive, Airbyte, GitHub**, and many more.

You can also use [webhooks](https://docs.apify.com/integrations/webhooks) to trigger actions whenever a run finishes — for example, getting a notification or automatically processing the scraped data.

### 🦾 Using the Apify API

The Apify [API](https://docs.apify.com/api/v2) gives you programmatic access to Genius Search & Lyrics Scraper. You can start runs, fetch datasets, monitor execution, and integrate the scraper into your own workflows.

- **Python**: Use the [`apify-client`](https://pypi.org/project/apify-client/) PyPI package
- **Node.js**: Use the [`apify-client`](https://www.npmjs.com/package/apify-client) NPM package

### ❓ FAQ

#### Can I search multiple queries in one run?

Yes. The `queries` field accepts an array. Each query is processed sequentially and search results are tagged with the `search_query` field.

#### Can I fetch lyrics directly by song ID?

Yes. Use the `songIds` field to pass Genius song IDs. You can get song IDs from search results or from Genius song URLs (e.g. `https://genius.com/Queen-bohemian-rhapsody-lyrics` — the ID is 1063).

#### How many results can I get per query?

There is no hard limit, but you can control it with the `maxResults` field. If not set, all search results are returned.

#### Can I use Apify proxy?

Yes. The `proxy` field uses the standard Apify proxy configuration. You can enable `useApifyProxy`, select proxy groups with `apifyProxyGroups`, or set a country with `apifyProxyCountry`. IPs are rotated automatically.

#### Does this require a Genius API key?

No. The access token is built into the scraper.

#### Is it legal to scrape Genius?

This scraper only extracts publicly available data from Genius. However, ensure you comply with Genius's Terms of Service and applicable regulations. See also Apify's blog post on the [legality of web scraping](https://blog.apify.com/is-web-scraping-legal/).

# Actor input Schema

## `queries` (type: `array`):

List of song/artist search queries to search on Genius.

## `songIds` (type: `array`):

List of Genius song IDs to fetch lyrics for (e.g. from search results).

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

Maximum number of song results per search query. If not set, all results are returned.

## `proxy` (type: `object`):

Proxy settings for the actor. Apify proxy rotates IPs automatically.

## Actor input object example

```json
{
  "queries": [
    "Bohemian Rhapsody"
  ],
  "songIds": [
    "1063",
    "2554116"
  ],
  "maxResults": 10,
  "proxy": {
    "useApifyProxy": false
  }
}
```

# 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 = {
    "queries": [
        "Bohemian Rhapsody"
    ],
    "songIds": [
        "1063",
        "2554116"
    ],
    "maxResults": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("headlessagent/genius-search-lyrics-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 = {
    "queries": ["Bohemian Rhapsody"],
    "songIds": [
        "1063",
        "2554116",
    ],
    "maxResults": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("headlessagent/genius-search-lyrics-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 '{
  "queries": [
    "Bohemian Rhapsody"
  ],
  "songIds": [
    "1063",
    "2554116"
  ],
  "maxResults": 10
}' |
apify call headlessagent/genius-search-lyrics-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Genius Search & Lyrics Scraper",
        "description": "Search Genius for songs and extract full lyrics. Provide search queries or song IDs to get structured JSON with song details, artist info, media links, stats, and clean plain-text lyrics. Apify proxy support included.",
        "version": "1.0",
        "x-build-id": "gOA3Bo5LUnAJpIDXh"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/headlessagent~genius-search-lyrics-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-headlessagent-genius-search-lyrics-scraper",
                "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/headlessagent~genius-search-lyrics-scraper/runs": {
            "post": {
                "operationId": "runs-sync-headlessagent-genius-search-lyrics-scraper",
                "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/headlessagent~genius-search-lyrics-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-headlessagent-genius-search-lyrics-scraper",
                "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",
                "properties": {
                    "queries": {
                        "title": "Search Queries",
                        "type": "array",
                        "description": "List of song/artist search queries to search on Genius.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "songIds": {
                        "title": "Song IDs",
                        "type": "array",
                        "description": "List of Genius song IDs to fetch lyrics for (e.g. from search results).",
                        "items": {
                            "type": "string"
                        }
                    },
                    "maxResults": {
                        "title": "Max Results per Query",
                        "minimum": 1,
                        "type": "integer",
                        "description": "Maximum number of song results per search query. If not set, all results are returned."
                    },
                    "proxy": {
                        "title": "Proxy configuration",
                        "type": "object",
                        "description": "Proxy settings for the actor. Apify proxy rotates IPs automatically.",
                        "default": {
                            "useApifyProxy": false
                        }
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
