Get URL Metadata
curl --request GET \
--url https://api.sublay.io/v7/:projectId/utils/get-metadata \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.sublay.io/v7/:projectId/utils/get-metadata"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.sublay.io/v7/:projectId/utils/get-metadata', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sublay.io/v7/:projectId/utils/get-metadata",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.sublay.io/v7/:projectId/utils/get-metadata"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.sublay.io/v7/:projectId/utils/get-metadata")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sublay.io/v7/:projectId/utils/get-metadata")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_bodyUtils
Get URL Metadata
Fetch Open Graph and social metadata for any URL
Get URL Metadata
curl --request GET \
--url https://api.sublay.io/v7/:projectId/utils/get-metadata \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.sublay.io/v7/:projectId/utils/get-metadata"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.sublay.io/v7/:projectId/utils/get-metadata', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sublay.io/v7/:projectId/utils/get-metadata",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.sublay.io/v7/:projectId/utils/get-metadata"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.sublay.io/v7/:projectId/utils/get-metadata")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sublay.io/v7/:projectId/utils/get-metadata")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_bodyFetches Open Graph, Twitter Card, and other structured metadata for a given URL. Results are cached in Redis for 24 hours to avoid repeated fetches. Useful for building link previews in comments or entity editors.
Requires an authenticated user.
Rate limit: 30 requests per 5 minutes.
All fields are nullable — the response always has the same shape regardless of which tags the target URL exposes.
Returned when the URL is reachable but no metadata could be extracted.
Query Parameters
Response
{
"title": "Example Page Title",
"description": "A brief description of the page.",
"siteName": "Example Site",
"url": "https://example.com/page",
"type": "article",
"locale": "en_US",
"charset": "utf-8",
"favicon": "https://example.com/favicon.ico",
"images": [
{
"url": "https://example.com/og-image.jpg",
"width": 1200,
"height": 630,
"type": "image/jpeg",
"alt": null
}
],
"videos": [],
"audio": [],
"twitter": {
"card": "summary_large_image",
"site": "@example",
"creator": null,
"title": "...",
"description": "...",
"images": [],
"players": []
},
"article": {
"publishedTime": "2025-01-01T00:00:00Z",
"modifiedTime": null,
"expirationTime": null,
"author": null,
"section": null,
"tag": null
},
"appLinks": { "ios": null, "android": null, "web": null },
"book": null,
"music": null,
"profile": null,
"jsonLd": null,
"requestUrl": "https://example.com/page",
"success": true
}
Error Responses
Extraction Failed — 422
Extraction Failed — 422
{
"error": "Failed to extract metadata from the provided URL",
"code": "utils/metadata-extraction-failed"
}

