/apify-pack:apify-hello-worldfrom apify-pack
Runs an Apify Actor, waits for completion, and retrieves scraped data via apify-client. Demonstrates the core call-wait-collect pattern for Apify integrations.
Ships in apify-pack. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
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.
npm install apify-client completedAPIFY_TOKEN environment variable setapify-install-auth if not readyEvery 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.
import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
// 1. Run an Actor and wait for it to finish
const run = await client.actor('apify/website-content-crawler').call({
startUrls: [{ url: 'https://docs.apify.com/academy' }],
maxCrawlPages: 5,
});
// 2. Retrieve results from the default dataset
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(`Crawled ${items.length} pages:`);
items.forEach(item => {
console.log(` - ${item.url}: ${item.text?.substring(0, 80)}...`);
});
This is the whole workflow at a high level: authenticate, .call() an Actor,
then read its default dataset. For sync-vs-async execution, pagination,
downloads, key-value store retrieval, run-configuration options, and a table of
popular starter Actors, see run & retrieval patterns.
Use Write (or Edit an existing file) to create hello-apify.ts (or .js) with
the Core Pattern code above. Use Read to confirm the file contents before running.
# With tsx (recommended)
npx tsx hello-apify.ts
# Or with Node.js (plain JS)
node hello-apify.js
The Actor runs on Apify's cloud infrastructure. See the Output section below for the run-object fields returned when it finishes.
A successful run returns a run object plus a populated dataset. The fields you read most:
| Field | Meaning |
|---|---|
run.id | Unique run identifier |
run.status | SUCCEEDED, FAILED, TIMED-OUT, or ABORTED |
run.defaultDatasetId | ID of the dataset containing scrape results |
run.defaultKeyValueStoreId | ID of the KV store with metadata/artifacts |
run.statusMessage | Human-readable detail (essential when status is not SUCCEEDED) |
client.dataset(run.defaultDatasetId).listItems() returns { items }, where
each item is one scraped record (shape depends on the Actor). Always branch on
run.status before reading the dataset — a FAILED run can leave an empty or
partial dataset. See worked examples for the full
run-object breakdown.
| Error | Cause | Solution |
|---|---|---|
Actor not found | Wrong Actor ID | Check ID at apify.com/store |
run.status === 'FAILED' | Actor crashed | Check run.statusMessage for details |
run.status === 'TIMED-OUT' | Exceeded timeout | Increase timeout or reduce workload |
Dataset is empty | Actor produced no output | Verify input parameters; check Actor logs |
402 Payment Required | Insufficient compute units — Apify returns HTTP 402 when your account is out of prepaid units | Top up at console.apify.com/billing |
Minimal happy-path collection — call an Actor and count the results:
const run = await client.actor('apify/website-content-crawler').call({
startUrls: [{ url: 'https://example.com' }],
maxCrawlPages: 10,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(`Scraped ${items.length} pages`);
For the complete status-guarded "scrape and save to JSON" script and a full breakdown of the run object, see worked examples.
Once your first Actor run succeeds, proceed to the apify-local-dev-loop skill
to build and iterate on your own Actor locally, then deploy it back to the Apify
platform. That skill covers the develop-run-debug cycle in depth.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
apify, apify-client, web-scraping, actor, hello-world, dataset
npx claudepluginhub jeremylongshore/tons-of-skills-marketplace --plugin apify-pack18 skills in this plugin
/apify-ci-integrationConfigure CI/CD pipelines for Apify Actor builds and deployments.
Use when automating Actor deployment via GitHub Actions, running
integration tests against the live Apify API, or building CI/CD for
scrapers that push to the Apify platform.
Trigger with "apify CI", "apify GitHub Actions", "apify automated deploy",
"CI apify", "apify pipeline", "auto deploy actor".
/apify-common-errorsDiagnose and fix common Apify Actor and API errors.
Use when an Apify run fails, an API call returns 401/403/404/413/429,
a proxy connection drops, an Actor build breaks, or a scrape hits an
anti-bot block, and you need the cause plus a copy-paste fix.
Trigger with "apify error", "fix apify", "actor failed",
"apify not working", "debug apify", "apify 429".
/apify-core-workflow-aOther plugins' skills for the same job