
Metacritic Scraper
epctex/metacritic-scraper
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
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 mode
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);
});
})();