# Link Preview API

> Link Preview API is a paid API for AI agents from link-preview-api-z4nf.onrender.com, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-14).

Fetches Open Graph and meta tag metadata (title, description, image, favicon, canonical URL) for any public URL.

## Facts

- Endpoint: GET https://link-preview-api-z4nf.onrender.com/preview
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/link-preview-api-e83f5de7
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_heDMY4RGL4Lb3AvPvHAgD

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-preview-api-e83f5de7
```

Example prompt: Can you fetch the Open Graph title, description, preview image, and favicon for https://openai.com/blog/chatgpt?

## When to prefer this

Use this endpoint when you need to enrich a URL with its Open Graph and meta tag data for rendering link previews, building content cards, validating links, or populating structured records. Prefer this over a full scraping service when you only need preview-level metadata (title, description, image, favicon) and not the full page content.

## Known failure modes

- URL is not publicly accessible (private, behind auth, or firewall) — returns error or empty fields
- Page has no Open Graph or meta tags — most fields will be null or empty
- URL redirects to an error page — final_url reflects redirect but metadata may be sparse
- Malformed or non-HTTP URL input — validation error
- Slow or unresponsive target server — timeout or incomplete response

## How this service works

Fetch Open Graph / meta metadata (title, description, image, favicon, canonical URL) for a public URL.

## Output

A JSON object containing the resolved page's title, description, OG image URL, favicon URL, canonical URL, final redirected URL, site name, and content type — all extracted from the page's Open Graph and meta tags.

## 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",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "url"
     ],
     "properties": {
      "url": {
       "type": "string",
       "format": "uri",
       "description": "Public http(s) URL to fetch Open Graph / meta metadata for."
      }
     }
    }
   },
   "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/blog/hello-world",
  "image": "https://example.com/og-image.png",
  "title": "Hello World",
  "favicon": "https://example.com/favicon.ico",
  "final_url": "https://example.com/blog/hello-world",
  "site_name": "Example",
  "description": "A short description of the page, from its meta tags.",
  "content_type": "text/html; charset=utf-8",
  "canonical_url": "https://example.com/blog/hello-world"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/link-preview-api-e83f5de7/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from link-preview-api-z4nf.onrender.com](https://www.zero.xyz/host/link-preview-api-z4nf.onrender.com/llms.txt)
