Public APIs
Generate Link Preview (including checking for malicious links) favicon

Generate Link Preview (including checking for malicious links)

Open Data

Fetches metadata from any URL passed to it, including Open Graph tags.

Generate Link Preview (including checking for malicious links)'s website screenshot

About Generate Link Preview (including checking for malicious links)

Link Preview is a hosted API that fetches a URL and returns page metadata for building preview cards, including title, description, images, videos, favicons, site name, media type, and content type. Requests are sent as a URL in a JSON body; if the URL lacks a protocol, http:// is prepended automatically. Callers can customize the user_agent and accept_language headers, control whether HTTP redirects are followed, and choose whether image metadata is pulled from Open Graph or Twitter tags.

The API includes a secure_mode option that checks a URL against a malicious-URL database before fetching it. When enabled, clean URLs return a reported_malicious field set to false alongside the normal preview data, while malicious URLs return a response containing the detected threat instead of preview metadata.

The service is aimed at developers who need to render link previews for shared URLs, bookmark collections, or page summaries, with an added option for screening links for safety before fetching. It has a single POST endpoint and is published by ApyHub as a verified, listed API.

Key features

  • Checks URLs against a malicious-URL database via secure_mode before fetching
  • Auto-prepends http:// when a URL is missing a protocol
  • Supports custom user_agent and accept_language headers to match crawler or app behavior
  • Configurable redirect following via allow_redirects
  • Choice of og or twitter tags for image metadata extraction

Frequently asked questions

What does the Link Preview API return?

It returns a JSON object with page title, description, images, videos, favicons, site name, media type, and content type when available.

Can it detect malicious links?

Yes, when secure_mode is enabled the URL is checked against a malicious-URL database before fetching, returning a threat object for malicious URLs or reported_malicious: false for clean ones.

How do I authenticate requests?

Requests are authenticated with an apy-token header containing your API key.

What happens if I exceed my rate limit?

The API returns a 429 rate_limited error and recommends retrying with exponential backoff.

Do I need to include the protocol in the URL?

No, if the protocol is missing, http:// is automatically prepended to the URL.

Advertise here

Featured products

  • SerpApi - Search API favicon
  • Screenshot Scout favicon
  • TalorData favicon
  • CoreClaw favicon

Show your product to thousands of developers

· 100k monthly pageviews
· 7k newsletter subscribers

Advertise your product