Run a paid web-data query
run_queryFetch a URL and extract structured data, paying in USDC via x402 (production networks). mode "fetch" (default) returns title/description/text; "links" returns outbound links; "images" returns image sources + alt text; "metadata" returns all meta tags + response headers. Call without paymentHeader first to receive the price + payment requirements; retry with paymentHeader set to a signed X-PAYMENT value to get the result.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"url": "<url>"
},
"name": "run_query"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | The URL to fetch and extract data from | |
| mode | No | Defaults to "fetch" | |
| agentId | No | Your registered agent id, for attribution | |
| paymentHeader | No | Signed x402 X-PAYMENT payload (base64). Omit on first call. |