YouTube — pinned comment by video
curl --request POST \
--url https://app.sideshift.app/api/v1/scrape/youtube/pinned-comment \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"url": "https://www.youtube.com/shorts/DGVUsw4-GIQ"
}
'import requests
url = "https://app.sideshift.app/api/v1/scrape/youtube/pinned-comment"
payload = { "url": "https://www.youtube.com/shorts/DGVUsw4-GIQ" }
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({url: 'https://www.youtube.com/shorts/DGVUsw4-GIQ'})
};
fetch('https://app.sideshift.app/api/v1/scrape/youtube/pinned-comment', 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://app.sideshift.app/api/v1/scrape/youtube/pinned-comment",
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://www.youtube.com/shorts/DGVUsw4-GIQ'
]),
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://app.sideshift.app/api/v1/scrape/youtube/pinned-comment"
payload := strings.NewReader("{\n \"url\": \"https://www.youtube.com/shorts/DGVUsw4-GIQ\"\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://app.sideshift.app/api/v1/scrape/youtube/pinned-comment")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"https://www.youtube.com/shorts/DGVUsw4-GIQ\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.sideshift.app/api/v1/scrape/youtube/pinned-comment")
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 \"url\": \"https://www.youtube.com/shorts/DGVUsw4-GIQ\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"pin_status": "resolved",
"has_pinned_comment": true,
"pinned_comments": [
{
"id": "UgxmrxxkBD0XpnKeiCx4AaABAg",
"author": "Lucasisurguy",
"text": "The site I used to find her active dating app profile is called \"Cheaterbuster\"…",
"likeCount": 153,
"replyCount": 20,
"timestamp": null,
"isPinned": true,
"isCreator": true
}
],
"comment_count": 2754
},
"request_id": "req_8f3c9a2b1d4e6f70",
"upstream_calls": 1,
"meta": {
"credits_charged": 1,
"credits_remaining": 9998
}
}1 credit per request
Returns only the pinned comment of one YouTube video or Short, for checking that a creator pinned a required comment without fetching the whole post. The pinned comment is found regardless of how few likes it has, and isCreator confirms the channel owner wrote it. Billed at your account’s post rate.
POST
/
scrape
/
youtube
/
pinned-comment
YouTube — pinned comment by video
curl --request POST \
--url https://app.sideshift.app/api/v1/scrape/youtube/pinned-comment \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"url": "https://www.youtube.com/shorts/DGVUsw4-GIQ"
}
'import requests
url = "https://app.sideshift.app/api/v1/scrape/youtube/pinned-comment"
payload = { "url": "https://www.youtube.com/shorts/DGVUsw4-GIQ" }
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({url: 'https://www.youtube.com/shorts/DGVUsw4-GIQ'})
};
fetch('https://app.sideshift.app/api/v1/scrape/youtube/pinned-comment', 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://app.sideshift.app/api/v1/scrape/youtube/pinned-comment",
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://www.youtube.com/shorts/DGVUsw4-GIQ'
]),
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://app.sideshift.app/api/v1/scrape/youtube/pinned-comment"
payload := strings.NewReader("{\n \"url\": \"https://www.youtube.com/shorts/DGVUsw4-GIQ\"\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://app.sideshift.app/api/v1/scrape/youtube/pinned-comment")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"https://www.youtube.com/shorts/DGVUsw4-GIQ\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.sideshift.app/api/v1/scrape/youtube/pinned-comment")
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 \"url\": \"https://www.youtube.com/shorts/DGVUsw4-GIQ\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"pin_status": "resolved",
"has_pinned_comment": true,
"pinned_comments": [
{
"id": "UgxmrxxkBD0XpnKeiCx4AaABAg",
"author": "Lucasisurguy",
"text": "The site I used to find her active dating app profile is called \"Cheaterbuster\"…",
"likeCount": 153,
"replyCount": 20,
"timestamp": null,
"isPinned": true,
"isCreator": true
}
],
"comment_count": 2754
},
"request_id": "req_8f3c9a2b1d4e6f70",
"upstream_calls": 1,
"meta": {
"credits_charged": 1,
"credits_remaining": 9998
}
}Authorizations
Independent Scraper API key (scrape_live_*). Generate one in the Scraper dashboard.
Body
application/json
A YouTube watch URL, a Shorts URL, a youtu.be link, or a bare 11-character video id.
Example:
"https://www.youtube.com/shorts/DGVUsw4-GIQ"