embisto
  1. Home
  2. Docs

embisto documentation

embisto turns a URL into the data a client needs to draw a link preview: title, description, site name, author, publication date, icon, image with its size, video, and the provider's embed HTML. It is a single Go binary with no required external services, and the same code is a Go library.

Try the hosted API

The API answers at api.embisto.com, free and without a key, with 60 requests a minute per IP address. The service runs on a best-effort basis with no uptime promise: use it to try embisto, and run your own for production.

curl 'https://api.embisto.com/v1/preview?url=https://github.com'

The same call from code:

curl 'https://api.embisto.com/v1/preview?url=https%3A%2F%2Fgithub.com'

The hosted API fails with the codes of embisto and one of its own:

code Status Meaning
rate_limited 429 Too many requests from one address. The response carries Retry-After.

It does not serve DELETE /v1/preview, which purges a server's cache.

The API reference lists every route with its parameters and answers, and lets you call them from the browser. The spec itself is at https://api.embisto.com/openapi.json.

Run it yourself

Docker

docker run --rm -p 8080:8080 ghcr.io/pantafive/embisto:latest
curl 'localhost:8080/v1/preview?url=https://github.com'

The image is a static binary on a distroless base. :latest is the newest release; :0.3.0 pins one, and :main follows the main branch.

Binary

Each release has static binaries for Linux, macOS and Windows on amd64 and arm64. With Go installed:

go install github.com/pantafive/embisto/cmd/embisto@latest
embisto

Go library

go get github.com/pantafive/embisto

The server is a thin layer over the library: everything the server does, the library does. The Go library shows the API and how to add a site provider or an output format. The source is at github.com/pantafive/embisto.

A server is configured through environment variables, listed in configuration; nothing else needs to run beside it.

Reference

Planned

Not built yet, in rough order: providers for more of the most-shared sites; several URLs in one request; an outgoing proxy for sites that refuse data-center addresses; an optional headless browser for pages that need JavaScript; card components for Swift and Kotlin.