Skip to content

docs: add guide on building custom extensions - #2106

Open
shixi-li wants to merge 1 commit into
apify:masterfrom
shixi-li:docs/extending-crawlee-guide
Open

docs: add guide on building custom extensions#2106
shixi-li wants to merge 1 commit into
apify:masterfrom
shixi-li:docs/extending-crawlee-guide

Conversation

@shixi-li

@shixi-li shixi-li commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

Description

Refs #1936. Adds docs/guides/extending_crawlee.mdx, a page that maps Crawlee's extension points.

The four extension points you listed in the issue each already document their own contract in the guide that owns them: crawlers in the HTTP crawlers guide, HTTP clients and storage clients in theirs, and browser plugins in the Playwright crawler guide (#2089). What is still missing is the map, so someone who wants to extend Crawlee has to already know which guide to open, and a third-party project has no single page to point its users at for "here is the interface this integration implements".

This page is that map. For each extension point it states when to subclass rather than configure, names the base class and what its contract covers, and links to the guide that goes deep. It deliberately does not restate those guides.

Contents

  • Extension points — a class diagram plus one section each for crawlers (AbstractHttpCrawler), HTTP clients (HttpClient), storage clients (StorageClient), and browser plugins (PlaywrightBrowserPlugin), each linking to its detailed guide.
  • Choosing an extension point — matches the layer to what actually differs in an integration, and says to prefer configuration over a subclass where the built-in class already exposes the knob.
  • Framing for third-party integrations, per the issue's rationale: they host their own guide and reference the contract here.

Notes

  • Placed as its own guide rather than a section inside an existing one, since it spans all four extension points. The sidebar picks it up automatically (autogenerated over docs/guides).
  • No new code examples: each linked guide already carries a runnable one for its own extension point, so duplicating them here would mean two copies to keep in sync.
  • Happy to adjust the placement, depth, or wording, especially if you would rather this live under a different section or carry a worked example of its own.

Testing

  • uv run poe build-docs — build succeeds, the page renders at /docs/next/guides/extending-crawlee, and the build reports no broken links or anchors for it (the broken anchors in the log are pre-existing ones on API pages).
  • Verified every link target resolves before building: the five doc ids (http-crawlers, http-clients, storage-clients, playwright-crawler, architecture-overview), the playwright-crawler-with-camoufox example, and each ApiLink class (AbstractHttpCrawler, BasicCrawler, HttpClient, StorageClient, PlaywrightBrowserPlugin, PlaywrightBrowserController, BrowserPool) against src/crawlee/.

AI assistance

Written with AI assistance (Claude). The scoping decision was mine to check first what each extension point already documents, which is why this is a map rather than four new sections; the browser-plugin quarter was covered by my earlier #2089.

Crawlee has four extension points, and each already documents its own
contract in the guide that owns it: crawlers in the HTTP crawlers guide,
HTTP clients and storage clients in theirs, and browser plugins in the
Playwright crawler guide. What was missing is the map: a page that names
the extension points, says what each contract covers, and points at the
guide that goes deep.

That page is also what a third-party integration can link to, which is
the case apify#1936 was opened for: the integration hosts its own guide and
references a stable statement of the interface it implements.

Refs apify#1936
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants