feat: Add Crawlee + Stagehand actor templates (JS + TS)#670
Open
feat: Add Crawlee + Stagehand actor templates (JS + TS)#670
Conversation
Add two new actor templates using StagehandCrawler from @crawlee/stagehand, which combines Crawlee's crawling infrastructure with Stagehand's AI-powered browser automation (act(), extract(), observe()). Templates: - js-crawlee-stagehand-chrome: JavaScript version - ts-crawlee-stagehand-chrome: TypeScript version Both demonstrate page.act() for natural language actions and page.extract() for structured data extraction with Zod schemas. Default LLM provider is OpenAI (gpt-4o-mini). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2dd49c8 to
4ef3316
Compare
4ef3316 to
2dd49c8
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
js-crawlee-stagehand-chromeandts-crawlee-stagehand-chrometemplates usingStagehandCrawlerfrom@crawlee/stagehand(Crawlee 3.16+)page.act()for natural language actions andpage.extract()with Zod schemas for structured data extractiongpt-4o-mini); templates are classified underuseCases: ["AI", "WEB_SCRAPING"]so tests run in thenode-js-llm-ai-templatesgroupTest plan
cd templates/js-crawlee-stagehand-chrome && npm install && npm run lint && npm run format:checkpassescd templates/ts-crawlee-stagehand-chrome && npm install && npm run lint && npm run format:checkpasses.actor/actor.jsonhas correcttemplateIdandenvironmentVariables.OPENAI_API_KEYREADME.mdcontains<!-- This is an Apify template readme -->npm run buildfrom root to generate zip archivesnpm run test-llm-ai-node-templates(requiresOPENAI_API_KEYenv var)🤖 Generated with Claude Code