# LinkSweep Broken-Link Scan API

> LinkSweep Broken-Link Scan API is a paid API for AI agents from x402-extract-service.onrender.com, paid per call via x402, $0.02/call, status unknown (last checked 2026-09-19).

Scans a public webpage for broken links (and optionally image/script sources), returning a structured report of all dead URLs with HTTP status codes and anchor text.

## Facts

- Endpoint: POST https://x402-extract-service.onrender.com/linksweep
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-19
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/linksweep-broken-link-scan-api-051a3669
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_SAPnIhWMtzCJ68SObmoho

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 linksweep-broken-link-scan-api-051a3669 -d '<json body>'
```

Example prompt: Can you scan https://mycompany.com/resources for broken links — check up to 300 links including images and scripts, and give me the results as a CSV so I can share it with the team?

## When to prefer this

Choose this endpoint when you need a fast, on-demand broken-link report for a specific public webpage, especially when you want HTTP status details, anchor text, and optional image/script source checking in a single call. Prefer it over full-site crawlers when you only need to audit one URL at a time without setting up a persistent monitoring job.

## Known failure modes

- URL is not publicly accessible or requires authentication — scan returns error or empty results
- Page has more than 500 links — hard cap enforced, excess links silently skipped
- Target page returns non-HTML content — links cannot be extracted
- External links time out during checking — may be reported as errors rather than 404s
- Payment in USDC via x402 fails — request is rejected before scan begins

## How this service works

URL-to-clean-markdown extraction API, on-demand broken-link scan API, pre-deploy link audit API, DNS health audit API, llms.txt / AI-crawler audit API, spec-linted llms.txt audit API, email-deliverability (SPF/DKIM/DMARC) audit API, PDF-to-markdown conversion API, technology-stack fingerprinting API, security-headers audit API, and PDF metadata-intel API for coding agents. Paid per call in USDC via x402 on Base.

## Output

Returns a JSON object containing: a list of broken links (each with URL, link kind, error description, HTTP status, and anchor text), a list of redirected links, summary counts (ok/broken/redirected), total links checked, page links found, scan timestamp, and duration in milliseconds. If format=csv is requested, a broken-links CSV is included alongside the JSON.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "url": {
   "type": "string",
   "format": "uri",
   "description": "Public http(s) page URL to scan for broken links."
  },
  "format": {
   "enum": [
    "json",
    "csv"
   ],
   "type": "string",
   "description": "csv adds a broken-links CSV alongside the JSON report."
  },
  "maxLinks": {
   "type": "number",
   "description": "Maximum links to check (default 200, hard cap 500)."
  },
  "includeImages": {
   "type": "boolean",
   "description": "Also check image/script sources (default true)."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ok": true,
  "url": "https://example.com",
  "broken": [
   {
    "url": "https://example.com/old-page",
    "kind": "a",
    "error": "HTTP 404",
    "status": 404,
    "linkText": "Old page"
   }
  ],
  "counts": {
   "ok": 40,
   "broken": 1,
   "redirected": 1
  },
  "redirects": [],
  "scannedAt": "2026-09-10T00:00:00.000Z",
  "durationMs": 2314,
  "linksChecked": 42,
  "pageLinksFound": 42,
  "pricePaidAtomic": "20000"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/linksweep-broken-link-scan-api-051a3669/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-extract-service.onrender.com](https://www.zero.xyz/host/x402-extract-service.onrender.com/llms.txt)
