apify-hello-world

Featured

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".

AI & Automation 2,926 stars 433 forks Updated yesterday MIT

Install

View on GitHub

Quality Score: 99/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# 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 ```typescript 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)}...`); }); ``` ## Instructions ### Step 1: Create the Script Create `hello-apify.ts` (or `.js`) with the code above. ### Step 2: Run It ```bash # With tsx (recommended) npx tsx hello-apify.ts # Or with Node.js (plain JS) node hello-apify.js ``` ### Step 3: Understand the Output The Actor runs on Apify's cloud infrastructure. When it finishes: - `run.id` — unique run identifier - `run.status` — `SUCCEEDED`, `FAILED`, `TIMED-OUT`, or `ABORTED` - `run.defaultDatasetId` — ID of the dataset containing result...

Details

Author
jeremylongshore
Repository
jeremylongshore/claude-code-plugins-plus-skills
Created
1 years ago
Last Updated
yesterday
Language
Python
License
MIT

Integrates with

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category