# 2s.io Article Cleaner

> 2s.io Article Cleaner is a paid API for AI agents from 2s.io, paid per call via x402, $0.00108/call, status unknown (last checked 2026-09-13, last successful call 2026-07-23).

Fetches a URL and returns its article content as clean markdown (or plain text), stripping navigation, ads, sidebars, scripts, and other non-article elements.

## Facts

- Endpoint: GET https://2s.io/api/url/clean
- Price: $0.00108/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Last successful call: 2026-07-23
- Success rate: 92% of calls made through Zero
- Rating: 5.0 / 5 from 1 review
- Activations on Zero: 15
- Tags: x402
- Canonical page: https://www.zero.xyz/c/2s-io-5b08a433
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_L08obBEZtKEx7WL0rM90_

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 2s-io-5b08a433
```

Example prompt: Can you grab the full article from https://www.nytimes.com/2024/01/15/technology/ai-agents.html and give it to me as clean markdown so I can summarize it?

## When to prefer this

Use this endpoint when you need the full article body of a web page for LLM consumption, summarization, or analysis — not just metadata or a preview. Prefer over /api/url/unfurl when you need the complete article text rather than just a 500-character preview and metadata. Best suited for news articles, blog posts, and documentation pages where the main content is clearly delimited from surrounding boilerplate.

## Known failure modes

- URL is unreachable or returns non-200 status — extraction fails with error
- Response body exceeds 512KB cap — truncated or rejected
- Request times out after 8 seconds — timeout error
- URL resolves to a private/internal IP (SSRF guard) — blocked with error
- Too many redirects (>5) — redirect limit error
- Page has no identifiable article content — returns empty or minimal markdown

## How this service works

Fetch any URL and return its article content with the clutter stripped — nav, ads, sidebars, footers, scripts, styles, comments removed via heuristic extraction (<article> / <main> / role=main / densest block). Choose the output with `format`: markdown (default), text, both (JSON envelope), html (a self-contained readable reader-view page, raw text/html), or pdf (a clean typeset reading document, raw application/pdf). html/pdf are built from the same cleaned content, so they carry no live page, no third-party assets, no trackers. SSRF-guarded, 512KB body cap, 8s timeout, 5 redirects max. JSON formats return { url, finalUrl, title, markdown?, text?, wordCount, sourceBytes }. This uses a raw HTTP fetch (no JavaScript) — for client-rendered / SPA pages whose content only appears after JS runs, use /api/url/render (same formats, headless-rendered). For a pixel-perfect image of the live page use /api/ai/screenshot; to enumerate a page or sitemap into its links use /api/url/map.

## Output

Returns a JSON object with: url (original), finalUrl (after redirects), title, markdown (clean article as markdown), text (plain text, if requested), wordCount, and sourceBytes. Non-article page elements like nav, footer, ads, scripts, and comments are stripped out.

## Example request

```json
{
 "input": {
  "type": "http",
  "method": "GET",
  "queryParams": {
   "url": "https://en.wikipedia.org/wiki/Artificial_intelligence",
   "format": "markdown"
  }
 }
}
```

## 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",
    "queryParams"
   ],
   "properties": {
    "type": {
     "const": "http"
    },
    "method": {
     "const": "GET"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "url"
     ],
     "properties": {
      "url": {
       "type": "string",
       "maxLength": 2048
      },
      "format": {
       "enum": [
        "markdown",
        "text",
        "both",
        "html",
        "pdf"
       ],
       "type": "string",
       "default": "markdown"
      }
     },
     "additionalProperties": false
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/2s-io-5b08a433/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from 2s.io](https://www.zero.xyz/host/2s.io/llms.txt)
