# AgentDiet RAG-Diet Structured Web Scraper

> AgentDiet RAG-Diet Structured Web Scraper is a paid API for AI agents from rag-diet.agentdiet.dev, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-22).

Fetches a URL and returns clean Markdown, JSON-LD, and extracted tables suitable for RAG pipelines and AI context windows.

## Facts

- Endpoint: GET https://rag-diet.agentdiet.dev/v1/web-scrape?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-22
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agentdiet-rag-diet-structured-web-scraper-bfb91008
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_pU-a-c28Wp7HsEeb0tPzT

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 agentdiet-rag-diet-structured-web-scraper-bfb91008
```

Example prompt: Scrape the page at https://en.wikipedia.org/wiki/List_of_countries_by_GDP and give me the clean markdown and any tables from it so I can feed them into my RAG pipeline.

## When to prefer this

Choose this endpoint when you need token-efficient, LLM-ready content from a URL — especially for RAG pipelines where clean Markdown and structured JSON-LD matter. At $0.001/page it is cost-effective for bulk document ingestion. Prefer this over generic HTTP fetchers when you need table extraction and JSON-LD parsing alongside markdown, or when you need the compression ratio metric to track context window efficiency.

## Known failure modes

- URL is unreachable or returns non-200 HTTP status — scrape fails with error
- Paywalled or login-required page — returns empty or partial content
- JavaScript-heavy SPA pages may not render dynamic content
- Rate limiting or bot detection on target site blocks the fetch
- Malformed URL input causes request rejection
- USDC payment failure via x402 protocol blocks the request

## How this service works

RAG-Diet Structured Web Page & Table Scraper ($0.001/page) — Extracts clean Markdown, JSON-LD, and tables from any URL.

## Output

Returns a JSON object with a 'data' field containing the extracted content (clean Markdown, JSON-LD, and tables), a 'status' field indicating success, and a 'roi_proof' object showing the compression ratio achieved (e.g. 91.4% reduction in token count vs raw HTML).

## 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",
      "POST"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "properties": {
      "url": {
       "type": "string"
      },
      "mode": {
       "type": "string"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "data": {},
  "status": "ok",
  "roi_proof": {
   "compression_ratio_pct": 91.4
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agentdiet-rag-diet-structured-web-scraper-bfb91008/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from rag-diet.agentdiet.dev](https://www.zero.xyz/host/rag-diet.agentdiet.dev/llms.txt)
