# Link Extractor — Anchor Href Scraper

> Link Extractor — Anchor Href Scraper is a paid API for AI agents from x402-deployer.x402-deployer.workers.dev, paid per call via x402, $0.005/call, status unknown (last checked 2026-09-15).

Fetches an HTML page and returns every anchor link with its text, rel attribute, and whether it is external, up to a 500-link cap

## Facts

- Endpoint: POST https://x402-deployer.x402-deployer.workers.dev/link-extract
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/link-extractor-anchor-href-scraper-43ba6253
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_mqiVZyPXyzSNUpZD-Ar8J

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 link-extractor-anchor-href-scraper-43ba6253 -d '<json body>'
```

Example prompt: Can you fetch https://en.wikipedia.org/wiki/Web_scraping and give me every anchor link on the page, including the anchor text and whether each link is external?

## When to prefer this

Choose this endpoint when you need a lightweight, fast list of all anchor links from a single page without full scraping or metadata extraction. Ideal for crawl-decision pipelines, outbound link audits, sitemap discovery, and any agent task that needs to enumerate which URLs on a page are worth following next. Prefer over full-page scrapers when you only need hrefs and anchor text, not page content or structured data.

## Known failure modes

- Target URL is a loopback or RFC1918 address — SSRF guard blocks the request
- Target URL returns non-HTML content — no links extracted
- Target page has more than 500 links — only first 500 returned
- Target URL is unreachable or returns a non-2xx status — fetch error returned
- Malformed or missing URL parameter — 4xx validation error

## How this service works

Link extractor / extract links from URL / list all anchor links / page outlink crawler / scrape outbound links / get hrefs from page. Fetches an HTML URL and returns every <a> link with its anchor text, rel attribute, and an is_external flag. Resolves relative URLs against the page's <base> or final URL. Lighter than full scrape / metadata endpoints — exact tool for the agent task 'walk this page, pick which links to follow.' Default 500-link cap. SSRF-guarded (no loopback / RFC1918 targets).

## Output

A JSON array of link objects, each containing the resolved absolute href, anchor text, rel attribute value, and a boolean is_external flag indicating whether the link points outside the page's origin. The response is capped at 500 links by default.

## 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",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "required": [
      "url"
     ],
     "properties": {
      "url": {
       "type": "string",
       "description": "Page URL to fetch and extract from. http or https only. Private/loopback targets are rejected. Redirects followed."
      },
      "max_links": {
       "type": "number",
       "description": "Max links to return (1-2000). Default 500. Pagination beyond max isn't supported; tighten the URL instead."
      },
      "timeout_ms": {
       "type": "number",
       "description": "Fetch timeout. Default 12000, max 25000."
      },
      "include_text": {
       "type": "boolean",
       "description": "If true (default), include the anchor's visible text. Set false to skip text extraction."
      },
      "include_external_only": {
       "type": "boolean",
       "description": "If true, drop same-host links. Default false (return all)."
      }
     }
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "url": {
       "type": "string"
      },
      "count": {
       "type": "integer"
      },
      "links": {
       "type": "array",
       "items": {
        "type": "object",
        "properties": {
         "rel": {
          "type": "string"
         },
         "href": {
          "type": "string"
         },
         "text": {
          "type": "string"
         },
         "is_external": {
          "type": "boolean"
         }
        }
       }
      },
      "source": {
       "type": "string"
      },
      "base_url": {
       "type": "string"
      },
      "final_url": {
       "type": "string"
      },
      "page_title": {
       "type": "string"
      },
      "attribution": {
       "type": "string"
      },
      "total_found": {
       "type": "integer"
      },
      "truncated_at_max": {
       "type":
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/link-extractor-anchor-href-scraper-43ba6253/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-deployer.x402-deployer.workers.dev](https://www.zero.xyz/host/x402-deployer.x402-deployer.workers.dev/llms.txt)
