| name | apify-hello-world |
| description | Run your first Apify Actor and retrieve results via apify-client.
Use when starting a new Apify integration, testing connectivity,
or learning the Actor call/dataset retrieval pattern.
Trigger with "apify hello world", "apify example", "run an apify actor",
"apify quick start", "first apify scrape".
|
| allowed-tools | Read, Write, Edit, Bash(npm:*), Bash(npx:*), Bash(node:*) |
| version | 1.5.0 |
| license | MIT |
| author | Jeremy Longshore <jeremy@intentsolutions.io> |
| tags | ["saas","scraping","automation","apify"] |
| compatibility | Designed for Claude Code |
Apify Hello World
Overview
Run a public Actor from the Apify Store, wait for it to finish, and retrieve the scraped data. This demonstrates the fundamental call-wait-collect pattern used in every Apify integration.
Prerequisites
npm install apify-client completed
APIFY_TOKEN environment variable set
- See
apify-install-auth if not ready
Authentication
Every call authenticates with a personal API token passed to the client
constructor: new ApifyClient({ token: process.env.APIFY_TOKEN }). Keep the
token in the APIFY_TOKEN environment variable — never hard-code it in the
script. Full setup (where to generate the token, how to export it) lives in the
apify-install-auth skill.
Core Pattern: Call Actor, Get Data
import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('apify/website-content-crawler').call({
startUrls: [{ url: 'https://docs.apify.com/academy' }],
maxCrawlPages: 5,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(`Crawled ${items.length} pages:`);
items.( {
.();
});