Sharing debugger
Debug and validate metadata HTML markup, including Open Graph, microdata, RDFa, JSON-LD, and more. Preview how your URL appears on major social networks instantly.
Microlink | Headless Browser API: Screenshot, PDF & Previews
Turn any URL into structured data (JSON). The all-in-one API for browser automation: screenshots, PDFs, scraping, and link previews. No infrastructure to manage.
microlink.io
https://microlink.io/
Edited 09:21
✓
What can I debug with this tool?
This link preview debugging tool inspects and debug metadata HTML markup, ensuring accurate titles, descriptions, and images across all major social networks.
It runs on
Metascraper
, the battle-tested library maintained by Microlink. We don't just regex HTML; we use a flexible rule-based system to normalize metadata from the wildest edge cases on the web.We normalize data into a unified JSON response, prioritizing the most relevant source automatically.
How does social media caching work?
Social networks aggressively cache link previews. This validator fetches the live version of your URL, acting as a "fresh" crawler.
- Agent Spoofing: We simulate the User-Agent of bots (Googlebot, Twitterbot) to show you exactly what they see.
- Rendered HTML: Unlike standard scrapers, we can execute JavaScript to capture meta tags dynamically injected by React/Vue apps.
Update your metadata using our recommended patterns, then re-run the test to verify the fix.
Can I automate this process?
You can automate your Open Graph and SEO audit workflow using the Microlink API. This allows you to programmatically validate metadata for thousands of URLs without manual intervention. By hitting our API endpoint, you get a structured JSON payload containing every meta tag, allowing you to build internal health checks or automated CI/CD scripts to ensure your production deploys never break your social previews.
The following examples show how to use the Microlink API with CLI, cURL, JavaScript, Python, Ruby, PHP & Golang, targeting 'https://microlink.io' URL with 'meta' API parameter:
CLI Microlink API example
microlink https://microlink.io&metacURL Microlink API example
curl -G "https://api.microlink.io" \
-d "url=https://microlink.io" \
-d "meta=true"JavaScript Microlink API example
import mql from '@microlink/mql'
const { data } = await mql('https://microlink.io', {
meta: true
})Python Microlink API example
import requests
url = "https://api.microlink.io/"
querystring = {
"url": "https://microlink.io",
"meta": "true"
}
response = requests.get(url, params=querystring)
print(response.json())Ruby Microlink API example
require 'uri'
require 'net/http'
base_url = "https://api.microlink.io/"
params = {
url: "https://microlink.io",
meta: "true"
}
uri = URI(base_url)
uri.query = URI.encode_www_form(params)
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Get.new(uri)
response = http.request(request)
puts response.bodyPHP Microlink API example
<?php
$baseUrl = "https://api.microlink.io/";
$params = [
"url" => "https://microlink.io",
"meta" => "true"
];
$query = http_build_query($params);
$url = $baseUrl . '?' . $query;
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET"
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #: " . $err;
} else {
echo $response;
}Golang Microlink API example
package main
import (
"fmt"
"net/http"
"net/url"
"io"
)
func main() {
baseURL := "https://api.microlink.io"
u, err := url.Parse(baseURL)
if err != nil {
panic(err)
}
q := u.Query()
q.Set("url", "https://microlink.io")
q.Set("meta", "true")
u.RawQuery = q.Encode()
req, err := http.NewRequest("GET", u.String(), nil)
if err != nil {
panic(err)
}
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
body, err := io.ReadAll(resp.Body)
if err != nil {
panic(err)
}
fmt.Println(string(body))
}import mql from '@microlink/mql'
const { data } = await mql('https://microlink.io', {
meta: true
})- Bulk Processing: Read how to run a validation script across your entire sitemap.
- Integration Ready: Easily integrate with Node.js, Python, or even simple cURL commands.
- Edge Case Detection: Programmatically detect missing og:image tags, broken canonicals, or invalid JSON-LD schemas across your whole domain.
How can I create social media images?
In the era of link unfurling (Facebook, X, LinkedIn, etc.), your og:image is your first impression. Manually designing assets for every dynamic route is unscalable, but generic logos get ignored.
Microlink solves this by treating your screenshots as an Screenshot API. Instead of storing static JPEGs, simply pass your page's URL to Microlink with screenshot=true. We spin up a headless browser, capture the viewport, and serve a globally cached image.
Microlink solves this by treating your screenshots as an Screenshot API.
The following examples show how to use the Microlink API with CLI, cURL, JavaScript, Python, Ruby, PHP & Golang, targeting 'https://www.netflix.com/title/80057281' URL with 'screenshot' API parameter:
CLI Microlink API example
microlink https://www.netflix.com/title/80057281&screenshotcURL Microlink API example
curl -G "https://api.microlink.io" \
-d "url=https://www.netflix.com/title/80057281" \
-d "screenshot=true"JavaScript Microlink API example
import mql from '@microlink/mql'
const { data } = await mql('https://www.netflix.com/title/80057281', {
screenshot: true
})Python Microlink API example
import requests
url = "https://api.microlink.io/"
querystring = {
"url": "https://www.netflix.com/title/80057281",
"screenshot": "true"
}
response = requests.get(url, params=querystring)
print(response.json())Ruby Microlink API example
require 'uri'
require 'net/http'
base_url = "https://api.microlink.io/"
params = {
url: "https://www.netflix.com/title/80057281",
screenshot: "true"
}
uri = URI(base_url)
uri.query = URI.encode_www_form(params)
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Get.new(uri)
response = http.request(request)
puts response.bodyPHP Microlink API example
<?php
$baseUrl = "https://api.microlink.io/";
$params = [
"url" => "https://www.netflix.com/title/80057281",
"screenshot" => "true"
];
$query = http_build_query($params);
$url = $baseUrl . '?' . $query;
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET"
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #: " . $err;
} else {
echo $response;
}Golang Microlink API example
package main
import (
"fmt"
"net/http"
"net/url"
"io"
)
func main() {
baseURL := "https://api.microlink.io"
u, err := url.Parse(baseURL)
if err != nil {
panic(err)
}
q := u.Query()
q.Set("url", "https://www.netflix.com/title/80057281")
q.Set("screenshot", "true")
u.RawQuery = q.Encode()
req, err := http.NewRequest("GET", u.String(), nil)
if err != nil {
panic(err)
}
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
body, err := io.ReadAll(resp.Body)
if err != nil {
panic(err)
}
fmt.Println(string(body))
}import mql from '@microlink/mql'
const { data } = await mql('https://www.netflix.com/title/80057281', {
screenshot: true
})- Always Fresh: Your social cards automatically reflect your latest UI updates.
- Zero Maintenance: No more Photoshop or Figma templates for every blog post.
- High Performance: Served via global CDN, ensuring link previews load instantly.
Other questions?
We’re always available at
[email protected]
.