---
title: Generate Link Preview API
slug: generate-link-preview
url: https://apyverse.com/apyhub/service/generate-link-preview
provider: ApyHub
categories: [Data Extraction, "Security & Privacy", SEO]
tags: [link-preview, open-graph, metadata-extraction, url-preview, malicious-url-check]
auth: api_key
---

# Generate Link Preview API

Fetch URL metadata for rich previews, including title, images, videos, favicons, and description. Secure mode can flag malicious links before fetching.

## Endpoints

| Method | Path | Description | Atoms |
| --- | --- | --- | --- |
| POST | `extract/url/preview` | What it does Generates preview metadata for a URL. The request body supplies the URL and optional f… | 50 |

## About

## What it does
Link Preview Generator fetches a URL and returns the metadata you need to build link cards, unfurls, and rich previews. Send a URL, optionally add a custom user agent, Accept-Language header, redirect behavior, image meta-tag preference, and secure mode, and get structured preview data back.

The normal response includes the canonical URL, title, images, videos, favicons, siteName, mediaType, contentType, and description. When secure mode is enabled, the response can also include reported_malicious so you can block or flag suspicious links before you fetch or display them.

Use Link Preview Generator when you need to show social-style previews in a chat app, CMS, newsletter editor, or bookmarking product. It is also useful for link safety checks, where you want to screen a URL before rendering open-graph data to users.

If the URL is flagged, the response returns the threat and reported_malicious fields instead of preview metadata. That makes it straightforward to separate safe preview rendering from basic malicious-link detection.

## Usage

Authenticate with an ApyHub API key in the `apy-token` header.
Full docs and a live playground: https://apyverse.com/apyhub/service/generate-link-preview
