تخطَّ إلى المحتوى

link-preview

هذا المحتوى غير متوفر بلغتك بعد.

URL metadata extraction: Open Graph, Twitter Card, and oEmbed with caching. Free: MIT licensed.

Terminal window
nself plugin install link-preview

Extracts rich metadata from URLs for link preview cards. Fetches Open Graph tags, Twitter Card metadata, and oEmbed data. Results are cached in Postgres to avoid repeated fetches. Use it to power link preview features in chat, CMS, or social feed applications.

Env VarDefaultDescription
LINK_PREVIEW_PORT3718Link preview service port
LINK_PREVIEW_CACHE_TTL3600Cache TTL in seconds (1 hour)
LINK_PREVIEW_TIMEOUT10sHTTP fetch timeout
LINK_PREVIEW_MAX_SIZE5MBMax page size to fetch
PortPurpose
3718Link preview REST API

1 table added to your Postgres database:

  • np_link_preview_cache: cached URL metadata (title, description, image, favicon)
RouteTarget
/link-preview/Link preview API
GET /health: Health check
GET /preview?url={url}: Fetch or return cached preview
DELETE /preview?url={url}: Invalidate cache for URL
GET /preview/batch: Batch preview multiple URLs