INTRODUCTION

Link previews
for the edge

Extract metadata from any URL. Zero dependencies, TypeScript native. Add rich link previews to your app in seconds.

bun add openlink

>await preview("github.com")

{

title: "GitHub"

description: "Where the world builds..."

image: "https://github.githubassets..."

favicon: "https://github.com/favicon.ico"

}

Loading...
MITTypeScript

The link preview library

[*] OpenLink is an open source library that extracts metadata from any URL. Zero dependencies, TypeScript native, and runs anywhere JavaScript runs.

Read docs

The minimal link preview library

[*] With only 5.4kb gzipped, 0 dependencies, and 30μs average parse time, OpenLink is built for performance at the edge.

others
openlink

5.4kb gzipped

0 dependencies

30μs parse time

FEATURES

[*]Zero dependenciesNo external packages, pure JavaScript
[*]TypeScript nativeFull type definitions included
[*]Edge readyWorks on Vercel Edge, Cloudflare Workers, Deno
[*]LightweightUnder 2kb gzipped, tree-shakeable
[*]AI compatiblePerfect for LLM tool calls and agents
[*]Open GraphExtracts og:title, og:description, og:image

RUNTIMES

Vercel EdgeCloudflare WorkersDeno DeployNode.jsBun

WORKS WITH

Use OpenLink as a tool for any AI model with function calling. Extract link previews in your agents, chatbots, and AI applications.

OpenAI, Anthropic, xAI, Google and more