# Swift Bot Labs Toolbox – Web Extract

> Swift Bot Labs Toolbox – Web Extract is a paid API for AI agents from x402-toolbox.swiftbotlab.workers.dev, paid per call via x402, $0.01/call, status unknown (last checked 2026-10-31).

Fetches a URL and returns its content as cleaned markdown, plain text, or both, stripping nav/header/footer boilerplate

## Facts

- Endpoint: GET https://x402-toolbox.swiftbotlab.workers.dev/v1/web/extract?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-31
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/swift-bot-labs-toolbox-web-extract-6b49eba1
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_c0YQFavljpd6CE4wVgJhj

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability swift-bot-labs-toolbox-web-extract-6b49eba1
```

Example prompt: Fetch the article at https://www.bbc.com/news/technology-12345678 and give me the main readable content as markdown, ignoring nav and footer.

## When to prefer this

Choose this endpoint when you need a quick, pay-per-call, no-registration web content extraction with clean markdown output, especially in agentic pipelines that already use x402 micropayments. It is ideal for single-URL fetches where you want boilerplate stripped and readable text returned. Prefer alternatives like Playwright-based scrapers if the target page requires JavaScript rendering or full browser execution.

## Known failure modes

- Target URL returns non-200 status — result includes the HTTP status code but content may be empty
- URL is behind a login wall or CAPTCHA — returns limited or empty content
- Target site blocks headless/datacenter requests — may return error page content instead of article
- maxChars too low — content is truncated at the specified limit
- Invalid URL format in queryParams.url — API returns an error response
- Dynamically rendered JavaScript-heavy pages may yield incomplete extraction since this is an HTTP fetch, not a browser

## How this service works

62 small, deterministic utility APIs (DNS and e-mail checks, web extraction, EVM decoding, x402 checks, IP math, JSON/CSV, hashing, conversions). No account or API key: pay per call in USDC with x402.

## Output

A JSON object containing: ok (boolean), tool name, and a result object with the page URL, detected language, title, word count, HTTP status, and the extracted content in the requested format (markdown, text, or both). The markdown field strips boilerplate navigation, headers, and footers when mode is 'main'.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET",
      "HEAD"
     ],
     "type": "string"
    },
    "headers": {
     "type": "object",
     "additionalProperties": {
      "type": "string"
     }
    },
    "queryParams": {
     "type": "object",
     "required": [
      "url"
     ],
     "properties": {
      "url": {
       "type": "string"
      },
      "mode": {
       "enum": [
        "main",
        "all"
       ],
       "type": "string",
       "description": "\"main\" keeps the article/main region and drops nav/header/footer"
      },
      "format": {
       "enum": [
        "markdown",
        "text",
        "both"
       ],
       "type": "string"
      },
      "maxChars": {
       "type": "string"
      }
     },
     "additionalProperties": false
    },
    "discoverable": {
     "type": "boolean"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ok": true,
  "tool": "web-extract",
  "result": {
   "url": "https://example.com/",
   "lang": "en",
   "title": "Example Domain",
   "words": 25,
   "status": 200,
   "markdown": "This domain is for use in documentation examples without needing permission. This is not a service; avoid relying on it for testing and monitoring purposes."
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/swift-bot-labs-toolbox-web-extract-6b49eba1/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-toolbox.swiftbotlab.workers.dev](https://www.zero.xyz/host/x402-toolbox.swiftbotlab.workers.dev/llms.txt)
