Get Results
curl --request GET \
--url https://api.lobstr.io/v1/results \
--header 'Authorization: <authorization>'import requests
url = "https://api.lobstr.io/v1/results"
headers = {"Authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<authorization>'}};
fetch('https://api.lobstr.io/v1/results', 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.lobstr.io/v1/results",
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: <authorization>"
],
]);
$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.lobstr.io/v1/results"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<authorization>")
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.lobstr.io/v1/results")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lobstr.io/v1/results")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"comment_id": "<string>",
"text": "<string>",
"author": "<string>",
"author_channel_id": "<string>",
"author_profile_url": "<string>",
"author_avatar": "<string>",
"author_is_channel_owner": true,
"author_is_verified": true,
"author_badge": {},
"published_time_text": "<string>",
"published_at": {},
"vote_count": 123,
"reply_count": 123,
"has_creator_heart": true,
"is_pinned": true,
"type": "<string>",
"reply_to_comment_id": {},
"video_id": "<string>",
"video_url": "<string>",
"video_title": "<string>",
"comments_count": 123,
"channel_name": "<string>",
"channel_id": "<string>"
}YouTube Comments Scraper
Get Results
Retrieve scraped comments from YouTube Comments Scraper
GET
/
v1
/
results
Get Results
curl --request GET \
--url https://api.lobstr.io/v1/results \
--header 'Authorization: <authorization>'import requests
url = "https://api.lobstr.io/v1/results"
headers = {"Authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<authorization>'}};
fetch('https://api.lobstr.io/v1/results', 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.lobstr.io/v1/results",
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: <authorization>"
],
]);
$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.lobstr.io/v1/results"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<authorization>")
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.lobstr.io/v1/results")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lobstr.io/v1/results")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"comment_id": "<string>",
"text": "<string>",
"author": "<string>",
"author_channel_id": "<string>",
"author_profile_url": "<string>",
"author_avatar": "<string>",
"author_is_channel_owner": true,
"author_is_verified": true,
"author_badge": {},
"published_time_text": "<string>",
"published_at": {},
"vote_count": 123,
"reply_count": 123,
"has_creator_heart": true,
"is_pinned": true,
"type": "<string>",
"reply_to_comment_id": {},
"video_id": "<string>",
"video_url": "<string>",
"video_title": "<string>",
"comments_count": 123,
"channel_name": "<string>",
"channel_id": "<string>"
}Retrieve comments collected by your YouTube Comments Scraper runs.
Headers
string
required
Your API authentication token. Value:
Token YOUR_API_KEYQuery Parameters
string
required
Hash of the squid to get results from
string
Hash of a specific run (optional)
integer
Page number (default: 1)
Result Fields
string
Unique YouTube comment ID. Example:
UgxZf7BbcN3mJlQkfvt4AaABAgstring
Full text content of the comment. Example:
This video is amazing, learned so much!string
Display name of the comment author. Example:
John Doestring
YouTube channel ID of the author. Example:
UCxxxxxxxxxxxxxxxxxxxxxxstring
URL to the author’s YouTube channel. Example:
https://www.youtube.com/channel/UCxxxxxxxxxxxxxxxxxxxxxxstring
URL to the author’s profile picture. Example:
https://yt3.ggpht.com/...boolean
Whether the commenter is the video’s channel owner. Example:
falseboolean
Whether the author’s channel is verified. Example:
falsestring | null
Membership or sponsorship badge label, if any. Example:
nullstring
Human-readable relative publish time as shown on YouTube. Example:
2 years agostring | null
ISO 8601 timestamp of when the comment was published, if available. Example:
2022-08-15T14:30:00Zinteger
Number of likes on the comment. Example:
342integer
Number of replies to this top-level comment. Always
0 for replies. Example: 12boolean
Whether the video creator hearted this comment. Example:
falseboolean
Whether this comment is pinned at the top. Example:
falsestring
Comment type:
comment for top-level or reply for a reply. Example: commentstring | null
The
comment_id of the parent comment this is a reply to. null for top-level comments. Example: nullstring
YouTube video ID the comment belongs to. Example:
dQw4w9WgXcQstring
Full URL of the video. Example:
https://www.youtube.com/watch?v=dQw4w9WgXcQstring
Title of the video. Example:
Rick Astley - Never Gonna Give You Up (Official Music Video)integer
Total number of comments on the video. Example:
2400000string
Name of the channel that uploaded the video. Example:
Rick Astleystring
YouTube channel ID of the video uploader. Example:
UCuAXFkgsw1L7xaCfnd5JJOwCode Examples
curl "https://api.lobstr.io/v1/results?squid=YOUR_SQUID_HASH&page=1" \
-H "Authorization: Token YOUR_API_KEY"
import requests
API_KEY = "YOUR_API_KEY"
BASE_URL = "https://api.lobstr.io/v1"
headers = {"Authorization": f"Token {API_KEY}"}
squid_id = "YOUR_SQUID_HASH"
page = 1
all_results = []
while True:
response = requests.get(
f"{BASE_URL}/results",
headers=headers,
params={"squid": squid_id, "page": page},
)
data = response.json()
all_results.extend(data.get("results", []))
if not data.get("next"):
break
page += 1
print(f"Total comments collected: {len(all_results)}")
Response
200
{
"count": 2,
"next": null,
"previous": null,
"results": [
{
"comment_id": "UgxZf7BbcN3mJlQkfvt4AaABAg",
"text": "This song never gets old.",
"author": "Jane Smith",
"author_channel_id": "UCxxxxxxxxxxxxxxxxxxxxxx",
"author_profile_url": "https://www.youtube.com/channel/UCxxxxxxxxxxxxxxxxxxxxxx",
"author_avatar": "https://yt3.ggpht.com/example",
"author_is_channel_owner": false,
"author_is_verified": false,
"author_badge": null,
"published_time_text": "3 years ago",
"published_at": "2021-06-10T09:15:00Z",
"vote_count": 1204,
"reply_count": 45,
"has_creator_heart": false,
"is_pinned": false,
"type": "comment",
"reply_to_comment_id": null,
"video_id": "dQw4w9WgXcQ",
"video_url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
"video_title": "Rick Astley - Never Gonna Give You Up (Official Music Video)",
"comments_count": 2400000,
"channel_name": "Rick Astley",
"channel_id": "UCuAXFkgsw1L7xaCfnd5JJOw"
},
{
"comment_id": "UgxZf7BbcN3mJlQkfvt4AaABAg.9k2mLpQvX3z",
"text": "Agreed, timeless classic.",
"author": "John Doe",
"author_channel_id": "UCyyyyyyyyyyyyyyyyyyyyyy",
"author_profile_url": "https://www.youtube.com/channel/UCyyyyyyyyyyyyyyyyyyyyyy",
"author_avatar": "https://yt3.ggpht.com/example2",
"author_is_channel_owner": false,
"author_is_verified": false,
"author_badge": null,
"published_time_text": "3 years ago",
"published_at": "2021-06-11T10:02:00Z",
"vote_count": 8,
"reply_count": 0,
"has_creator_heart": false,
"is_pinned": false,
"type": "reply",
"reply_to_comment_id": "UgxZf7BbcN3mJlQkfvt4AaABAg",
"video_id": "dQw4w9WgXcQ",
"video_url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
"video_title": "Rick Astley - Never Gonna Give You Up (Official Music Video)",
"comments_count": 2400000,
"channel_name": "Rick Astley",
"channel_id": "UCuAXFkgsw1L7xaCfnd5JJOw"
}
]
}