Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

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от 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

  1. 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.
  2. Setup pre-commit - Run uv run pre-commit install for automatic quality checks
  3. Add dependencies - Use uv add package-name for each required dependency
  4. Implement logic - Write the actor code in src/main.py (the src/__main__.py entry point is already set up)
  5. Configure schemas - Update input/output schemas in .actor/input_schema.json and .actor/output_schema.json
  6. Configure platform settings - Update .actor/actor.json with actor metadata
  7. Write documentation - Create comprehensive .actor/ACTOR.md for the marketplace
  8. Test locally - Run apify run to verify functionality
  9. Deploy - Run apify push to deploy the actor on the Apify platform

CRITICAL REMINDERS:

  • NEVER create requirements.txt
  • NEVER use pip install or uv pip install
  • ALWAYS use uv add to add dependencies
  • ALWAYS use uv sync to 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 push output 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:

  1. Input: JSON from key-value store (defined by input schema)
  2. Process: Actor logic extracts/transforms data
  3. 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.

Полный SKILL.md на GitHub

Установить apify-actor в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

metadata.json

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), без исполняемых скриптов.

Похожие скиллы

Сравнить apify-actor с