# Link Preview Cache API

> Link Preview Cache API is a paid API for AI agents from link-preview-cache-api.onrender.com, paid per call via x402, $0.003/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, served from a shared cache for cost efficiency.

## Facts

- Endpoint: GET https://link-preview-cache-api.onrender.com/preview
- Price: $0.003/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-cache-api-bd093387
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_4-6uumE541JBB2X-G7n5r

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-cache-api-bd093387
```

Example prompt: Can you grab the Open Graph preview metadata — title, description, image, and favicon — for https://openai.com/blog/chatgpt? I want to build a link card and I need to know if it's served from cache.

## When to prefer this

Choose this endpoint when you need fast, cheap Open Graph / meta tag extraction for public URLs and can tolerate cached results. It is ideal for link preview cards, content enrichment pipelines, and social sharing previews where fresh-every-time fetching is unnecessary. Prefer alternatives if you need guaranteed real-time freshness on every call or if the target URL requires authentication.

## Known failure modes

- URL is not publicly accessible (private or behind auth) — returns error or empty fields
- URL returns non-HTML content type with no meta tags — limited or empty metadata
- URL redirects to a login wall — metadata reflects the login page, not the target
- Malformed or non-URI input — request validation error
- Cache miss on first fetch may result in slightly slower response

## How this service works

Fetch Open Graph / meta metadata (title, description, image, favicon, canonical URL) for a public URL - served from a shared cache when available, which is what keeps the price below a fresh-fetch-every-time service. Response includes a 'cached' field.

## Output

A JSON object containing the page title, description, Open Graph image URL, favicon URL, canonical URL, final redirected URL, site name, content type, and a boolean 'cached' field indicating whether the result was served from the shared cache.

## 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",
  "cached": true,
  "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-cache-api-bd093387/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from link-preview-cache-api.onrender.com](https://www.zero.xyz/host/link-preview-cache-api.onrender.com/llms.txt)
