Metadata
One response shape. Missing values stay explicit.
Response type#
ts
export interface Metadata {
url: string;
title: string | null;
description: string | null;
image: string | null;
logo: string | null;
publisher: string | null;
author: string | null;
date: string | null;
lang: string | null;
source: "fast" | "fallback";
}Field behaviour#
| Field | Description |
|---|---|
| url | Normalised page URL. |
| title | Cleaned title, capped at 200 characters on the fast path. |
| description | Cleaned description, capped at 500 characters on the fast path. |
| image / logo | HTTP(S) image URLs. Relative URLs are resolved against the page URL. |
| publisher / author | Publisher and author names when available. |
| date | Normalised publication date when available. |
| lang | Language identifier. Fast-path regional tags are reduced to the primary language. |
| source | fast or fallback. |
Handle missing fields#
ts
const title = page.title ?? new URL(page.url).hostname
const image = page.image ?? '/default-preview.png'Treat all extracted text as untrusted. Render it as text, not HTML. Returned image URLs also need your network policy if your server fetches them.
Extraction sources#
Linkoi reads Open Graph, Twitter Cards, JSON-LD, and HTML tags. New results always report source as fast. The fallback value remains in the type only for compatibility with older stored data.