Social Media URL Upload
curl --request POST \
--url https://api.prd.realitydefender.xyz/api/files/social \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"socialLink": "<string>"
}
'import requests
url = "https://api.prd.realitydefender.xyz/api/files/social"
payload = { "socialLink": "<string>" }
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({socialLink: '<string>'})
};
fetch('https://api.prd.realitydefender.xyz/api/files/social', 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.prd.realitydefender.xyz/api/files/social",
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([
'socialLink' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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://api.prd.realitydefender.xyz/api/files/social"
payload := strings.NewReader("{\n \"socialLink\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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://api.prd.realitydefender.xyz/api/files/social")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"socialLink\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.prd.realitydefender.xyz/api/files/social")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"socialLink\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodyEndpoint Examples
Social Media URL Upload
POST
api
/
files
/
social
Social Media URL Upload
curl --request POST \
--url https://api.prd.realitydefender.xyz/api/files/social \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"socialLink": "<string>"
}
'import requests
url = "https://api.prd.realitydefender.xyz/api/files/social"
payload = { "socialLink": "<string>" }
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({socialLink: '<string>'})
};
fetch('https://api.prd.realitydefender.xyz/api/files/social', 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.prd.realitydefender.xyz/api/files/social",
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([
'socialLink' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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://api.prd.realitydefender.xyz/api/files/social"
payload := strings.NewReader("{\n \"socialLink\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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://api.prd.realitydefender.xyz/api/files/social")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"socialLink\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.prd.realitydefender.xyz/api/files/social")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"socialLink\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodyThe social media URL you would like to analyze.
requestId that you can use to fetch the analysis result from the media detail endpoint.
Authorization
To submit a social media URL, you must include thex-api-key in your request headers.
Supported Social Platforms
- Twitter/X
- YouTube
- TikTok
- Threads
Sample Code Snippet
Here’s an example of how you can submit a social media URL and then retrieve the result.curl -X POST \
'https://api.prd.realitydefender.xyz/api/files/social' \
-H 'X-API-KEY: your-api-key-here' \
-H 'Content-Type: application/json' \
-d '{"socialLink": "https://www.youtube.com/watch?v=6O0fySNw-Lw"}'
import requests
url = "https://api.prd.realitydefender.xyz/api/files/social"
payload = {
"socialLink": "https://www.youtube.com/watch?v=6O0fySNw-Lw"
}
headers = {
"X-API-KEY": "your-api-key-here",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers).json()
print(response)
⌘I