---
title: Generate Link Preview API
slug: generate-link-preview
url: https://apyhub.com/apyhub/service/generate-link-preview
provider: ApyHub
tags: [link-preview, open-graph, metadata-extraction, web-scraping, url-safety]
auth: api_key
---

# Generate Link Preview API

What it does Link Preview fetches a URL and returns the metadata you need to build a rich preview card. Send a URL, and Link Preview returns the page title, description, images, videos, favicons, site name, media type, and content type when available. Use it when you need to render previews for sha…

## Endpoints

| Method | Path | Description | Atoms |
| --- | --- | --- | --- |
| POST | `/extract/url/preview` | What it does Generates a preview for a URL by fetching the page metadata and returning it in a JSON… | 50 |

## About

## What it does
Link Preview fetches a URL and returns the metadata you need to build a rich preview card. Send a URL, and Link Preview returns the page title, description, images, videos, favicons, site name, media type, and content type when available.

Use it when you need to render previews for shared links, build bookmark collections, or show a summary before a user opens a page. If the URL is missing a protocol, Link Preview prepends `http://` automatically. You can also set a custom `user_agent`, `accept_language`, and `allow_redirects` to match your crawler or app behavior.

For security-sensitive workflows, `secure_mode` checks the URL against a malicious-URL database before fetching. When that flag is enabled, the response includes `reported_malicious` for clean URLs, and malicious URLs return the detected threat instead of preview metadata. You can also choose whether image metadata should come from `og` or `twitter` tags with `images_property_type`.

tags: link-preview, open-graph, metadata-extraction, web-scraping, url-safety

## Usage

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