PERFORMANCE

Benchmarks

Performance comparisons against popular link preview libraries. All data sourced from npm and bundlephobia.

Bundle sizes: Approximate gzipped size from bundlephobia

Parse time: HTML parsing only, excludes network latency

Edge support: Cloudflare Workers, Vercel Edge, Deno Deploy

BUNDLE SIZE (GZIPPED)

openlink
~2kb
unfurl.js
~25kb
link-preview-js
~30kb
open-graph-scraper
~45kb
metascraper
~80kb

DEPENDENCIES

openlink
0
unfurl.js
5
link-preview-js
3
open-graph-scraper
4
metascraper
4

PARSE TIME (MS)

Average time to parse HTML and extract metadata. Lower is better.

openlink
~1ms
unfurl.js
~15ms
link-preview-js
~20ms
open-graph-scraper
~25ms
metascraper
~35ms

EDGE RUNTIME

Edge runtime support requires no Node.js-specific APIs like fs, path, or http. Libraries using Cheerio or similar DOM parsers typically don't work on edge runtimes.

openlink

unfurl.js

link-preview-js

open-graph-scraper

metascraper

COMPARISON

Library details

LibraryVersionNotes
openlink0.1.0Zero dependencies, pure JS
unfurl.js6.4.0oEmbed, Twitter Cards, Open Graph
link-preview-js4.0.0Cross-fetch dependency
open-graph-scraper6.10.0Uses Cheerio for parsing
metascraper5.49.0Modular, requires plugins

METHODOLOGY

How we benchmark

Bundle sizes are approximate gzipped sizes from bundlephobia.com. Actual sizes may vary based on tree-shaking and bundler configuration.

Parse time measures only HTML parsing and metadata extraction, excluding network request time. Each library parses the same pre-fetched HTML content.

Edge runtime compatibility is determined by checking for Node.js-specific API usage. Libraries relying on Cheerio, jsdom, or similar DOM implementations typically don't work on edge runtimes.

All data is sourced from npm and the respective package documentation. Run your own benchmarks for production decisions.

$ git clone github.com/visible/openlink

$ cd openlink

$ bun run bench