
Metacritic Scraper
- epctex/metacritic-scraper
- Modified
- Users 27
- Runs 3k
- Created by
epctex
Extract any data from Metacritic right away! Games, Music, Movies, TV Shows, People, Companies, and more information are ready for you. Get reviews immediately! Search for any keyword, filter by your needs, or get listing pages! Export your data by XML, JSON, CSV, Excel, or HTML
To run the code examples, you need to have an Apify account. Replace <YOUR_API_TOKEN> in the code with your API token. For a more detailed explanation, please read about running Actors via the API in Apify Docs.
import { ApifyClient } from 'apify-client';
// Initialize the ApifyClient with API token
const client = new ApifyClient({
token: '<YOUR_API_TOKEN>',
});
// Prepare Actor input
const input = {
"search": "last of us",
"startUrls": [
"https://www.metacritic.com/company/rca",
"https://www.metacritic.com/music/sos/sza",
"https://www.metacritic.com/tv/the-witcher-blood-origin",
"https://www.metacritic.com/movie/whitney-houston-i-wanna-dance-with-somebody",
"https://www.metacritic.com/game/playstation-5/elden-ring",
"https://www.metacritic.com/person/robert-downey-jr",
"https://www.metacritic.com/search/all/hel/results",
"https://www.metacritic.com/search/person/hel/results",
"https://www.metacritic.com/search/game/hel/results",
"https://www.metacritic.com/browse/movies/score/metascore/all/filtered/netflix",
"https://www.metacritic.com/browse/tv/score/metascore/year/filtered?sort=desc&view=detailed",
"https://www.metacritic.com/browse/games/genre/date/action/ps4"
],
"maxItems": 20,
"endPage": 1,
"extendOutputFunction": ($) => { return {} },
"customMapFunction": (object) => { return {...object} },
"proxy": {
"useApifyProxy": true
}
};
(async () => {
// Run the Actor and wait for it to finish
const run = await client.actor("epctex/metacritic-scraper").call(input);
// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
console.dir(item);
});
})();