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{
"result_type": "<string>",
"content_id": "<string>",
"title": "<string>",
"url": "<string>",
"thumbnail_url": "<string>",
"description": "<string>",
"hashtags": "<any>",
"published_at": {},
"published_time_text": "<string>",
"duration_seconds": 123,
"duration_text": "<string>",
"view_count": {},
"view_count_text": "<string>",
"like_count": {},
"comment_count_text": "<string>",
"channel_id": "<string>",
"channel_name": "<string>",
"channel_url": "<string>",
"channel_avatar_url": "<string>",
"channel_verified": true,
"channel_subscriber_count_text": "<string>",
"channel_banner_url": "<string>",
"channel_handle": "<string>",
"channel_video_count_text": "<string>",
"channel_country": "<string>",
"channel_join_date": {},
"channel_external_links": "<any>",
"is_live": true,
"is_upcoming": true,
"live_start_time": {},
"captions_available": true,
"caption_languages": "<any>",
"category": "<string>",
"is_family_safe": true,
"is_unlisted": true,
"source_input": "<string>",
"position": 123,
"top_comments": "<any>",
"subtitles_language": "<string>",
"subtitles_text": "<string>"
}YouTube Search Scraper
Get Results
Retrieve scraped data from YouTube Search 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{
"result_type": "<string>",
"content_id": "<string>",
"title": "<string>",
"url": "<string>",
"thumbnail_url": "<string>",
"description": "<string>",
"hashtags": "<any>",
"published_at": {},
"published_time_text": "<string>",
"duration_seconds": 123,
"duration_text": "<string>",
"view_count": {},
"view_count_text": "<string>",
"like_count": {},
"comment_count_text": "<string>",
"channel_id": "<string>",
"channel_name": "<string>",
"channel_url": "<string>",
"channel_avatar_url": "<string>",
"channel_verified": true,
"channel_subscriber_count_text": "<string>",
"channel_banner_url": "<string>",
"channel_handle": "<string>",
"channel_video_count_text": "<string>",
"channel_country": "<string>",
"channel_join_date": {},
"channel_external_links": "<any>",
"is_live": true,
"is_upcoming": true,
"live_start_time": {},
"captions_available": true,
"caption_languages": "<any>",
"category": "<string>",
"is_family_safe": true,
"is_unlisted": true,
"source_input": "<string>",
"position": 123,
"top_comments": "<any>",
"subtitles_language": "<string>",
"subtitles_text": "<string>"
}Retrieve scraped data from your YouTube Search Scraper runs.
Headers
string
required
Your API authentication token. Value:
Token YOUR_API_KEY.Query Parameters
string
required
Hash of the squid to get results from.
integer
Page number (default: 1).
Result Fields
Export Results
string
What this row represents: ‘video’, ‘channel’, ‘short’, ‘stream’, or ‘playlist’. Example:
videostring
YouTube’s own identifier for this video, channel, or playlist — unique on its own since video/channel/playlist id formats never collide. Example:
dQw4w9WgXcQstring
Video title, or channel display name for a channel row. Example:
Rick Astley - Never Gonna Give You Up (Official Video) (4K Remaster)string
Direct URL to the video or channel. Example:
https://www.youtube.com/watch?v=dQw4w9WgXcQstring
Video thumbnail, or channel avatar for a channel row. Example:
https://i.ytimg.com/vi/dQw4w9WgXcQ/maxresdefault.jpgtext
Full video description, or full channel About text for a channel row. Example:
The official video for “Never Gonna Give You Up” by Rick Astley.json
Hashtags found on the video. Empty for a channel row or a search-listing video row (only populated when the video itself was fetched directly). Example:
["#RickAstley", "#NeverGonnaGiveYouUp"]datetime
Exact publish date. Only populated when the video itself was fetched directly — a search-listing row only has published_time_text (see below). Example:
2009-10-24T23:57:33-07:00string
Approximate, relative publish time as shown on a search-listing row. Only populated for search-listing video rows. Example:
14 years agointeger
Exact video duration in seconds. Only populated when the video itself was fetched directly. Example:
213string
Video duration as shown on a search-listing row (e.g. “3:32”). Only populated for search-listing video rows. Example:
3:32bigint
Exact view count when the video was fetched directly; parsed from listing text otherwise. bigint — some videos already exceed the ~2.147B int32 range. Example:
1805080053string
View count as shown on a search-listing row. Only populated for search-listing video rows. Example:
48,467,121 viewsbigint
Exact like count. Only populated when the video itself was fetched directly — not available on a search-listing row at all. bigint — some videos already exceed the ~2.147B int32 range. Example:
19337903string
Approximate comment count text. YouTube exposes no exact comment count anywhere. Only populated when the video itself was fetched directly. Example:
2.4Mstring
Channel identifier — the video’s channel, or the channel itself for a channel row. Example:
UCuAXFkgsw1L7xaCfnd5JJOwstring
Channel display name. Example:
Rick Astleystring
Direct URL to the channel. Example:
https://www.youtube.com/@RickAstleyYTstring
Channel avatar. On a video row this is the small avatar shown next to the video; on a channel row it’s the same as thumbnail_url. Example:
https://yt3.ggpht.com/example=s88-c-k-c0x00ffffff-no-rjboolean
Whether the channel has YouTube’s verified (or Official Artist Channel) badge. Example:
Truestring
Approximate subscriber count text — YouTube exposes no exact subscriber count anywhere. Example:
4.53M subscribersstring
Channel banner image. Only populated for a channel row. Example:
https://yt3.googleusercontent.com/example=w2560-fcrop64=1,00005a57ffffa5a8-k-c0xffffffff-no-nd-rjstring
Channel handle. Only populated for a channel row. Example:
@MrBeaststring
Approximate total video count text. Only populated for a channel row. Example:
997 videosstring
Channel’s claimed country, from its About tab. Only populated for a channel row. Example:
United Statesdatetime
Date the channel joined YouTube, from its About tab. Only populated for a channel row. Example:
2012-02-20json
External/social links listed on the channel’s About tab. Only populated for a channel row. Example:
["https://www.instagram.com/mrbeast/", "https://x.com/MrBeast"]boolean
Whether the video is currently a live broadcast. Example:
Falseboolean
Whether the video is an upcoming/scheduled premiere. Only populated when the video itself was fetched directly. Example:
Falsedatetime
Live broadcast start time, if is_live is true. Only populated when the video itself was fetched directly.
boolean
Whether the video has any captions/subtitles (auto-generated or user-added). Only populated when the video itself was fetched directly. Example:
Truejson
Language codes of the video’s available caption tracks. Only populated when the video itself was fetched directly. Example:
["en", "de-DE"]string
Video category. Only populated when the video itself was fetched directly. Example:
Musicboolean
Whether the video or channel is flagged family-safe by YouTube. Example:
Trueboolean
Whether the video is unlisted. Only populated when the video itself was fetched directly. Example:
Falsestring
The task’s original input string (URL or search text) that produced this row. Example:
rick astleyinteger
1-based position of this row within its task’s results (always 1 for a video/channel URL task). Example:
1Get Comments
json
First page of top-level comments (up to 10). Only populated when Get Comments is enabled. Example:
[{"comment_id": "UgzABC123", "author": "@SomeUser", "author_channel_id": "UCabc123", "text": "This is amazing!", "published_time_text": "2 days ago", "vote_count": 214}]Get Subtitles
string
Language code of the caption track subtitles_text was fetched from. Only populated when Get Subtitles is enabled. Example:
enstring
Transcript text of one caption track (see subtitles_language). Only populated when Get Subtitles is enabled, and empty if the video has no captions. Example:
[Music playing] Welcome back to the channel...Code Examples
curl -G https://api.lobstr.io/v1/results \
-H "Authorization: Token YOUR_API_KEY" \
-d "squid=YOUR_SQUID_HASH" \
-d "page=1"
import requests
response = requests.get(
"https://api.lobstr.io/v1/results",
headers={"Authorization": "Token YOUR_API_KEY"},
params={"squid": "YOUR_SQUID_HASH", "page": 1},
)
print(response.json())
Response
200
{"total_results": 1, "data": [{"result_type": "video", "content_id": "dQw4w9WgXcQ", "title": "Rick Astley - Never Gonna Give You Up (Official Video) (4K Remaster)", "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ", "thumbnail_url": "https://i.ytimg.com/vi/dQw4w9WgXcQ/maxresdefault.jpg", "description": "The official video for \u201cNever Gonna Give You Up\u201d by Rick Astley.", "hashtags": ["#RickAstley", "#NeverGonnaGiveYouUp"], "published_at": "2009-10-24T23:57:33-07:00", "published_time_text": "14 years ago", "duration_seconds": 213}]}