yfe404/apify-actor-developer-skill
Overview
This skill helps you build, test, deploy, and monetize Apify Actors for web scraping, automation, and AI agents. It covers project initialization, input schema design, implementation in JavaScript or Python, local testing, and deployment to the Apify platform. It also guides monetization options (pay-per-event, pay-per-result, rentals) and publishing to the Apify Store. Practical examples for Crawlee and Playwright are included to speed development.
How this skill works
The skill walks through creating an Actor from templates, scaffolding the .actor folder and src code, and wiring input/output schemas. It shows how to implement scraping and crawler logic, configure proxies, push results to datasets, and charge events or results for monetization. It describes local validation, CI via GitHub integration, and publishing steps including README and SEO tips. Core SDK methods and Crawlee crawler choices are summarized for quick reference.
When to use it
- You want to create a new Apify Actor from a template (JS/TS/Python).
- You need to build a scraper, crawler, or browser automation with Crawlee/Playwright/Puppeteer.
- You want to add input validation and UI via .actor/input_schema.json.
- You plan to monetize an Actor using pay-per-event, pay-per-result, or rental models.
- You need guidance on testing locally, deploying, and publishing to the Apify Store.
Best practices
- Start from the appropriate template to save setup time (Cheerio for static, Playwright/Puppeteer for JS-rendered pages).
- Design a clear input_schema with prefills and validation to improve UX and reduce support requests.
- Use Apify Proxy and proxy configuration to reduce blocking and improve success rates.
- Push structured data to datasets and include dataset_schema.json for consistent outputs.
- Implement PPE billing carefully: define meaningful events, test charges locally, and document pricing in README.
Example use cases
- A CheerioCrawler Actor that scrapes product listings and saves JSON results to a dataset.
- A Playwright Actor that logs into a site, navigates dynamic pages, and extracts user-visible content.
- An API-focused Actor that fetches JSON endpoints with HttpCrawler and normalizes responses.
- A LangChain or LangGraph agent that enriches scraped data with AI and charges per processed item.
- Publish a reusable Actor in the Apify Store with PPE pricing for per-page scraping and a free trial run.
FAQ
Use js-crawlee-cheerio or ts-crawlee-cheerio for the fastest HTTP-based scraping of static HTML pages.
How do I charge users per scraped page?
Define a pay_per_event.json event (e.g., page-scraped) and call Actor.charge or pass the event name to pushData in your code to bill per page.