Resolve a social oEmbed
curl --request POST \
--url https://www.ntanduy.com/api/v1/oembed/resolve \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "https://x.com/USERNAME/status/POST_ID"
}
'import requests
url = "https://www.ntanduy.com/api/v1/oembed/resolve"
payload = { "url": "https://x.com/USERNAME/status/POST_ID" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({url: 'https://x.com/USERNAME/status/POST_ID'})
};
fetch('https://www.ntanduy.com/api/v1/oembed/resolve', 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://www.ntanduy.com/api/v1/oembed/resolve",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'url' => 'https://x.com/USERNAME/status/POST_ID'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://www.ntanduy.com/api/v1/oembed/resolve"
payload := strings.NewReader("{\n \"url\": \"https://x.com/USERNAME/status/POST_ID\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://www.ntanduy.com/api/v1/oembed/resolve")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"https://x.com/USERNAME/status/POST_ID\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.ntanduy.com/api/v1/oembed/resolve")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"url\": \"https://x.com/USERNAME/status/POST_ID\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"provider": "x",
"type": "rich",
"originalUrl": "https://x.com/USERNAME/status/123456789",
"resolvedUrl": "https://x.com/i/status/123456789",
"title": "Example public post text.",
"author": {
"name": "Example author",
"url": "https://x.com/USERNAME"
},
"providerInfo": {
"name": "X",
"url": "https://x.com"
},
"thumbnail": null,
"embed": {
"html": null,
"width": null,
"height": null,
"scripts": []
},
"capabilities": {
"html": false,
"thumbnail": false,
"nativeEmbed": false,
"requiresHydration": false
}
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>"
},
"data": {
"requestId": "1704b073-5bf1-4d64-8f9a-3af95edb3bf1"
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>"
},
"data": {
"requestId": "1704b073-5bf1-4d64-8f9a-3af95edb3bf1"
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>"
},
"data": {
"requestId": "1704b073-5bf1-4d64-8f9a-3af95edb3bf1"
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>"
},
"data": {
"requestId": "1704b073-5bf1-4d64-8f9a-3af95edb3bf1"
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>"
},
"data": {
"requestId": "1704b073-5bf1-4d64-8f9a-3af95edb3bf1"
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>"
},
"data": {
"requestId": "1704b073-5bf1-4d64-8f9a-3af95edb3bf1"
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>"
},
"data": {
"requestId": "1704b073-5bf1-4d64-8f9a-3af95edb3bf1"
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>"
},
"data": {
"requestId": "1704b073-5bf1-4d64-8f9a-3af95edb3bf1"
}
}Social embeds
Resolve a social oEmbed
Resolve public social posts into normalized metadata and available embed markup.
POST
/
api
/
v1
/
oembed
/
resolve
Resolve a social oEmbed
curl --request POST \
--url https://www.ntanduy.com/api/v1/oembed/resolve \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "https://x.com/USERNAME/status/POST_ID"
}
'import requests
url = "https://www.ntanduy.com/api/v1/oembed/resolve"
payload = { "url": "https://x.com/USERNAME/status/POST_ID" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({url: 'https://x.com/USERNAME/status/POST_ID'})
};
fetch('https://www.ntanduy.com/api/v1/oembed/resolve', 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://www.ntanduy.com/api/v1/oembed/resolve",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'url' => 'https://x.com/USERNAME/status/POST_ID'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://www.ntanduy.com/api/v1/oembed/resolve"
payload := strings.NewReader("{\n \"url\": \"https://x.com/USERNAME/status/POST_ID\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://www.ntanduy.com/api/v1/oembed/resolve")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"https://x.com/USERNAME/status/POST_ID\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.ntanduy.com/api/v1/oembed/resolve")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"url\": \"https://x.com/USERNAME/status/POST_ID\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"provider": "x",
"type": "rich",
"originalUrl": "https://x.com/USERNAME/status/123456789",
"resolvedUrl": "https://x.com/i/status/123456789",
"title": "Example public post text.",
"author": {
"name": "Example author",
"url": "https://x.com/USERNAME"
},
"providerInfo": {
"name": "X",
"url": "https://x.com"
},
"thumbnail": null,
"embed": {
"html": null,
"width": null,
"height": null,
"scripts": []
},
"capabilities": {
"html": false,
"thumbnail": false,
"nativeEmbed": false,
"requiresHydration": false
}
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>"
},
"data": {
"requestId": "1704b073-5bf1-4d64-8f9a-3af95edb3bf1"
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>"
},
"data": {
"requestId": "1704b073-5bf1-4d64-8f9a-3af95edb3bf1"
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>"
},
"data": {
"requestId": "1704b073-5bf1-4d64-8f9a-3af95edb3bf1"
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>"
},
"data": {
"requestId": "1704b073-5bf1-4d64-8f9a-3af95edb3bf1"
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>"
},
"data": {
"requestId": "1704b073-5bf1-4d64-8f9a-3af95edb3bf1"
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>"
},
"data": {
"requestId": "1704b073-5bf1-4d64-8f9a-3af95edb3bf1"
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>"
},
"data": {
"requestId": "1704b073-5bf1-4d64-8f9a-3af95edb3bf1"
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>"
},
"data": {
"requestId": "1704b073-5bf1-4d64-8f9a-3af95edb3bf1"
}
}Send a Pirehub API key with
oembed:read in x-pirehub-api-key or as a bearer
token. OAuth tokens require the same scope. See Authentication.
The JSON body accepts only url. Supported providers are X, Facebook, Instagram,
Threads, TikTok, and Reddit. Response fields may be null when unavailable.
X currently returns metadata with embed.html: null and embed.scripts: [].
Treat provider HTML as untrusted and render it in an isolated, sandboxed iframe.
Use capabilities to determine which rendering options are available.
See the oEmbed guide for authentication, response examples,
provider URL formats, caching, and errors.Authorizations
pirehubOAuthpirehubApiKeybearerApiKey
OAuth 2.0 Authorization Code with PKCE, issued by Pirehub's Clerk authorization server. Request only the scopes required by the operation.
Body
application/json
Public provider post URL. Trimmed, normalized to HTTPS, and checked against allowed hosts and public network destinations. Replace the example placeholders with a real post.
Required string length:
1 - 2048