# Generate link preview

Fetches and returns metadata for a given URL to create a rich preview card. Extracts title, description, image, author, and other OpenGraph/Twitter Card metadata. Results are cached for performance. Returns error if URL is unreachable or has no metadata. The URL must be properly formatted and accessible.

Endpoint: GET /api/v1/links
Version: 1.0
Security: 

## Query parameters:

  - `url` (string, required)
    The fully qualified URL to fetch metadata from

## Response 200 fields (application/json):

  - `url` (string,null, required)
    URL being referenced

  - `title` (string,null, required)
    Title of the linked resource

  - `description` (string,null, required)
    Description of the linked resource

  - `icon` (string,null, required)
    Favicon URL

  - `image` (string,null, required)
    Preview image URL

  - `imageAlt` (string,null, required)
    Alt text for the preview image

  - `publisher` (object,null, required)
    Information about the website/provider

  - `publisher.name` (string,null, required)

  - `publisher.url` (string,null, required)

  - `publisher.logo` (string,null)

  - `publisher.type` (string,null)

  - `oembedHtml` (string,null)
    HTML snippet to embed the link (from oEmbed), e.g., an iframe

  - `createdAt` (string, required)
    When the card data was fetched/created
    Example: "2022-03-10T16:15:50Z"

  - `expiresAt` (string,null, required)
    When the card data should be considered stale
    Example: "2022-03-10T16:15:50Z"

## Response 404 fields (application/json):

  - `errorCode` (string, required)
    Error code

  - `message` (string, required)
    Error message

  - `docUrl` (string)
    Link to documentation


