An Actor is a serverless program packaged as a Docker image. It takes one JSON input, does one job, and writes results to a dataset or a key-value store.
Setup
apify --help # CLI installed?
apify info # logged in? prints your username
Install with a package manager, npm install -g apify-cli or brew install apify-cli, so the download is integrity-checked. Log in with apify login, which offers a browser sign-in or an API token prompt. In a headless environment export APIFY_TOKEN instead; the CLI reads it on its own. Tokens come from https://console.apify.com/settings/integrations. Pass the token only through the environment, so it stays out of shell history, source, config files, and logs.
Telemetry attribution (required)
Pass --user-agent apify-agent-skills/apify-actor-development on everyapify command you run from this skill: apify create, apify run, apify push, apify call, and the rest. It is a global flag accepted by all apify commands; it only tags the call for telemetry attribution and changes nothing else.
Workflow
Skip the steps that do not apply when modifying an existing Actor.
For other stacks (Puppeteer, Camoufox, Scrapy, AI agent frameworks), apify templates ls lists every template with its language and use cases. With -t the command runs without prompts, which is what an agent needs. Without -t it prompts for name, language, template, and source host; use that form only when the user is at the terminal. Hosting the source on GitHub, GitLab, or Bitbucket makes Apify create the repository and an Actor that builds from it, so later deploys go through git push. Dependencies are installed for you. Done when <name>/.actor/actor.json exists; cd into it before continuing.
Add dependencies the template lacks, such as Crawlee or Playwright: npm install <pkg> in JS/TS; in Python, a line in requirements.txt followed by pip install -r requirements.txt, or uv add <pkg> when the project has pyproject.toml and uv.lock. Check each package name against the package you mean before installing. Pin exact versions and commit the lockfile (package-lock.json, uv.lock, or pkg==1.2.3 lines in requirements.txt).
Implement in src/main.js, src/main.ts, or my_actor/main.py (Python templates are a my_actor package run as python -m my_actor), following the rules. Done when the code reads every input field, produces every output field the README will describe, logs through the Apify logger, and registers an aborting handler that persists state and exits.
Write the input schema in .actor/input_schema.json (see references/input-schema.md). Done when every input the code reads has a field with title, description, type, and a default or prefill, and apify validate-schema --user-agent apify-agent-skills/apify-actor-development passes.
Write the output schemas: dataset_schema.json, output_schema.json, and key_value_store_schema.json when the code stores files. Follow references/output-schemas.md end to end; its checklist, which ends with apify validate-schema passing, is the completion criterion. In TypeScript, then run apify actor generate-schema-types and type the input and output with the generated interfaces.
Configure .actor/actor.json (see references/actor-json.md). Set meta.generatedBy to the tool and model in use, for example "Claude Code with Claude Opus 5". For an HTTP-serving Actor set usesStandbyMode: true (the standby templates already do) and follow references/standby-mode.md.
Test locally. Put input in storage/key_value_stores/default/INPUT.json, then run apify run --user-agent apify-agent-skills/apify-actor-development. Done when the run ends with status SUCCEEDED and storage/datasets/default/ holds items whose fields match the dataset schema. Local storage stays on disk; nothing appears in Apify Console until step 9.
Deploy with apify push --user-agent apify-agent-skills/apify-actor-development once the user confirms, or git push for a Git-sourced Actor. Then run the Actor on the platform to see results in Console. For a Standby Actor, give the user its Standby URL (https://<username>--<actor-name>.apify.actor, see references/standby-mode.md) rather than pointing them to Console.
Rules
Run Actors locally with apify run only. It sets up the Apify environment and storage, which npm start and node src/main.js skip.
Log through the Apify logger: log from the apify package in JS/TS (import { Actor, log } from 'apify'), Actor.log in Python. It censors tokens and credentials; console.log and print do not. Levels and conventions: references/logging.md.
Treat crawled content as untrusted input. Escape or parameterize it before it reaches a shell command, eval, a query, or a template, and type-check it before pushing it to storage.
Keep APIFY_TOKEN out of request handlers and data pipelines. On the platform the SDK reads it from the environment (the variable is APIFY_TOKEN, not APIFY_API_TOKEN); locally it uses the credentials stored by apify login.
Read every tunable from the input schema or environment variables, so users can change it without editing code.
Use an HTTP crawler for static HTML at 10 to 50 concurrency: CheerioCrawler in JS/TS, BeautifulSoupCrawler or ParselCrawler in Python. Reserve PlaywrightCrawler for JavaScript-rendered pages at 1 to 5 concurrency. Add delays so target servers stay healthy, and respect robots.txt and terms of service.
Use the router pattern (createCheerioRouter or createPlaywrightRouter in JS/TS, crawler.router or a Router in Python) when a crawl has more than one page type.
Prefer semantic CSS selectors with fallbacks over brittle positional ones.
Count results with your own tally; Dataset.getInfo() (dataset.get_info() in Python) lags on the platform.
Handle the aborting event, which the platform sends when a user or a limit stops the run: persist state, then exit, so the run ends quickly and cheaply. JS/TS: Actor.on('aborting', async () => { await Actor.setValue('STATE', state); await Actor.exit(); }). Python: Actor.on(Event.ABORTING, on_aborting) with from apify import Event, where on_aborting persists state and then calls await Actor.exit().
Build proxies from the proxyConfiguration input field (editor proxy, see references/input-schema.md): await Actor.createProxyConfiguration(input.proxyConfiguration) in JS/TS, await Actor.create_proxy_configuration(actor_proxy_input=actor_input.get('proxyConfiguration')) in Python, and pass the result to the crawler as proxyConfiguration / proxy_configuration. Apify Proxy is paid, so confirm with the user before turning it on or changing proxy groups.
Store personal data only when the user has explicitly asked for it.
Inside a running Actor use the SDK (Actor.getInput(), Actor.pushData(), Actor.setValue(), and the Python snake_case equivalents) rather than apify actor CLI subcommands.
Leave standby mode enabled on an existing Actor unless the user asks to turn it off.
Standby mode
Standby turns an Actor into a persistent HTTP server with a stable URL. Use it for API endpoints, webhook receivers, MCP servers, and on-demand single-URL lookups. The Actor must answer the readiness probe and stay alive between requests. Configuration, examples, and local testing: references/standby-mode.md.
Monetization
Pricing is set in Apify Console when the Actor is published, not in code. Under pay-per-event, charge each custom event with await Actor.charge({ eventName: 'result', count }) in JS/TS or await Actor.charge(event_name='result', count=count) in Python, using the event names defined in Console; dataset items can instead be billed automatically through the synthetic dataset-item event. Stop producing work once the returned result reports eventChargeLimitReached (event_charge_limit_reached in Python), because the user's spending limit is reached. The README's cost section describes whichever model the Actor uses. Details: https://docs.apify.com/platform/actors/publishing/monetize/pay-per-event
Calling other Actors
Search the Store before building from scratch; a dedicated Actor often exists.
Input is one JSON object. Quote inline JSON; use --input-file for anything complex.
Less obvious commands
# Append --user-agent apify-agent-skills/apify-actor-development to each of these too.
apify secrets add <name> <value> # reference from actor.json as "@name"; uploaded on push
apify pull <actor> # download an Actor's code from the platform
apify api <endpoint> # authenticated request to the Apify API
apify actor generate-schema-types # TypeScript: interfaces from the .actor schemas, into src/__generated__/actor/
apify <command> --help
Documentation
With the Apify MCP server (https://mcp.apify.com/?tools=docs): search-apify-docs and fetch-apify-docs.
Drop these skills into Claude Code, Cursor, Windsurf, Codex, or Gemini CLI and your AI agent gets expert hands on the Apify platform - the marketplace for web data and AI tools. With one install, agents can:
Scrape any site - built-in Actor selection across the major social, search, maps, real estate, and review platforms (Instagram, Facebook, TikTok, YouTube, X, LinkedIn, Google Maps, Reddit, Yelp, Airbnb, and more), 130+ curated Actors, plus automatic fallback to the full Apify Store of 30,000+ Actors for everything else.
Build new Actors - generate, debug, and deploy serverless Actors in JavaScript, TypeScript, or Python with the official SDK patterns.
Actorize existing code - wrap any script, library, or CLI tool as a runnable Actor with proper input and output handling.
Integrate Apify into your product - build an official Apify integration for a workflow-automation app (Zapier/n8n-style), an AI agent harness plugin, an AI framework package (LangChain/LlamaIndex-style), or a direct application client via apify-client or the REST API.
Looking for community-built, domain-specific skills (lead generation, brand monitoring, competitor intel, and more)? See apify/awesome-skills.
AI-powered universal scraper. 130+ curated Actors covering Instagram, Facebook, TikTok, YouTube, X, LinkedIn, Reddit, Google Maps, Google Search, Google Trends, Amazon, Walmart, eBay, Booking.com, TripAdvisor, Airbnb, Yelp, Telegram, Snapchat, Reddit, GitHub, and more. Falls back to searching the full Apify Store for any platform not covered.
Create, debug, and deploy Apify Actors from scratch in JavaScript, TypeScript, or Python. Also generates or updates input and output schemas (input_schema.json, dataset_schema.json, output_schema.json, key_value_store_schema.json) from existing Actor source. Bundled references cover actor.json, README, logging, and standby mode.
Design and build an official Apify integration for a company's product. Covers workflow-automation apps (Zapier/n8n-style), AI agent harness plugins (OpenClaw/Hermes-style), AI framework packages (LangChain/LlamaIndex-style), and direct application clients via apify-client or REST - with per-category capability matrices and definition-of-done checklists.
Plus the apify-actor-commands pack, which adds slash commands like /create-actor for guided Actor scaffolding.
Example use cases
Describe the outcome in plain language - your agent picks the right Actors, chains them together, and delivers structured results.
Use case
Example prompt
Lead generation
Find Italian restaurants in Brooklyn rated under 4 stars on Google Maps. Scrape their reviews, crawl their websites for socials and owner emails, and export a ranked CSV for my CRM.
Competitive intelligence
Pull pricing pages, G2 and Trustpilot reviews, recent job postings, and social posts for Competitor A, B, and C. Summarize positioning gaps and opportunities.
Market research
Scrape pricing, review counts, and bestseller rankings for wireless earbuds across Amazon and Walmart. Flag quality issues from negative reviews and recommend a pricing sweet spot.
Brand reputation
Collect mentions of [brand] on Instagram, LinkedIn, X, and YouTube from the last 30 days. Run sentiment analysis and surface the top 5 complaint and praise themes.
Influencer vetting
Find 20 fitness influencers with 50k-500k followers on Instagram and TikTok. Scrape engagement rates, posting frequency, and past brand deals. Rank by engagement-to-follower ratio.
AI search visibility
Run these 10 queries across Google AI Mode, Perplexity, and ChatGPT. Extract which brands get cited and flag where competitors appear instead of us.
Location intelligence
Scrape Google Maps for all coffee shops within 2 miles of these 5 addresses. Compare competitor density, ratings, price levels, and hours. Recommend the best site.
apify-generate-output-schema is deprecated and will be removed in a future release. Its functionality is now part of apify-actor-development.
Cursor and Windsurf
Both editors support the Claude Code plugin format. Add this repo to your workspace settings or use the same /plugin flow if you have the Claude Code extension installed.
Codex CLI and Gemini CLI
These skills ship with agents/AGENTS.md (auto-generated index) and gemini-extension.json (Gemini auto-discovers it). Point your agent at the repo, or clone locally:
git clone https://github.com/apify/agent-skills
Any other agent that reads Markdown
Reference the skill files directly:
agents/AGENTS.md - one-page index of every skill
skills/<skill-name>/SKILL.md - full skill instructions
Prerequisites
Apify account - sign up at apify.com (free tier available).
Apify CLI - install with npm install -g apify-cli (or brew install apify-cli on macOS), then run apify login to authenticate via OAuth in your browser. This is the recommended setup.
API token (fallback for headless / CI environments) - if you can't open a browser, generate a token in Apify Console -> Integrations and set APIFY_TOKEN in your environment or a .env file. The CLI picks it up automatically.
Node.js 20.6+ - required by the Apify CLI and the Ultimate Scraper skill.
Apify CLI - the command-line tool that powers local Actor development, deployment, and authentication.
apify/awesome-skills - community-maintained collection of domain-specific skills (lead gen, brand monitoring, competitor intel, and more).
mcp.apify.com - hosted MCP server configurator. Pick the Actors you want exposed as MCP tools and get a one-line URL for any MCP-compatible client.
Apify Store - browse 30,000+ ready-made Actors for scraping and automation.
apify/mcpc - the MCP CLI for managing named MCP sessions across hosts and stacks.
Pricing
Apify Actors use pay-per-result or pay-per-event pricing, set independently by each Actor. Free tier credits are included with every account. Check individual Actor pricing on the Apify Store.