Skip to main content
The ExecutionResource provides direct, stateless endpoints for running browser automation without saving a task first. You can scrape a page, run an agent session, or launch a headful browser in a single call. The Figranium client also exposes these as top-level shortcuts: figranium.scrape(), figranium.agent(), and figranium.headful().
ExecutionResource (singular) is for direct runs. For saved-task execution, see TasksResource. For execution history and live streams, see ExecutionsResource.

Methods

Performs a one-off scrape by sending POST /scrape. Pass a url, a selector for DOM extraction, or an extractionScript for custom parsing. You can also inject runtime variables via variables or taskVariables.
scrape-by-selector.ts
scrape-by-script.ts
Runs a one-off agent session by sending POST /agent. The agent navigates and interacts autonomously based on the provided input. You can supply a runId to correlate or resume a specific run.
agent-run.ts
Launches a headful (visible) browser session by sending POST /headful. Pass a starting url and optional runtime variables. This is useful when you need to interact with a live browser window or debug visually.
headful-run.ts

Top-level shortcuts

Figranium mirrors these methods at the client root so you can call them directly without reaching into execution:
shortcuts.ts

Return type

All three methods return ExecutionResult<T>, which extends UnknownRecord and includes: For error handling, see /sdk/js/errors. For request options such as signal, timeoutMs, and custom headers, see /sdk/js/request-options.