EaserixDocs
DevelopersAPI referenceNotesCollaboration

Preview a web page for a bookmark block

Fetches the page at `url` on the server and returns its title, description, image and site name (Open Graph and Twitter tags, then `<title>` and the description meta tag). The editor stores the result in the bookmark block, so nothing is kept here and pages never fetch the link again. The fetch is an SSRF boundary: http and https only, on the default ports, with no credentials in the URL; every address the host resolves to must be public (private, loopback, link-local, multicast, CGNAT, reserved, documentation, NAT64 and 6to4 ranges are refused) and the connection goes to the checked address, for every redirect hop too; at most 3 redirects, 6 seconds, 768 KB read. Only HTML is parsed; for any other type the preview holds the URL and the host as the site name. The image is returned only as a public https URL. Limited to 30 new links a minute per person (per instance); results are cached for 10 minutes.

View as Markdown
GET
/v1/link-preview
AuthorizationBearer <token>

In: header

Query Parameters

url*string

The http(s) link to preview, at most 2048 characters

Lengthlength <= 2048

Response Body

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/v1/link-preview?url=string"
{  "preview": {    "url": "string",    "title": "string",    "description": "string",    "image": "string",    "siteName": "string"  }}