LinkPreview API

Beginner's Pick Open Data / API Key Intermediate HTTPS CORS
Varies by plan (check documentation)

Overview

LinkPreview is an API that fetches a summary of any URL including its title, description, and preview image in JSON format. You authenticate with an API key and simply pass the target URL as a parameter. It is ideal for building link unfurlers, social sharing previews, or content aggregators.

Beginner Tip

Pass the URL you want to preview as the q parameter and your API key as the key parameter in the query string. Make sure the target URL is URL-encoded to avoid parsing errors.

Available Data

LinkPreview data via REST API

Example Response

JSON Response
{
  "status": "success",
  "data": {
    "result": "Data from LinkPreview",
    "description": "Get JSON formatted summary with title, description and preview image for any requested URL",
    "timestamp": "2025-01-15T10:00:00Z"
  }
}

Field Reference

title Page title extracted from the og:title or <title> tag.
description Page description from og:description or meta description tag.
image URL of the preview image from the og:image tag.
url The final resolved URL after any redirects.

Implementation Example

Request
const url = "https://www.linkpreview.net/";
// Replace headers or query params with the values required by this API.
const response = await fetch(url, {
  headers: {
  "X-API-Key": "YOUR_API_KEY"
  }
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = await response.json();
console.log(data);

What Can You Build?

Note: These code examples are AI-generated and unverified. Always refer to the official API documentation for accurate usage.

Common Errors & Troubleshooting

401 Unauthorized API key is missing or incorrect.
Include your API key as the key query parameter: ?key=YOUR_API_KEY.
title and description are empty strings The target page does not have proper meta tags or the content is dynamically rendered by JavaScript.
This is a known limitation for JS-heavy sites; try pages with standard HTML meta tags for best results.
image field is null The target page has no og:image meta tag or accessible image.
Build a fallback in your UI for when the image field is null or an empty string.

Metadata Score Breakdown

Estimated from metadata — endpoint not independently tested

This score is estimated from observable metadata — HTTPS support, authentication model, declared CORS, and documentation reachability — because the API requires authentication or exposes no publicly testable endpoint. The five-signal breakdown is only shown for live-tested APIs.

Metadata estimate · endpoint not independently tested

Technical Specifications

Auth API Key
HTTPS REQUIRED
CORS YES
Category Open Data
Difficulty Intermediate
Verified: 2026-04-04

Related Tags

Similar APIs

View All →