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: client.scrape(), client.agent(), and client.headful().
ExecutionResource (singular) is for direct runs. For saved-task execution, see TasksResource. For execution history and live streams, see ExecutionsResource.ExecutionResource.swift
Methods
scrape
scrape
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.swift
scrape_by_script.swift
agent
agent
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.swift
headful
headful
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.swift
Top-level shortcuts
Figranium mirrors these methods at the client root so you can call them directly without reaching into execution:
shortcuts.swift
Return type
All three methods returnExecutionResult<Value>, which includes the following fields:
For error handling, see
/sdk/swift/errors. For request options such as custom headers and timeout, see /sdk/swift/request-options.