Genius Scraper
Try for free
3 days trial then $5.00/month - No credit card required now
View all Actors
Genius Scraper
epctex/genius-scraper
Try for free
3 days trial then $5.00/month - No credit card required now
The Genius.com scraper extracts songs and lyrics from the platform. It fetches details from song, album, artist pages, supports tag-based retrieval, searches, and includes comments. Simplify accessing and analyzing music content from Genius.com.
The code examples below show how to run the Actor and get its results. To run the code, you need to have an Apify account. Replace <YOUR_API_TOKEN> in the code with your API token, which you can find under Settings > Integrations in Apify Console. Learn more
Node.js
Python
curl
1import { ApifyClient } from 'apify-client';
2
3// Initialize the ApifyClient with your Apify API token
4const client = new ApifyClient({
5 token: '<YOUR_API_TOKEN>',
6});
7
8// Prepare Actor input
9const input = {
10 "startUrls": [
11 "https://genius.com/Fifty-fifty-cupid-twin-version-lyrics",
12 "https://genius.com/albums/Fifty-fifty/The-beginning-cupid",
13 "https://genius.com/artists/Drake",
14 "https://genius.com/tags/pop",
15 "https://genius.com/search?q=tiktok"
16 ],
17 "search": "rap",
18 "searchMode": "song",
19 "maxItems": 20,
20 "endPage": 1,
21 "extendOutputFunction": ($) => { return {} },
22 "customMapFunction": (object) => { return {...object} },
23 "proxy": {
24 "useApifyProxy": true
25 }
26};
27
28(async () => {
29 // Run the Actor and wait for it to finish
30 const run = await client.actor("epctex/genius-scraper").call(input);
31
32 // Fetch and print Actor results from the run's dataset (if any)
33 console.log('Results from dataset');
34 console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
35 const { items } = await client.dataset(run.defaultDatasetId).listItems();
36 items.forEach((item) => {
37 console.dir(item);
38 });
39})();
40
41// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs
Developer
Maintained by Community
Actor metrics
- 10 monthly users
- 100.0% runs succeeded
- days response time
- Created in Jun 2023
- Modified about 17 hours ago
Categories