Search YouTube
curl --request POST \
--url https://app.dumplingai.com/api/v1/youtube/search \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"query": "<string>",
"uploadDate": "<string>",
"sortBy": "<string>",
"filter": "<string>",
"continuationToken": "<string>",
"includeExtras": "<string>"
}
'import requests
url = "https://app.dumplingai.com/api/v1/youtube/search"
payload = {
"query": "<string>",
"uploadDate": "<string>",
"sortBy": "<string>",
"filter": "<string>",
"continuationToken": "<string>",
"includeExtras": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
query: '<string>',
uploadDate: '<string>',
sortBy: '<string>',
filter: '<string>',
continuationToken: '<string>',
includeExtras: '<string>'
})
};
fetch('https://app.dumplingai.com/api/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://app.dumplingai.com/api/v1/youtube/search",
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([
'query' => '<string>',
'uploadDate' => '<string>',
'sortBy' => '<string>',
'filter' => '<string>',
'continuationToken' => '<string>',
'includeExtras' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.dumplingai.com/api/v1/youtube/search"
payload := strings.NewReader("{\n \"query\": \"<string>\",\n \"uploadDate\": \"<string>\",\n \"sortBy\": \"<string>\",\n \"filter\": \"<string>\",\n \"continuationToken\": \"<string>\",\n \"includeExtras\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.dumplingai.com/api/v1/youtube/search")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"query\": \"<string>\",\n \"uploadDate\": \"<string>\",\n \"sortBy\": \"<string>\",\n \"filter\": \"<string>\",\n \"continuationToken\": \"<string>\",\n \"includeExtras\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.dumplingai.com/api/v1/youtube/search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"query\": \"<string>\",\n \"uploadDate\": \"<string>\",\n \"sortBy\": \"<string>\",\n \"filter\": \"<string>\",\n \"continuationToken\": \"<string>\",\n \"includeExtras\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"videos": [
{
"id": "<string>",
"title": "<string>",
"thumbnail": "<string>",
"url": "<string>",
"type": "<string>",
"publishDateText": "<string>",
"publishDate": "2023-11-07T05:31:56Z",
"viewCountText": "<string>",
"viewCountInt": 123,
"lengthText": "<string>",
"channel": {}
}
],
"channels": [
{}
],
"playlists": [
{}
],
"shorts": [
{
"id": "<string>",
"title": "<string>",
"thumbnail": "<string>",
"url": "<string>",
"type": "<string>",
"publishDateText": "<string>",
"publishDate": "2023-11-07T05:31:56Z",
"viewCountText": "<string>",
"viewCountInt": 123,
"lengthText": "<string>",
"channel": {}
}
],
"continuationToken": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Data APIs
YouTube Search
Perform keyword searches across videos, shorts, or channels with pagination.
POST
/
api
/
v1
/
youtube
/
search
Search YouTube
curl --request POST \
--url https://app.dumplingai.com/api/v1/youtube/search \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"query": "<string>",
"uploadDate": "<string>",
"sortBy": "<string>",
"filter": "<string>",
"continuationToken": "<string>",
"includeExtras": "<string>"
}
'import requests
url = "https://app.dumplingai.com/api/v1/youtube/search"
payload = {
"query": "<string>",
"uploadDate": "<string>",
"sortBy": "<string>",
"filter": "<string>",
"continuationToken": "<string>",
"includeExtras": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
query: '<string>',
uploadDate: '<string>',
sortBy: '<string>',
filter: '<string>',
continuationToken: '<string>',
includeExtras: '<string>'
})
};
fetch('https://app.dumplingai.com/api/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://app.dumplingai.com/api/v1/youtube/search",
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([
'query' => '<string>',
'uploadDate' => '<string>',
'sortBy' => '<string>',
'filter' => '<string>',
'continuationToken' => '<string>',
'includeExtras' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.dumplingai.com/api/v1/youtube/search"
payload := strings.NewReader("{\n \"query\": \"<string>\",\n \"uploadDate\": \"<string>\",\n \"sortBy\": \"<string>\",\n \"filter\": \"<string>\",\n \"continuationToken\": \"<string>\",\n \"includeExtras\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.dumplingai.com/api/v1/youtube/search")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"query\": \"<string>\",\n \"uploadDate\": \"<string>\",\n \"sortBy\": \"<string>\",\n \"filter\": \"<string>\",\n \"continuationToken\": \"<string>\",\n \"includeExtras\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.dumplingai.com/api/v1/youtube/search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"query\": \"<string>\",\n \"uploadDate\": \"<string>\",\n \"sortBy\": \"<string>\",\n \"filter\": \"<string>\",\n \"continuationToken\": \"<string>\",\n \"includeExtras\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"videos": [
{
"id": "<string>",
"title": "<string>",
"thumbnail": "<string>",
"url": "<string>",
"type": "<string>",
"publishDateText": "<string>",
"publishDate": "2023-11-07T05:31:56Z",
"viewCountText": "<string>",
"viewCountInt": 123,
"lengthText": "<string>",
"channel": {}
}
],
"channels": [
{}
],
"playlists": [
{}
],
"shorts": [
{
"id": "<string>",
"title": "<string>",
"thumbnail": "<string>",
"url": "<string>",
"type": "<string>",
"publishDateText": "<string>",
"publishDate": "2023-11-07T05:31:56Z",
"viewCountText": "<string>",
"viewCountInt": 123,
"lengthText": "<string>",
"channel": {}
}
],
"continuationToken": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Description
This endpoint searches YouTube and returns matching videos, channels, playlists, shorts, and other content types. Perfect for content discovery, research, and finding specific types of educational or business content.Endpoint
POST https://app.dumplingai.com/api/v1/youtube/search
Headers
- Content-Type:
application/json - Authorization: Bearer
<API_KEY>(required)
Request Body
{
"query": "string", // Required. Search query
"uploadDate": "string", // Optional. Filter by upload date
"sortBy": "string", // Optional. Sort results
"filter": "string", // Optional. Filter by content type
"continuationToken": "string", // Optional. Token for pagination
"includeExtras": "string" // Optional. Include additional metadata (slower response)
}
Accepted Values for uploadDate
| Value | Description |
|---|---|
| hour | Uploaded in the last hour |
| today | Uploaded today |
| week | Uploaded this week |
| month | Uploaded this month |
| year | Uploaded this year |
Accepted Values for sortBy
| Value | Description |
|---|---|
| relevance | Sort by relevance (default) |
| date | Sort by upload date |
| viewCount | Sort by view count |
| rating | Sort by rating |
Accepted Values for filter
| Value | Description |
|---|---|
| video | Videos only |
| channel | Channels only |
| playlist | Playlists only |
| short | Shorts only |
| live | Live streams only |
| movie | Movies only |
Responses
Success (200)
Returns search results organized by content type with pagination support.{
"videos": [
{
"type": "video",
"id": "Mus_vwhTCq0",
"url": "https://www.youtube.com/watch?v=Mus_vwhTCq0",
"title": "Full Stack Web Development Tutorial - Build a Complete App",
"thumbnail": "https://i.ytimg.com/vi/Mus_vwhTCq0/hq720.jpg",
"channel": {
"id": "UCFbNIlppjAuEX4znoulh0Cw",
"title": "Web Dev Simplified",
"handle": "webdevsimplified",
"thumbnail": "https://yt3.ggpht.com/ytc/AIdro_l3ee46SNWQDE..."
},
"viewCountText": "425,891 views",
"viewCountInt": 425891,
"publishedTimeText": "3 months ago",
"publishedTime": "2024-10-15T17:08:46.499Z",
"lengthText": "2:14:32",
"lengthSeconds": 8072,
"badges": ["4K", "CC"]
}
],
"channels": [
{
"type": "channel",
"id": "UCWv7vMbMWH4-V0ZXdmDpPBA",
"title": "Programming with Mosh",
"handle": "programmingwithmosh",
"thumbnail": "https://yt3.ggpht.com/ytc/AIdro_nBgMGIxgHeh...",
"subscriberCountText": "3.2M subscribers",
"description": "I train programmers through my online courses and YouTube channel..."
}
],
"shorts": [
{
"type": "short",
"id": "dM-Q7WKqt8I",
"url": "https://www.youtube.com/watch?v=dM-Q7WKqt8I",
"title": "CSS Grid vs Flexbox in 60 seconds",
"thumbnail": "https://i.ytimg.com/vi/dM-Q7WKqt8I/hq720.jpg",
"channel": {
"id": "UCFbNIlppjAuEX4znoulh0Cw",
"title": "Web Dev Simplified",
"handle": "webdevsimplified",
"thumbnail": "https://yt3.ggpht.com/ytc/AIdro_l3ee46SNWQDE..."
},
"viewCountText": "89,432 views",
"viewCountInt": 89432,
"publishedTimeText": "2 weeks ago",
"publishedTime": "2025-01-14T17:08:46.499Z",
"lengthText": "0:58",
"lengthSeconds": 58,
"badges": []
}
],
"playlists": [
{
"type": "playlist",
"id": "PLZlA0Gpn_vH_uZs4vJMIhcinABSTUH2bY",
"title": "Complete React Tutorial Series",
"thumbnail": "https://i.ytimg.com/vi/Mus_vwhTCq0/hqdefault.jpg",
"channel": {
"title": "Net Ninja",
"id": "UCW5YeuERMmlnqo4oq8vwUpg"
},
"videoCount": 35
}
],
"shelves": [
{
"type": "shelf",
"title": "Latest tutorials",
"items": [
{
"type": "video",
"id": "example123",
"title": "React Hooks Tutorial",
"thumbnail": "https://i.ytimg.com/vi/example123/hqdefault.jpg"
}
]
}
],
"lives": [],
"continuationToken": "EooDEg..."
}
- Content-Type: application/json
- X-RateLimit-Limit: The rate limit for the user
- X-RateLimit-Remaining: The remaining number of requests for the user
Bad Request (400)
Returned if the request is invalid or missing required parameters.{
"error": "'query' parameter is required and must be a non-empty string. Please provide a search term."
}
Bad Gateway (502)
Returned if the external service is unavailable or returns invalid data.{
"error": "Failed to search YouTube"
}
Internal Server Error (500)
Returned if there’s an unexpected server error.{
"error": "An unexpected server error occurred while searching YouTube"
}
Example Request
curl -X POST https://app.dumplingai.com/api/v1/youtube/search \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"query": "web development tutorial",
"filter": "video",
"sortBy": "viewCount",
"uploadDate": "month"
}'
Example Response
{
"videos": [
{
"type": "video",
"id": "Mus_vwhTCq0",
"url": "https://www.youtube.com/watch?v=Mus_vwhTCq0",
"title": "Full Stack Web Development Tutorial - Build a Complete App",
"thumbnail": "https://i.ytimg.com/vi/Mus_vwhTCq0/hq720.jpg",
"channel": {
"id": "UCFbNIlppjAuEX4znoulh0Cw",
"title": "Web Dev Simplified",
"handle": "webdevsimplified",
"thumbnail": "https://yt3.ggpht.com/ytc/AIdro_l3ee46SNWQDE3tpPXONvTIEN2ZFGF7DMRLSc4kPx1zhEQ=s68-c-k-c0x00ffffff-no-rj"
},
"viewCountText": "425,891 views",
"viewCountInt": 425891,
"publishedTimeText": "3 months ago",
"publishedTime": "2024-10-15T17:08:46.499Z",
"lengthText": "2:14:32",
"lengthSeconds": 8072,
"badges": ["4K", "CC"]
}
],
"channels": [],
"playlists": [],
"shorts": [],
"shelves": [],
"lives": [],
"continuationToken": "EooDEg..."
}
Notes
- The
queryparameter is required and must be a non-empty string - Use filters to narrow down results to specific content types (videos, channels, playlists, etc.)
- The
continuationTokenfrom the response can be used to fetch additional pages of results - Setting
includeExtrasto “true” includes additional metadata like like/comment counts but may slow down the response - Search results are organized by content type in separate arrays
- This endpoint uses 10 credits per request
- Results are paginated - use the
continuationTokento retrieve additional pages
Rate Limiting
Rate limit headers (X-RateLimit-Limit and X-RateLimit-Remaining) are included in the response to indicate the user’s current rate limit status.Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Optional upload-date filter forwarded to the upstream provider.
Optional sort mode forwarded to the upstream provider.
Optional result filter forwarded to the upstream provider.
Optional upstream flag forwarded to request additional metadata.
Optional identifier describing where the API request originated.
Available options:
API, WEB, MAKE_DOT_COM, ZAPIER, N8N, PLAYGROUND, DEFAULT_AUTOMATION, AGENT_PREVIEW, AGENT_LIVE, AUTOPILOT, STUDIO