
Apify Actor Development
Scaffold, debug, and deploy Apify Actors for serverless scraping and automation your agent can run in the cloud.
Install
npx skills add https://github.com/apify/agent-skills --skill apify-actor-developmentWhat is this skill?
- End-to-end Actor lifecycle: create, modify, debug, and deploy on Apify
- UNIX-style single-purpose containers with JSON input, datasets, and key-value stores
- Mandatory apify CLI setup path (npm global install or Homebrew on Mac)
- Requires filling generatedBy in .actor/actor.json for Apify AGENTS.md telemetry
Adoption & trust: 7.9k installs on skills.sh; 2.1k GitHub stars; 2/3 security scanners passed (skills.sh audits).
Recommended Skills
Agent Browservercel-labs/agent-browser
Lark Imlarksuite/cli
Lark Calendarlarksuite/cli
Lark Sheetslarksuite/cli
Lark Vclarksuite/cli
Lark Contactlarksuite/cli
Journey fit
Primary fit
Actors are integration artifacts—Dockerized jobs with JSON I/O—built after you know what data or automation you need. Integrations subphase is where third-party platforms, CLIs, and cloud workers get wired into the product or ops pipeline.
Common Questions / FAQ
Is Apify Actor Development safe to install?
skills.sh reports 2 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.
SKILL.md
READMESKILL.md - Apify Actor Development
# Apify Actor development **Important:** Before you begin, fill in the `generatedBy` property in the meta section of `.actor/actor.json`. Replace it with the tool and model you're currently using, such as "Claude Code with Claude Sonnet 4.5". This helps Apify monitor and improve AGENTS.md for specific AI tools and models. ## What are Apify Actors? Actors are serverless programs inspired by the UNIX philosophy - programs that do one thing well and can be easily combined to build complex systems. They're packaged as Docker images and run in isolated containers in the cloud. **Core Concepts:** - Accept well-defined JSON input - Perform isolated tasks (web scraping, automation, data processing) - Produce structured JSON output to datasets and/or store data in key-value stores - Can run from seconds to hours or even indefinitely - Persist state and can be restarted ## Prerequisites and setup (mandatory) Before creating or modifying Actors, verify that `apify` CLI is installed `apify --help`. If it is not installed, use one of these methods (listed in order of preference): ```bash # Preferred: install via a package manager (provides integrity checks) npm install -g apify-cli # Or (Mac): brew install apify-cli ``` > **Security note:** Do NOT install the CLI by piping remote scripts to a shell > (e.g. `curl … | bash` or `irm … | iex`). Always use a package manager. When the apify CLI is installed, check that it is logged in with: ```bash apify info # Should return your username ``` If not logged in, authenticate using OAuth (opens browser): ```bash apify login ``` If browser login isn't available (headless environment or CI), the CLI automatically reads `APIFY_TOKEN` from the environment. Ensure the env var is exported and run any apify command - no explicit login needed. If the user doesn't have a token, generate one at https://console.apify.com/settings/integrations. > **Security note:** Avoid passing tokens as command-line arguments (e.g. `apify login -t <token>`). > Arguments are visible in process listings and may be recorded in shell history. > Prefer environment variables or interactive login instead. > Never log, print, or embed `APIFY_TOKEN` in source code or configuration files. > Use a token with the minimum required permissions (scoped token) and rotate it periodically. ## Template selection **IMPORTANT:** Before starting Actor development, always ask the user which programming language they prefer: - **JavaScript** - Use `apify create <actor-name> -t project_empty` - **TypeScript** - Use `apify create <actor-name> -t ts_empty` - **Python** - Use `apify create <actor-name> -t python-empty` Use the appropriate CLI command based on the user's language choice. Additional packages (Crawlee, Playwright, etc.) can be installed later as needed. ## Quick start workflow 1. **Create Actor project** - Run the appropriate `apify create` command based on user's language preference (see Template selection above) 2. **Install dependencies** (verify package names match intended packages before installing) - JavaScript/TypeScript: `npm install` (uses `package-lock.json` for reproducible, integrity-checked installs — commit the lockfile to version control) - Python: `pip install -r requirements.txt` (pin exact versions in `requirements.txt`, e.g. `crawlee==1.2.3`, and commit the file to version control) 3. **Implement logic** - Write the Actor code in `src/main.py`, `src/main.js`, or `src/main.ts` 4. **Configure schemas** - Update input/output schemas in `.actor/input_schema.json`, `.actor/output_schema.json`, `.actor/dataset_schema.json` 5. **Configure platform settings** - Update `.actor/actor.json` with Actor metadata (see [references/actor-json.md](referenc