SFOLN

Demos / URL Metadata & Open Graph Extractor

Unfurl pasted links into preview cards in your product

Slipway is a small team chat and notes product. Users paste links all day, and a bare URL says nothing about what is behind it. Fetching the page from the user's browser is not possible (cross-origin rules) and fetching it from the product's own servers means maintaining an HTML parser and guarding against requests to internal addresses. Here the backend hands every pasted URL to the API and renders the answer as a preview card. The same record files the link in a shared bookmark list, keyed by its canonical URL so tracking parameters and short links do not create duplicates.

Workflow

Where the API sits

  1. Trigger

    Message with links saved

    A user sends a message. The backend finds the URLs in it and skips those already in the preview cache.

  2. API call

    Fetch page metadata

    One call with the new URLs. Each comes back with title, description, Open Graph tags, favicon, canonical and final URL; missing pages are reported and not charged.

    sfoln/url-metadata

  3. Your logic

    Build the card

    Prefer ogTitle, ogDescription and ogSiteName, fall back to title, description and the host name; use the compact layout when ogImage is null.

  4. Result

    Preview card and bookmark

    The card is attached to the message and the link is filed in the channel's bookmark list under its canonical URL.

Wired as a background job: when a message is saved, the backend extracts its URLs, calls the API synchronously with all of them and stores one preview per URL, cached by canonical URL. The message appears at once and the cards are added a moment later. An import of an old workspace sends thousands of URLs in one asynchronous run.

Result

Pasted links become preview cards

With previews

Slipway#productThu 12 Nov
  1. Mirela Oduya10:41

    Worth a read before Thursday's pricing review: https://northlight-press.example/journal/pricing-page-teardown

    Northlight Press

    A teardown of 40 SaaS pricing pages

    Cover image loaded from northlight-press.exampleWhat 40 small software companies put on their pricing page, counted.

    northlight-press.example/journal/pricing-page-teardown

  2. Mirela Oduya10:41

    And the webhook reference Tomas asked for: https://docs.tidewater-pay.example/api/webhooks

    docs.tidewater-pay.example

    Webhooks: Tidewater Pay API reference

    No share image: compact cardReceive payment, refund and dispute events on your own endpoint. Signature verification, retries and the full event list.

    docs.tidewater-pay.example/api/webhooks

  3. Tomas Lindqvist10:44

    Should we send someone to this? https://lnk.quay.example/r/8fk2

    Quayside Meetupsshort link resolved

    Spring Product Day 2027

    Cover image loaded from quayside-meetups.exampleOne day of talks for product teams, 18 March 2027.

    quayside-meetups.example/2027/spring-product-day

  4. Anouk Verhage10:52

    Team bike for the office, from their newsletter: https://fernhill-cycles.example/p/gravel-one?utm_source=newsletter&utm_campaign=nov

    Fernhill Cycles

    Gravel One

    Cover image loaded from fernhill-cycles.exampleSteel gravel bike, built to order in five sizes.

    fernhill-cycles.example/p/gravel-one

  5. Tomas Lindqvist10:58

    Old roadmap for reference: https://wiki.brackenfield-studio.example/roadmap-2024

    Link not found (404)No preview. The sender sees a hint to check the address.
Message #productPaste a link: it unfurls after you send
Four links unfurled; the dead link was reported as not found and cost nothing.

Before

Slipway#productThu 12 Nov
  1. Mirela Oduya10:41

    Worth a read before Thursday's pricing review: https://northlight-press.example/journal/pricing-page-teardown

  2. Mirela Oduya10:41

    And the webhook reference Tomas asked for: https://docs.tidewater-pay.example/api/webhooks

  3. Tomas Lindqvist10:44

    Should we send someone to this? https://lnk.quay.example/r/8fk2

  4. Anouk Verhage10:52

    Team bike for the office, from their newsletter: https://fernhill-cycles.example/p/gravel-one?utm_source=newsletter&utm_campaign=nov

  5. Tomas Lindqvist10:58

    Old roadmap for reference: https://wiki.brackenfield-studio.example/roadmap-2024

Message #productPaste a link: it unfurls after you send

Five bare URLs. Nobody can tell the article from the shop page without opening each one, and the short link hides its destination.

SlipwayBookmarks · #product4 saved
Links shared in #product this week · deduplicated by canonical URL
SiteTitleCanonical URLTypeShared by
Northlight PressA teardown of 40 SaaS pricing pagesnorthlight-press.example/journal/pricing-page-teardownArticleby Ines HalvardMirela Oduya
docs.tidewater-pay.exampleWebhooks: Tidewater Pay API referencedocs.tidewater-pay.example/api/webhooksDocsMirela Oduya
Quayside MeetupsSpring Product Day 2027quayside-meetups.example/2027/spring-product-dayEventTomas Lindqvist
Fernhill CyclesGravel Onefernhill-cycles.example/p/gravel-oneProductAnouk Verhage2 shares merged
wiki.brackenfield-studio.exampleNot saved: page not found—404Tomas Lindqvist

The Fernhill Cycles link was shared twice this week, once with newsletter tracking parameters and once without. Both resolve to one canonical URL, so the list holds it once.

Export listOpen all

Highlighted values are read from the API response. The data is a sample in the API's real output shape; names and figures are illustrative.

Call

The call behind it

One request with this input produces the 5 records the screen above is drawn from. Prices are the ones on the API page; records that fail or come back empty are not charged.

Input · POST /v2/actors/sfoln~url-metadata/run-sync-get-dataset-items
{
  "urls": [
    "https://northlight-press.example/journal/pricing-page-teardown",
    "https://docs.tidewater-pay.example/api/webhooks",
    "https://lnk.quay.example/r/8fk2",
    "https://fernhill-cycles.example/p/gravel-one?utm_source=newsletter&utm_campaign=nov",
    "https://wiki.brackenfield-studio.example/roadmap-2024"
  ],
  "timeoutSecs": 10
}
First record of 5
Response · record 1 of 5 · sample data
{
  "input": "https://northlight-press.example/journal/pricing-page-teardown",
  "url": "https://northlight-press.example/journal/pricing-page-teardown",
  "finalUrl": "https://northlight-press.example/journal/pricing-page-teardown",
  "redirected": false,
  "statusCode": 200,
  "contentType": "text/html; charset=utf-8",
  "title": "A teardown of 40 SaaS pricing pages | Northlight Press",
  "description": "We read 40 pricing pages from small software companies and counted what they show: plans, annual discounts, usage limits and where the free tier hides.",
  "canonical": "https://northlight-press.example/journal/pricing-page-teardown",
  "language": "en",
  "favicon": "https://northlight-press.example/favicon.svg",
  "ogTitle": "A teardown of 40 SaaS pricing pages",
  "ogDescription": "What 40 small software companies put on their pricing page, counted.",
  "ogImage": "https://northlight-press.example/media/pricing-teardown-cover.png",
  "ogType": "article",
  "ogSiteName": "Northlight Press",
  "twitterCard": "summary_large_image",
  "twitterSite": null,
  "jsonLdTypes": [
    "Article",
    "BreadcrumbList"
  ],
  "publishedTime": "2026-10-28T08:00:00+00:00",
  "modifiedTime": "2026-11-02T14:12:00+00:00",
  "author": "Ines Halvard",
  "robots": "index, follow",
  "generator": null,
  "h1": "A teardown of 40 SaaS pricing pages",
  "h1Count": 1,
  "wordCount": 2384,
  "linksInternal": 41,
  "linksExternal": 46,
  "feeds": [
    {
      "url": "https://northlight-press.example/journal/feed.xml",
      "type": "application/rss+xml",
      "title": "Northlight Press journal"
    }
  ],
  "pageBytes": 148220,
  "truncated": false,
  "responseTimeMs": 284,
  "status": "ok",
  "charged": true,
  "chargedEvent": "url-metadata",
  "source": "selfhosted",
  "fetchedAt": "2026-11-12T09:41:07.000Z"
}
Charged eventCountPriceTotal
URL metadata record
url-metadata
4$0.001$0.004
This run$0.004

Fields

Which output fields do the work

Output fieldUsed for
ogTitle titleCard headline: the Open Graph title when the page has one, otherwise the HTML title.
ogDescription descriptionCard text, with the same fallback.
ogSiteName faviconSite line of the card and the small icon next to it; the host name stands in when no site name is set.
ogImage twitterCardLarge card with the cover image when present, compact card when ogImage is null.
canonical finalUrl redirectedCache and bookmark key: short links and tracking parameters collapse to one entry, and the card shows where a short link leads.
ogType jsonLdTypes author publishedTimeType label in the bookmark list (article, product, event) and the byline for articles.
status statusCode errorA not_found link gets a hint instead of a card and is not saved as a bookmark.

All output fields are listed on the API page.

Build

Build it

The job that runs after a message is saved: fetch metadata for the URLs that are not cached yet and store one preview per URL.

Node.js · background job
const res = await fetch('https://api.apify.com/v2/actors/sfoln~url-metadata/run-sync-get-dataset-items', {
  method: 'POST',
  headers: { Authorization: `Bearer ${process.env.APIFY_TOKEN}`, 'Content-Type': 'application/json' },
  body: JSON.stringify({ urls: newUrls, timeoutSecs: 10 }),
});

for (const page of await res.json()) {
  if (page.status !== 'ok') { await previews.markUnavailable(page.input, page.status); continue; }
  await previews.save(page.input, {
    key: page.canonical ?? page.finalUrl,
    title: page.ogTitle ?? page.title,
    text: page.ogDescription ?? page.description,
    site: page.ogSiteName ?? new URL(page.finalUrl).hostname,
    icon: page.favicon,
    image: page.ogImage, // proxy and resize it yourself before showing it to users
  });
}
  • Pages are fetched without running JavaScript, so tags that a single-page app injects in the browser are not seen.
  • Private and loopback addresses are never fetched, also not through redirects, so a pasted internal URL cannot be used to probe your network.
  • Cache previews by canonical URL and refresh them on a schedule; a link shared a hundred times is fetched once.

Authentication, the MCP endpoint and the asynchronous variant are on the API page.

More

Other things teams build with it

  • Bookmark and read-later apps that title and group saved links
  • CMS editors that turn a pasted URL into an embed block
  • Newsletter tools that build a link digest with titles and descriptions
  • CRM enrichment: company site title, description and language from the domain

Related demos

All demos · URL Metadata & Open Graph Extractor: prices, input and output · /actors/url-metadata.json carries this demo as demo