DDiwigo API

Link Preview API

Title, description, image, icon and site name of a web page (Open Graph and Twitter cards) to build link previews.

What is it?

The Diwigo link preview API reads a web page and returns its title, description, preview image, icon and site name from Open Graph and Twitter cards.

It answers with JSON and is included in the free plan: 10,000 requests per API key and per month.

Example request

GET https://landing.diwigo.com/api/?key=YOUR_API_KEY&meta=https://www.wikipedia.org

Parameters

ParameterDescription
keyYour API key (required)
metaPage URL (http or https)

Example response

{
  "final_url": "https://www.wikipedia.org/",
  "title": "Wikipedia, the free encyclopedia",
  "description": "Wikipedia is a free online encyclopedia…",
  "image": "https://upload.wikimedia.org/…/Wikipedia-logo-v2.png",
  "icon": "https://www.wikipedia.org/static/apple-touch/wikipedia.png",
  "lang": "en"
}

Code examples

cURL
curl "https://landing.diwigo.com/api/?key=YOUR_API_KEY&meta=https://www.wikipedia.org"
JavaScript
const res = await fetch("https://landing.diwigo.com/api/?key=YOUR_API_KEY&meta=https://www.wikipedia.org");
const data = await res.json();
console.log(data);
PHP
<?php
$response = file_get_contents("https://landing.diwigo.com/api/?key=YOUR_API_KEY&meta=https://www.wikipedia.org");
$data = json_decode($response, true);
print_r($data);
Python
import requests

response = requests.get("https://landing.diwigo.com/api/?key=YOUR_API_KEY&meta=https://www.wikipedia.org")
print(response.json())

Use cases

  • Rich link previews in chats and comments
  • Bookmark and read-later apps
  • Check how a page will look when shared

Link preview: questions and answers

What does the Link preview API do?

The Diwigo link preview API reads a web page and returns its title, description, preview image, icon and site name from Open Graph and Twitter cards.

How do I call the Link preview API?

Send a GET request to https://landing.diwigo.com/api/?key=YOUR_API_KEY&meta=https://www.wikipedia.org with your own API key instead of YOUR_API_KEY. It answers with JSON.

Is the Link preview API free?

Yes, it is included in the free plan: 10,000 requests per API key and per calendar month, shared by all Diwigo endpoints. Higher limits are available on request.