Skip to main content
The Get Web Data command (Command Type: 19) executes an HTTP request to a specified URL using the browser’s native fetch API, running inside the browser context.

Command Type

Command Type ID: 19

Parameters

ParameterTypeDescriptionRequired
urlstringThe URL to fetch data fromYes
timeoutnumberTimeout in millisecondsYes
optionsobjectConfiguration object based on the RequestInit interface of the fetch APINo

Usage Examples

Fetch JSON Data

{
  "command": "get-web-data",
  "params": {
    "url": "https://api.example.com/data",
    "timeout": 10000
  }
}

Fetch with POST Options

{
  "command": "get-web-data",
  "params": {
    "url": "https://api.example.com/query",
    "timeout": 15000,
    "options": {
      "method": "POST",
      "headers": { "Content-Type": "application/json" },
      "body": "{\"query\":\"live_events\"}"
    }
  }
}

Common Use Cases

  • Same-Origin Requests: When the target API requires cookies or session context from the browser
  • Authenticated Fetches: Leverage existing browser session cookies for authenticated requests