Search videos
curl --request GET \
--url https://api.konbiniapi.com/v1/youtube/search \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.konbiniapi.com/v1/youtube/search"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.konbiniapi.com/v1/youtube/search', 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.konbiniapi.com/v1/youtube/search",
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: Bearer <token>"
],
]);
$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.konbiniapi.com/v1/youtube/search"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.konbiniapi.com/v1/youtube/search")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.konbiniapi.com/v1/youtube/search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"@context": [
"https://www.w3.org/ns/activitystreams#",
"https://konbiniapi.com/ns/social#"
],
"type": "OrderedCollectionPage",
"partOf": "https://api.konbiniapi.com/v1/youtube/search?query=mrbeast",
"totalItems": null,
"cursor": null,
"nextCursor": "<token>",
"next": "https://api.konbiniapi.com/v1/youtube/search?query=mrbeast&cursor=<token>",
"itemCount": 30,
"orderedItems": [
{
"type": "Video",
"id": "https://www.youtube.com/watch?v=plN7JMbadRg",
"url": "https://www.youtube.com/watch?v=plN7JMbadRg",
"entityId": "plN7JMbadRg",
"name": "Eat Everything In A Grocery Store, Win $1,000,000",
"content": "I trapped 4 strangers in an entire supermarket and the only way out is eating everything inside\n\nThe guys wore Fitbit Air to track their health and fitness throughout their entire time in the store. See what they achieved during the Google Health Awards. GooglePartner\nGoogle…",
"summary": "I trapped 4 strangers in an entire supermarket and the only way out is eating everything inside",
"duration": 3479,
"viewCount": 274327400,
"tag": [
{
"type": "Tag",
"name": "New"
}
],
"attributedTo": {
"type": "Person",
"id": "https://www.youtube.com/channel/UCX6OQ3DkcsbYNE6H8uQQuVA",
"url": "https://www.youtube.com/channel/UCX6OQ3DkcsbYNE6H8uQQuVA",
"entityId": "UCX6OQ3DkcsbYNE6H8uQQuVA",
"name": "MrBeast",
"isVerified": true
},
"image": [
{
"type": "Image",
"url": "https://i.ytimg.com/vi/plN7JMbadRg/hqdefault.jpg?sqp=-oaymwEmCKgBEF5IWvKriqkDGQgBFQAAiEIYAdgBAeIBCggYEAIYBjgBQAE=&rs=AOn4CLCiT6Vj47A7NogeJusgz-_sjWhu7A",
"width": 168,
"height": 94
}
]
}
]
}
}{
"errors": [
{
"code": "validation_error",
"message": "Validation error"
}
],
"data": null
}{
"errors": [
{
"code": "missing_api_key",
"message": "Invalid API key"
}
],
"data": null
}{
"errors": [
{
"code": "credits_exhausted",
"message": "Credits exhausted. Upgrade your plan at konbiniapi.com"
}
],
"data": null
}{
"errors": [
{
"code": "api_key_disabled",
"message": "API key is disabled"
}
],
"data": null
}{
"errors": [
{
"code": "not_found",
"message": "Not found"
}
],
"data": null
}{
"errors": [
{
"code": "validation_error",
"message": "Request body too large"
}
],
"data": null
}{
"errors": [
{
"code": "internal_error",
"message": "Internal error"
}
],
"data": null
}{
"errors": [
{
"code": "platform_error",
"message": "Platform error"
}
],
"data": null
}{
"errors": [
{
"code": "service_unavailable",
"message": "Service unavailable"
}
],
"data": null
}{
"errors": [
{
"code": "platform_error",
"message": "Platform error"
}
],
"data": null
}Search
Search videos
Searches public YouTube videos for a query. YouTube has no public trending chart, so sorting by view count within an upload window (order, published) is the closest equivalent — results for a query, not a platform-wide ranking. viewCount is exact here.
GET
/
v1
/
youtube
/
search
Search videos
curl --request GET \
--url https://api.konbiniapi.com/v1/youtube/search \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.konbiniapi.com/v1/youtube/search"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.konbiniapi.com/v1/youtube/search', 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.konbiniapi.com/v1/youtube/search",
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: Bearer <token>"
],
]);
$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.konbiniapi.com/v1/youtube/search"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.konbiniapi.com/v1/youtube/search")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.konbiniapi.com/v1/youtube/search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"@context": [
"https://www.w3.org/ns/activitystreams#",
"https://konbiniapi.com/ns/social#"
],
"type": "OrderedCollectionPage",
"partOf": "https://api.konbiniapi.com/v1/youtube/search?query=mrbeast",
"totalItems": null,
"cursor": null,
"nextCursor": "<token>",
"next": "https://api.konbiniapi.com/v1/youtube/search?query=mrbeast&cursor=<token>",
"itemCount": 30,
"orderedItems": [
{
"type": "Video",
"id": "https://www.youtube.com/watch?v=plN7JMbadRg",
"url": "https://www.youtube.com/watch?v=plN7JMbadRg",
"entityId": "plN7JMbadRg",
"name": "Eat Everything In A Grocery Store, Win $1,000,000",
"content": "I trapped 4 strangers in an entire supermarket and the only way out is eating everything inside\n\nThe guys wore Fitbit Air to track their health and fitness throughout their entire time in the store. See what they achieved during the Google Health Awards. GooglePartner\nGoogle…",
"summary": "I trapped 4 strangers in an entire supermarket and the only way out is eating everything inside",
"duration": 3479,
"viewCount": 274327400,
"tag": [
{
"type": "Tag",
"name": "New"
}
],
"attributedTo": {
"type": "Person",
"id": "https://www.youtube.com/channel/UCX6OQ3DkcsbYNE6H8uQQuVA",
"url": "https://www.youtube.com/channel/UCX6OQ3DkcsbYNE6H8uQQuVA",
"entityId": "UCX6OQ3DkcsbYNE6H8uQQuVA",
"name": "MrBeast",
"isVerified": true
},
"image": [
{
"type": "Image",
"url": "https://i.ytimg.com/vi/plN7JMbadRg/hqdefault.jpg?sqp=-oaymwEmCKgBEF5IWvKriqkDGQgBFQAAiEIYAdgBAeIBCggYEAIYBjgBQAE=&rs=AOn4CLCiT6Vj47A7NogeJusgz-_sjWhu7A",
"width": 168,
"height": 94
}
]
}
]
}
}{
"errors": [
{
"code": "validation_error",
"message": "Validation error"
}
],
"data": null
}{
"errors": [
{
"code": "missing_api_key",
"message": "Invalid API key"
}
],
"data": null
}{
"errors": [
{
"code": "credits_exhausted",
"message": "Credits exhausted. Upgrade your plan at konbiniapi.com"
}
],
"data": null
}{
"errors": [
{
"code": "api_key_disabled",
"message": "API key is disabled"
}
],
"data": null
}{
"errors": [
{
"code": "not_found",
"message": "Not found"
}
],
"data": null
}{
"errors": [
{
"code": "validation_error",
"message": "Request body too large"
}
],
"data": null
}{
"errors": [
{
"code": "internal_error",
"message": "Internal error"
}
],
"data": null
}{
"errors": [
{
"code": "platform_error",
"message": "Platform error"
}
],
"data": null
}{
"errors": [
{
"code": "service_unavailable",
"message": "Service unavailable"
}
],
"data": null
}{
"errors": [
{
"code": "platform_error",
"message": "Platform error"
}
],
"data": null
}Authorizations
Send your API key in the Authorization header as a Bearer token.
Example: Authorization: Bearer <your-api-key>
Query Parameters
Search query
Minimum string length:
1Example:
"mrbeast"
Sort order: relevance (default), rating, newest, or views
Available options:
relevance, rating, newest, views Example:
"views"
Restrict results to videos uploaded within this window
Available options:
hour, today, week, month, year Example:
"week"
Pagination cursor
Example:
"0"
Response
Returns the search results
Show child attributes
Show child attributes