From 6ee053bfbf86e85e9b8226e5d04000f6df418889 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Hanu=C5=A1?= Date: Sun, 5 Jul 2026 13:58:41 +0200 Subject: [PATCH] =?UTF-8?q?docs(apify-actor-development):=20add=20library?= =?UTF-8?q?=20choice=20tree=20=E2=80=94=20don't=20reach=20for=20Crawlee=20?= =?UTF-8?q?when=20you=20don't=20need=20to=20crawl?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- skills/apify-actor-development/SKILL.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/skills/apify-actor-development/SKILL.md b/skills/apify-actor-development/SKILL.md index ce02412..332fda3 100644 --- a/skills/apify-actor-development/SKILL.md +++ b/skills/apify-actor-development/SKILL.md @@ -122,6 +122,20 @@ Use the appropriate CLI command based on the user's language choice. Additional - Use `console.log()` or `print()` instead of the Apify logger — these bypass credential censoring - Disable standby mode without explicit permission +### Choosing the right library for your Actor + +Crawlee is designed for crawls — traversing many pages with routing, deduplication, session handling, and concurrency management. For any of the following, do **not** wrap your code in a Crawlee crawler with a single `startUrl`, and do not pull Crawlee in at all: + +| Task | Use | +|------|-----| +| Crawl a website across many pages | Crawlee: `CheerioCrawler` for HTML, `PlaywrightCrawler` for JS-rendered | +| Call one HTTP API, transform, write to dataset | Native `fetch()` (Node 18+) or `requests` (Python) + Apify SDK for I/O | +| Receive webhooks or run a long-lived HTTP server | Standby Actor with an HTTP server (`express`, Node `http`, etc.) bound to the platform port | +| Orchestrate other Actors | `Actor.call()` / `Actor.start()` (JS/TS) or `Actor.call()` / `Actor.start()` (Python) | +| AI / LLM work | The model vendor's SDK (e.g. `@anthropic-ai/sdk`, `openai`, `anthropic`) + Apify SDK for I/O | + +Crawlee for a one-shot fetch adds startup cost, a request queue, a session pool, and a routing layer you don't need — and obscures the actual work behind a crawler abstraction. + ## Logging See [references/logging.md](references/logging.md) for complete logging documentation including available log levels and best practices for JavaScript/TypeScript and Python.