Mandala
Tools

Stagehand

Web automation and data extraction

Usage Instructions

Integrate Stagehand into the workflow. Can extract structured data from webpages or run an autonomous agent to perform tasks.

Tools

stagehand_extract

Extract structured data from a webpage using Stagehand

Input

ParameterTypeRequiredDescription
urlstringYesURL of the webpage to extract data from
instructionstringYesInstructions for extraction
providerstringNoAI provider to use: openai or anthropic
apiKeystringYesAPI key for the selected provider
schemajsonYesJSON schema defining the structure of the data to extract

Output

ParameterTypeDescription
dataobjectExtracted structured data matching the provided schema

stagehand_agent

Run an autonomous web agent to complete tasks and extract structured data

Input

ParameterTypeRequiredDescription
startUrlstringYesURL of the webpage to start the agent on
taskstringYesThe task to complete or goal to achieve on the website
variablesjsonNoOptional variables to substitute in the task (format: {key: value}). Reference in task using %key%
providerstringNoAI provider to use: openai or anthropic
apiKeystringYesAPI key for the selected provider
outputSchemajsonNoOptional JSON schema defining the structure of data the agent should return

Output

ParameterTypeDescription
agentResultobjectResult from the Stagehand agent execution
structuredOutputobjectExtracted data matching the provided output schema

Notes

  • Category: tools
  • Type: stagehand
Stagehand