Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

openlink

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

openlink

Edge-first link preview. Zero dependencies.

latest
Source
npmnpm
Version
0.3.0
Version published
Weekly downloads
850
-0.23%
Maintainers
1
Weekly downloads
 
Created
Source

Edge-first link preview. Zero dependencies, ~6kb gzipped.

npm install openlink
import { preview } from 'openlink'

const data = await preview('https://github.com')

Returns { url, title, description, image, favicon, siteName, domain, type, contentType, lang, ... }

oEmbed

const data = await preview('https://youtube.com/watch?v=...', {
  includeOembed: true
})

console.log(data.oembed) // { provider, title, html, thumbnail, ... }

Supports YouTube, Vimeo, Twitter/X, Spotify, TikTok, Instagram, CodePen, CodeSandbox, Figma.

JSON-LD

const data = await preview('https://bbc.com/news', {
  includeJsonLd: true
})

console.log(data.jsonLd) // { types, article, product, organization, ... }

Retry

const data = await preview('https://example.com', {
  retry: 3,
  retryDelay: 1000
})

Cache

import { createCache, memoryCache, withCache, preview } from 'openlink'

const cache = createCache(memoryCache())
const cachedPreview = withCache(cache, preview)

const data = await cachedPreview('https://github.com')

Image Size

import { getImageSize } from 'openlink'

const size = await getImageSize('https://example.com/image.png')
console.log(size) // { width: 1200, height: 630, type: 'png' }

Works on Cloudflare Workers, Vercel Edge, Deno, Bun, and Node 18+.

Docs · API · TypeScript

MIT

Keywords

link

FAQs

Package last updated on 21 Jan 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts