# AgentUtility Link Extractor

> AgentUtility Link Extractor is a paid API for AI agents from x402.agentutility.ai, paid per call via x402, $0.005/call, status unknown (last checked 2026-11-01).

Fetches a web page by URL and extracts all hyperlinks with their anchor text, href, and external/internal classification

## Facts

- Endpoint: POST https://x402.agentutility.ai/link-extract?utm_source=zero.xyz
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-01
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agentutility-link-extractor-0812595d
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_RPDu-C-RriWhNKPE4G3fl

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 agentutility-link-extractor-0812595d -d '<json body>'
```

Example prompt: Can you grab all the hyperlinks from https://en.wikipedia.org/wiki/Artificial_intelligence and return them with their anchor text, up to 300 links, only showing external ones?

## When to prefer this

Use this endpoint when you need a lightweight, pay-per-call link extraction without setting up a scraping infrastructure or managing API keys. It is ideal when you need anchor text alongside hrefs (not just raw href extraction), when you want automatic external/internal classification, or when you need redirect-following and final URL resolution. Prefer this over a full browser-rendered scraper when the target page delivers links in static HTML.

## Known failure modes

- Private/loopback IP targets rejected with error (e.g. 192.168.x.x, localhost)
- Non-HTTP/HTTPS URLs rejected
- Timeout exceeded (default 12s, max 25s) if the target page is slow to respond
- Page returns no links (empty links array, count=0)
- Redirect loop or fetch error from target server
- max_links out of range (must be 1–2000) causes validation error

## How this service works

817 pay-per-call APIs for AI agents. Every endpoint is POST /<name> and is payable in USDC over x402 on Base and Solana — no signup, no API key, just pay-per-call. GET https://x402.agentutility.ai/ returns the same catalog as machine-readable JSON.

## Output

A JSON object containing the final URL (after redirects), the page title, the source method used to fetch the page, an array of link objects each with href, visible anchor text, rel attribute, and an is_external boolean, plus total_found count, the returned count, and a truncated_at_max flag indicating whether the result was capped at the max_links limit.

## 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)
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "url": "https://example.com",
  "count": 1,
  "links": [
   {
    "rel": "",
    "href": "https://www.iana.org/domains/example",
    "text": "More information...",
    "is_external": true
   }
  ],
  "source": "Direct HTML fetch + parse",
  "base_url": "https://example.com/",
  "final_url": "https://example.com/",
  "page_title": "Example Domain",
  "attribution": "Extracted from the source HTML at the requested URL.",
  "total_found": 1,
  "truncated_at_max": false
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agentutility-link-extractor-0812595d/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402.agentutility.ai](https://www.zero.xyz/host/x402.agentutility.ai/llms.txt)
