apify-actor
БесплатноБез исполняемых скриптовНе проверенBuild and deploy Apify actors for web scraping and automation. Use for serverless scraping, data extraction, browser automation, and API integrations with…
от diegosouzapw★ 68 звёзд на GitHubОб этом скилле
Apify Actor Development
Build serverless Apify actors for web scraping, browser automation, and data extraction using Python.
Prerequisites & Setup (MANDATORY)
Before creating or modifying actors, verify that apify CLI is installed:
Run apify --help.
If it is not installed, you can run:
curl -fsSL https://apify.com/install-cli.sh | bash
# Or (Mac): brew install apify-cli
# Or (Windows): irm https://apify.com/install-cli.ps1 | iex
# Or: npm install -g apify-cli
When the apify CLI is installed, check that it is logged in with:
apify info # Should return your username
If it is not logged in, check if the APIFY_TOKEN environment variable is defined (if not, ask the user to generate one on https://console.apify.com/settings/integrations and then define APIFY_TOKEN with it).
Then run:
apify login -t $APIFY_TOKEN
Quick Start Workflow
Creating a New Actor
- Copy template - Copy all files including hidden ones from the skill's
assets/python-template/directory to your new actor directory. The template is located at{base_dir}/assets/python-template/where{base_dir}is the skill's base directory. - Setup pre-commit - Run
uv run pre-commit installfor automatic quality checks - Add dependencies - Use
uv add package-namefor each required dependency - Implement logic - Write the actor code in
src/main.py(thesrc/__main__.pyentry point is already set up) - Configure schemas - Update input/output schemas in
.actor/input_schema.jsonand.actor/output_schema.json - Configure platform settings - Update
.actor/actor.jsonwith actor metadata - Write documentation - Create comprehensive
.actor/ACTOR.mdfor the marketplace - Test locally - Run
apify runto verify functionality - Deploy - Run
apify pushto deploy the actor on the Apify platform
CRITICAL REMINDERS:
- NEVER create
requirements.txt - NEVER use
pip installoruv pip install - ALWAYS use
uv addto add dependencies - ALWAYS use
uv syncto install dependencies - ALWAYS format with
uv run ruff format .after file changes - ALWAYS lint with
uv run ruff check --fix .after file changes - ALWAYS check the
apify pushoutput for build errors before considering deployment complete - Input/output schemas should be updated when changing actor functionality
Core Concepts
Input/Output Pattern
Every actor follows this pattern:
- Input: JSON from key-value store (defined by input schema)
- Process: Actor logic extracts/transforms data
- Output: Results pushed to dataset or key-value store
Storage Types
- Dataset: Structured data (arrays of objects) - use for scraping results and tabular data
- Key-Value Store: Arbitrary data (files, objects) - use for screenshots, PDFs, state, and binary files
- Request Queue: URLs to crawl - use for deep web crawling and multi-page scraping workflows
Project Structure
my-actor/
├── .actor/
│ ├── actor.json # Actor metadata
│ ├── input_schema.json # Input schema
│ ├── output_schema.json # Output schema
│ ├── ACTOR.md # PUBLIC marketplace documentation (CRITICAL)
│ └── datasets/
│ └── dataset_schema.json # Dataset schema with views
├── src/ or package_name/ # Source code
│ ├── __init__.py
│ ├── __main__.py # Entry point for CLI (REQUIRED)
│ └── main.py # Main actor logic
├── tests/ # Test files
│ └── test_*.py
├── .dockerignore # Docker build exclusions
├── .pre-commit-config.yaml # Pre-commit hooks
├── Dockerfile # Container config
├── pyproject.toml # Python project config
├── uv.lock # Dependency lock file
└── README.md # Development docs
Common Patterns
See references/python-sdk.md for complete examples of:
- Simple HTTP scraping with BeautifulSoup
- Browser automation with Playwright and Selenium
- Deep crawling with Request Queue
- Proxy management and error handling
- Storage APIs (Dataset, Key-Value Store, Request Queue)
Input Schema Design
Input schemas use JSON Schema format to define and validate actor inputs. See references/input-schema.md for:
- Field types (string, number, boolean, array, object)
- Special editors (requestListSources, globs, pseudoUrls, proxy, json, textarea)
- Validation patterns (regex, length, range, required fields)
- Complete examples with best practices
Key principles:
- Always include descriptions and examples
- Provide examples for all fields
- Set sensible defaults for ease of use
- Use appropriate editors for better UX
- Add units for numeric fields (pages, seconds, MB)
Output Schema Design
Output schemas define where actors store outputs and provide templates for accessing that data.
Установить apify-actor в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл apify-actor?
Build and deploy Apify actors for web scraping and automation. Use for serverless scraping, data extraction, browser automation, and API integrations with Python.
Как установить скилл apify-actor?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл apify-actor запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic