All skills
apify avatar

/apify-actor-development

@c009920 official
by apifyapify/agent-skills2.4k stars
259

Create, modify, debug, and deploy Apify Actors, and write their input and output schemas. Use when building an Actor from scratch, changing or troubleshooting Actor code, generating or updating .actor schema files, or pushing an Actor to the Apify platform. To wrap an existing non-Actor project, use apify-actorization instead.

Use this Skill: https://skilld.dev/gh/apify/agent-skills/apify-actor-development

This session only. Nothing lands on disk.

referencesinput-schema.md

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

Input schema

.actor/input_schema.json drives both validation and the Console form. The platform validates input against it before the Actor starts, so a field the code reads but the schema omits fails silently for users of the form. Full specification: https://docs.apify.com/actors/development/actor-definition/input-schema/specification/v1

{
    "title": "E-commerce Product Scraper Input",
    "type": "object",
    "schemaVersion": 1,
    "properties": {
        "startUrls": {
            "title": "Start URLs",
            "type": "array",
            "description": "Category or product pages to start from",
            "editor": "requestListSources",
            "prefill": [{ "url": "https://example.com/category" }]
        },
        "maxRequestsPerCrawl": {
            "title": "Max requests per crawl",
            "type": "integer",
            "description": "Maximum number of pages to scrape (0 = unlimited)",
            "default": 1000,
            "minimum": 0,
            "sectionCaption": "Limits"
        },
        "locale": {
            "title": "Locale",
            "type": "string",
            "description": "Language of the scraped content",
            "editor": "select",
            "default": "en",
            "enum": ["cs", "en", "de"],
            "enumTitles": ["Czech", "English", "German"]
        },
        "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Proxy settings for anti-bot protection",
            "editor": "proxy",
            "default": { "useApifyProxy": true }
        }
    },
    "required": ["startUrls"]
}

Every field needs title, type, and description. Types are string, integer, number, boolean, object, array.

default, prefill, required

  • default is what the Actor receives when the caller omits the field, from the form, API, CLI, or scheduler alike.
  • prefill only fills the form. It never reaches the Actor unless the user submits it, so it is the safe place for example URLs.
  • required forces the user to enter a value. Pair it with prefill when helpful; pairing it with default is redundant.
  • nullable: true allows null independently of required.

Editors by type

Type Editors Notes
string textfield, textarea, select, datepicker, javascript, python, fileupload, hidden pattern, minLength, maxLength. select needs enum or enumSuggestedValues (free text allowed), labelled by enumTitles. datepicker takes dateType: absolute, relative, or absoluteOrRelative.
integer, number number, hidden minimum, maximum, and unit for a display suffix such as "seconds".
boolean checkbox, hidden groupCaption and groupDescription on the first checkbox group a run of them.
object json, proxy, schemaBased, hidden properties, required, additionalProperties, minProperties, maxProperties. proxy yields { useApifyProxy, apifyProxyGroups, proxyUrls }. schemaBased renders sub-properties as form fields, one level deep.
array requestListSources, stringList, keyValue, globs, pseudoUrls, select, json, schemaBased, fileupload, hidden items, minItems, maxItems, uniqueItems. Multiselect is select with items.enum. keyValue and stringList take placeholderKey / placeholderValue.
resource (string or array) resourcePicker, textfield, hidden resourceType: dataset, keyValueStore, requestQueue, or mcpConnector, with resourcePermissions ["READ"] or ["READ", "WRITE"] for storages.

Other field properties

  • sectionCaption and sectionDescription start a collapsible section that runs until the next caption.
  • isSecret: true encrypts the value at rest. Allowed with textfield, textarea, hidden (strings) and json, hidden (objects, arrays). Actor.getInput() decrypts transparently; reading the INPUT record directly returns ENCRYPTED_VALUE:....
  • errorMessage maps a validation keyword to a custom message, worth it for regex pattern fields: { "pattern": "Must be a valid email address" }.
  • example shows a sample value on the Store page.
  • Escape backslashes twice in pattern, since it lives inside a JSON string.
  • patternKey and patternValue are deprecated; use items or properties with pattern on the individual field.
  • The whole file is capped at 500 kB. Top-level additionalProperties: false rejects unknown input keys.

Run apify validate-schema after editing.

Source: SKILL.md on GitHub

2 warnings1d5 checks · Risk SAFE
  • Gen Agent Trust Hub1d

    This skill provides secure guidelines for developing Apify Actors, emphasizing credential protection, sanitization of external data, and the use of trusted package managers.

  • Socket1d

    No alerts

  • Snyk1d

    Risk: MEDIUM · 1 issue

  • Runlayer7mo

    1/8 files flagged

  • ZeroLeaks5mo

    1 finding · Score: 82/100

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

Last checked against GitHub yesterday.

Activeupdated yesterday
  • Python
  • TypeScript
  • apify
  • actors
  • web-scraping
  • automation
  • nodejs
  • docker
  • serverless
  • data-processing

README badge

README badge for apify/agent-skills/apify-actor-development

Develops, debugs, and deploys Apify Actors—serverless cloud programs for web scraping, automation, and data processing using the Apify CLI and SDK. Covers Actor creation across JavaScript, TypeScript, and Python, local testing with `apify run`, schema configuration, and deployment to the Apify platform.

Generated from the current SKILL.md.

What programming languages does this skill support?
JavaScript, TypeScript, and Python. The skill prompts you to choose your language preference and uses the appropriate `apify create` template (`project_empty` for JS, `ts_empty` for TS, `python-empty` for Python).
Do I need to install the Apify CLI before using this skill?
Yes. The skill requires `apify` CLI to be installed and authenticated. Install via `npm install -g apify-cli` and authenticate with `apify login` or set the `APIFY_TOKEN` environment variable.
Does local testing with `apify run` upload results to Apify Console?
No. Local testing stores data only in your `storage/` directory. You must deploy with `apify push` and run on the platform to see results in Apify Console.
What should I use for web scraping - CheerioCrawler or PlaywrightCrawler?
Use CheerioCrawler for static HTML (10x faster) and PlaywrightCrawler only for JavaScript-heavy sites that require a browser.
How are sensitive credentials handled in Actors?
Use the `apify/log` package, which automatically censors API keys and tokens. Never pass `APIFY_TOKEN` as command-line arguments or log raw crawled content that may contain credentials.

Generated from the current SKILL.md. These answers refresh after source changes.