| 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: "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.0.0 |
| license | MIT |
| author | Jeremy Longshore <jeremy@intentsolutions.io> |
| tags | ["saas","scraping","automation","apify"] |
| compatible-with | 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
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.forEach(item => {
console.log(` - ${item.url}: ${item.text?.substring(, )}...`);
});