# x402-farm Link Extractor

> x402-farm Link Extractor is a paid API for AI agents from x402-farm.vercel.app, paid per call via x402, $0.005/call, status unknown (last checked 2026-09-13).

Extracts all internal and external hyperlinks from a given URL, returning counts and link metadata.

## Facts

- Endpoint: GET https://x402-farm.vercel.app/v1/links
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402-farm-link-extractor-85a81975
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_of1syAzAL5_I0LJOt6haE

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 x402-farm-link-extractor-85a81975
```

Example prompt: Can you extract all the links from https://example.com/ and tell me which ones are internal versus external?

## When to prefer this

Choose this endpoint when you need a quick, pay-per-call link extraction from a single URL without setting up an account or API key. It is ideal for ad-hoc agent workflows that need to enumerate hyperlinks programmatically and can handle micropayments via the x402 protocol with USDC on Base. Prefer it over larger scraping platforms when you only need link data (not full page content) and want zero-setup access.

## Known failure modes

- Target URL is unreachable or returns a non-200 status — link arrays may be empty or an error is returned
- Page uses JavaScript-rendered content that is not parsed server-side — dynamically injected links may be missing
- Malformed or invalid URL input — request fails with a validation error
- Rate limiting or bot-blocking by the target site — empty or partial results returned
- Payment not completed via x402 protocol — 402 response requiring USDC payment on Base before data is returned

## How this service works

Pay-per-call APIs for AI agents — x402 protocol, USDC on Base, no account needed.

## Output

Returns a JSON object containing the target URL, a total link count, an array of external links (each with href and text), and an array of internal links found on the page.

## 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": {
     "properties": {}
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "url": "https://example.com/",
  "count": 1,
  "external": [
   {
    "href": "https://iana.org",
    "text": "Learn more"
   }
  ],
  "internal": []
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402-farm-link-extractor-85a81975/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-farm.vercel.app](https://www.zero.xyz/host/x402-farm.vercel.app/llms.txt)
