Use the official apify-client to run the App Reviews Scraper from Node.js. Client-side usage only — the Actor runs on Apify.
npm i apify-clientimport { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: 'YOUR_TOKEN' });
const input = {
store: 'both',
appIds: ['com.spotify.music', '324684580'],
country: 'us',
language: 'en',
sort: 'newest',
maxReviews: 1000,
};
// Run the Actor and wait for it to finish
const run = await client.actor('logiover/app-reviews-scraper').call(input);
// Fetch the review items from the run's dataset
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(`Collected ${items.length} reviews`);
console.log(items[0]);const run = await client.actor('logiover/app-reviews-scraper').call({
store: 'google_play',
appIds: ['com.spotify.music'],
country: 'us',
sort: 'newest',
maxReviews: 5000,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
const badReviewsForVersion = items.filter(
(r) => r.sentiment === 'negative' && r.appVersion === '8.9.44.575',
);
console.log(`${badReviewsForVersion.length} negative reviews for this version`);const run = await client.actor('logiover/app-reviews-scraper').call({
store: 'app_store',
appIds: ['324684580'],
appleCountries: ['us', 'gb', 'ca', 'au', 'de'],
maxReviews: 20000,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(`Collected ${items.length} App Store reviews across storefronts`);const datasetClient = client.dataset(run.defaultDatasetId);
let offset = 0;
const limit = 1000;
const all = [];
while (true) {
const { items } = await datasetClient.listItems({ offset, limit });
if (items.length === 0) break;
all.push(...items);
offset += items.length;
}
console.log(`Total: ${all.length} reviews`);const counts = items.reduce((acc, r) => {
acc[r.sentiment] = (acc[r.sentiment] ?? 0) + 1;
return acc;
}, {});
console.log(counts); // { positive: 812, neutral: 96, negative: 92 }