Runtime-agnostic engine behind og-preview: fetches a URL once per social platform user-agent and reports what each one saw.
No dependencies, no I/O. Network access arrives by injection, so the same engine
runs anywhere — pair it with @linkforty/og-node on a server.
import { inspect } from '@linkforty/og-core';
import { createNodeFetcher } from '@linkforty/og-node';
const result = await inspect('https://example.com/page', {
fetcher: createNodeFetcher(),
});
result.agreement; // { identical, differingFields }
result.platforms; // per-platform outcome, tags and redirect chainEach platform result is ok, blocked or error. blocked means a bot filter
refused that user-agent (401/403/429) — it is excluded from the agreement
calculation, because a WAF refusing an unknown crawler says nothing about the
page's metadata.
Metadata comes from arbitrary third-party pages. Treat every string as untrusted text: escape on output, never inject as HTML.
MIT