Call the hosted GitHub Activity Stream from Node.js with the official apify-client. These snippets run the Actor on Apify — nothing scrapes locally.
npm install apify-clientimport { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: 'YOUR_TOKEN' });
const run = await client.actor('logiover/github-activity-stream').call({
mode: 'repo',
repos: ['microsoft/vscode'],
since: '2026-06-29',
maxPerType: 200,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(`Fetched ${items.length} events`);
for (const e of items) {
console.log(e.type.padEnd(8), e.repo, '|', e.title);
}const since = new Date(Date.now() - 7 * 864e5).toISOString().slice(0, 10);
const run = await client.actor('logiover/github-activity-stream').call({
mode: 'repo',
repos: ['vercel/next.js'],
since,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
const releases = items.filter((e) => e.type === 'release');
const mergedPRs = items.filter((e) => e.type === 'pull' && e.merged);
console.log(`Releases: ${releases.length}, Merged PRs: ${mergedPRs.length}`);const run = await client.actor('logiover/github-activity-stream').call({
mode: 'repo',
repos: ['openssl/openssl'],
eventTypes: ['commits', 'pulls'],
maxPerType: 300,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
const rx = /\b(security|cve|vuln|exploit|patch|fix)\b/i;
const flagged = items.filter((e) => e.title && rx.test(e.title));
console.log(`${flagged.length} security-flagged events`);const run = await client.actor('logiover/github-activity-stream').call({
mode: 'org',
org: 'kubernetes',
maxOrgRepos: 20,
eventTypes: ['releases'],
since: '2026-06-01',
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
for (const r of items) console.log(r.repo, r.tagName, r.createdAt);Keep your token in an environment variable (
process.env.APIFY_TOKEN) rather than hard-coding it.