Index of every page on this site: llms.txt
All skills
Run it yourself

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

Use this Skill: https://skilld.dev/gh/jeremylongshore/tons-of-skills-marketplace/apify-hello-world

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

referencesexamples.md

≈429 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Apify Hello World — Worked Examples

Full, runnable examples that extend the lean snippet in SKILL.md. Copy these verbatim; every one has been kept identical to the original skill body.

Complete Example: Scrape and Save

Runs a crawl, guards on run status, then writes the dataset to a local JSON file — the smallest end-to-end script you would actually ship.

import { ApifyClient } from 'apify-client';
import { writeFileSync } from 'fs';

const client = new ApifyClient({ token: process.env.APIFY_TOKEN });

async function scrapeAndSave() {
  console.log('Starting Actor run...');

  const run = await client.actor('apify/website-content-crawler').call({
    startUrls: [{ url: 'https://example.com' }],
    maxCrawlPages: 10,
  });

  if (run.status !== 'SUCCEEDED') {
    throw new Error(`Actor run failed: ${run.status} — ${run.statusMessage}`);
  }

  const { items } = await client.dataset(run.defaultDatasetId).listItems();
  writeFileSync('results.json', JSON.stringify(items, null, 2));
  console.log(`Saved ${items.length} items to results.json`);
}

scrapeAndSave().catch(console.error);

Understanding the Run Object

Every .call() / .start() returns a run object. The fields you use most:

  • run.id — unique run identifier
  • run.status — SUCCEEDED, FAILED, TIMED-OUT, or ABORTED
  • run.defaultDatasetId — ID of the dataset containing results
  • run.defaultKeyValueStoreId — ID of the KV store with metadata
  • run.statusMessage — human-readable detail, essential when status is not SUCCEEDED

Always branch on run.status before reading the dataset — an empty or partial dataset from a FAILED run is a common source of silent bugs.

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

1 warning2mo3 checks · Risk SAFE
  • Gen Agent Trust Hub2mo

    This skill provides a standard integration for Apify, a well-known web scraping and automation platform. It demonstrates best practices for secret management by using environment variables for API tokens and uses official client libraries. The skill involves running scripts and processing data from external websites, which are expected activities for its stated purpose.

  • Socket2mo

    No alerts

  • Snyk2mo

    Risk: MEDIUM · 1 issue

Signed by skilld at 820dfc8. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub yesterday.

Activeupdated 4 months ago
What it can do
Reads files Edits files Runs commands
version
1.5.0
author
Jeremy Longshore <jeremy@intentsolutions.io>
tags
[
  "saas",
  "scraping",
  "automation",
  "apify"
]
All 6 allowed tools
ReadWriteEditBash(npm:*)Bash(npx:*)Bash(node:*)
Other metadata
compatibility
Designed for Claude Code

README badge

README badge for jeremylongshore/tons-of-skills-marketplace/apify-hello-world