/unfurl • v1.0.0

Rich Link Unfurl, Metadata Previewer & Social Card API

Extract OpenGraph, Twitter/X Cards, JSON-LD, oEmbed, icons, and full redirect chains with zero-trust SSRF protection, paired with sub-2ms XSS-escaped 1200x630 vector SVG social cards and optional SSRF-intercepted headless Chromium screenshots.

<2ms Vector SVG Social CardsSub-Request SSRF InterceptionZero Cache Poisoning

Core REST Endpoints

Base path: https://api.contextapi.dev/unfurl (or /api/unfurl via local portal proxy).

Tenant-Isolated Cache
Method Path Cost Capabilities
POST/GET /v1/unfurl 1 credit Parses og:*, twitter:*, Schema.org JSON-LD, oEmbed, RSS/Atom, icons, reading stats & redirect hops.
POST /v1/unfurl/batch Pay-Per-Success Concurrent unfurling of up to 50 URLs; upstream 502 failures cost 0 credits (1-credit floor).
POST/GET /v1/screenshot 1 credit (SVG) / 3 credits (Chromium) Dual-mode 1200x630 XSS-escaped vector SVG social card or Playwright Chromium PNG capture.
GET /v1/cache 1 credit Lists tenant-isolated link preview history scoped strictly to your API key.

Quickstart & Hosted MCP Integration

Run over REST or register https://api.contextapi.dev/unfurl/mcp in Cursor, VS Code, or Claude Desktop.

Quickstart — Unfurl + Social Card SVG

curl -X POST "https://api.contextapi.dev/unfurl/v1/unfurl" \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://example.com",
    "use_cache": true,
    "include_social_card_svg": true
  }'
→ {"title": "Example Domain", "redirect_chain": ["https://example.com"], "social_card_svg": "<svg ...>"}

Hosted Streamable HTTP MCP (3 Tools + Resource)

Register in .cursor/mcp.json (or use npx -y mcp-remote for Claude Desktop):

{
  "mcpServers": {
    "contextapi-unfurl": {
      "url": "https://api.contextapi.dev/unfurl/mcp",
      "headers": { "X-API-Key": "${CONTEXTAPI_API_KEY}" }
    }
  }
}
  • context_unfurl_urlTool

    Extracts clean OpenGraph, Twitter Card, favicon, and canonical metadata from any URL for rich link previews.

  • context_batch_unfurlTool

    Unfurls multiple URLs concurrently in one request to speed up feed, chat, and citation enrichment.

  • context_capture_social_cardTool

    Captures or validates social preview cards so teams can verify how links render before publishing.

  • contextunfurl://cache/statusResource

    Exposes live cache hit stats and service readiness for agent health and performance checks.