Free plan
Link Preview
See the title and picture a shared link will show
About this tool
When you share a web address in a chat or on social media, it often shows a small card with a title, a short description and a picture. This tool shows what that card will contain for any public page. Give a web address, or paste the code of the page. It reads the page only and does not change it.
For example, you want to check how your new blog post will look when someone shares it in a chat.
How to use it
- Choose this tool.
- Type the web address of the page, or paste the page code instead.
- Press Generate.
- Read the title, description and picture shown.
What you get back
You get the title, description, picture address, site name and icon on screen. You can copy them.
GOOD TO KNOW
No result file: the answer is data. The page is only read as text: no script runs and the picture is not downloaded. Counts as one document.
TEST IT LIVE
Try Link Preview in the Studio
One click opens the Studio with this tool already selected. Add your file and see the result in seconds.
Family
Documents
Plan
Free
Method
POST
Endpoint
/v1/documents/link-preview
Tool ID
documents.link-preview
Authentication
API key
Accepts
Text and settings
Background jobs
Yes
Usage group
Documents
For developers
Use it from your code
cURL
curl -X POST "https://app.h2i.davixlabs.io/v1/documents/link-preview" \
-H "X-Api-Key: $DAVIX_H2I_API_KEY" \
-F 'url=https://example.com/blog/my-post' \
-F 'html=<h1>Hello</h1>' \
-F 'base_url=https://example.com/blog/'Node.js
const { DavixH2I } = require('@davixlabs/h2i-sdk');
const h2i = new DavixH2I({ apiKey: process.env.DAVIX_H2I_API_KEY, baseUrl: process.env.DAVIX_H2I_URL });
const result = await h2i.documents.linkPreview({
"url": "https://example.com/blog/my-post",
"html": "<h1>Hello</h1>",
"base_url": "https://example.com/blog/"
});
console.log(result.data, result.requestId);PHP
<?php
require 'vendor/autoload.php';
$h2i = new \Davix\H2I\Client(['apiKey' => getenv('DAVIX_H2I_API_KEY'), 'baseUrl' => getenv('DAVIX_H2I_URL')]);
$result = $h2i->documents()->linkPreview([
'url' => 'https://example.com/blog/my-post',
'html' => '<h1>Hello</h1>',
'base_url' => 'https://example.com/blog/',
]);
echo $result->requestId;More in Documents
