> ## Documentation Index
> Fetch the complete documentation index at: https://docs.oneshotagent.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Web Read

> Read a web page and extract content as markdown with screenshot

## Authentication

Requires x402 payment proof in the `X-Payment-Proof` header.

## Request Body

<ParamField body="url" type="string" required>
  URL of the web page to read
</ParamField>

<Snippet file="audit-context-params.mdx" />

## Response (202 Accepted)

<ResponseField name="request_id" type="string">
  Job ID for tracking progress
</ResponseField>

<ResponseField name="status" type="string">
  Job status: `processing`
</ResponseField>

<ResponseField name="tool" type="string">
  Always `web_read`
</ResponseField>

## Job Result (poll /v1/requests/:id)

<ResponseField name="url" type="string">
  The URL that was read
</ResponseField>

<ResponseField name="markdown" type="string">
  Page content extracted as markdown (max 50KB)
</ResponseField>

<ResponseField name="screenshot_url" type="string">
  Screenshot of the page
</ResponseField>

<ResponseField name="metadata" type="object">
  Page metadata: `title`, `description`, `statusCode`
</ResponseField>

<ResponseField name="truncated" type="boolean">
  Whether the markdown was truncated to 50KB
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST https://win.oneshotagent.com/v1/tools/web-read \
    -H "Content-Type: application/json" \
    -H "X-Payment-Proof: <your_x402_signature>" \
    -d '{
      "url": "https://example.com"
    }'
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch("https://win.oneshotagent.com/v1/tools/web-read", {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
      "X-Payment-Proof": paymentProof,
    },
    body: JSON.stringify({
      url: "https://example.com",
    }),
  });
  ```

  ```typescript SDK theme={null}
  const result = await agent.webRead({
    url: 'https://example.com',
  });
  console.log(result.markdown);
  console.log(result.screenshot_url);
  ```
</RequestExample>

<ResponseExample>
  ```json Response (202) theme={null}
  {
    "request_id": "uuid",
    "status": "processing",
    "tool": "web_read",
    "message": "Web page read initiated. Results available at /v1/requests/{id}."
  }
  ```

  ```json Completed Result theme={null}
  {
    "url": "https://example.com",
    "markdown": "# Example Domain\n\nThis domain is for use in illustrative examples...",
    "screenshot_url": "https://storage.example.com/screenshot.png",
    "metadata": {
      "title": "Example Domain",
      "description": "",
      "statusCode": 200
    },
    "truncated": false
  }
  ```
</ResponseExample>

<Info>See [Pricing](/pricing) for web read costs.</Info>

## Notes

* Content is extracted with `only_main_content` mode
* Markdown is truncated to 50KB if the page is very large
* Screenshots are generated server-side
* Job results are available via polling at `/v1/requests/{request_id}`
