Skip to content

YouTube Channel Search API

GET https://api.fetchproof.com/v1/youtube/channel/search

Provide one of: handle, continuationToken. Search within one YouTube channel by keyword. Returns videos, Shorts, live streams and playlists. Costs 1 credit per page, even with no matches.

Default cost: 1 credit per call 0 credits on error
Code & Payload

Quick start

Open interactive playground in Docs ↗

cURL

curl --request GET 'https://api.fetchproof.com/v1/youtube/channel/search?handle=NASA&query=mars' \
  --header 'x-api-key: YOUR_API_KEY'

JavaScript

const response = await fetch("https://api.fetchproof.com/v1/youtube/channel/search?handle=NASA&query=mars", {
  method: 'GET',
  headers: {
    'x-api-key': process.env.FETCHPROOF_API_KEY,
  },
});
const data = await response.json();
console.log(data);

Python

import os
import requests

response = requests.get(
    "https://api.fetchproof.com/v1/youtube/channel/search?handle=NASA&query=mars",
    headers={"x-api-key": os.environ["FETCHPROOF_API_KEY"]},
)
print(response.json())

Go

package main

import (
  "fmt"
  "io"
  "net/http"
  "os"
)

func main() {
  req, _ := http.NewRequest("GET", "https://api.fetchproof.com/v1/youtube/channel/search?handle=NASA&query=mars", nil)
  req.Header.Set("x-api-key", os.Getenv("FETCHPROOF_API_KEY"))
  res, _ := http.DefaultClient.Do(req)
  defer res.Body.Close()
  body, _ := io.ReadAll(res.Body)
  fmt.Println(string(body))
}

PHP

<?php
$ch = curl_init("https://api.fetchproof.com/v1/youtube/channel/search?handle=NASA&query=mars");
curl_setopt_array($ch, [
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => [
    'x-api-key: ' . getenv('FETCHPROOF_API_KEY'),
  ],
]);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
{
  "success": true,
  "credits_remaining": 100,
  "credits_charged": 1,
  "videos": [
    {
      "type": "video",
      "id": "4czjS9h4Fpg",
      "url": "https://www.youtube.com/watch?v=4czjS9h4Fpg",
      "title": "Perseverance Rover’s Descent and Touchdown on Mars (Official NASA Video)",
      "thumbnail": "https://i.ytimg.com/vi/4czjS9h4Fpg/hqdefault.jpg?sqp=-oaymwEcCNACELwBSFXyq4qpAw4IARUAAIhCGAFwAcABBg==&rs=AOn4CLDtiAfOuC4lgjiMxXeJ3qIh7uV6Zg",
      "channel": {
        "id": "UCLA_DiR1FfKNvjuUpBHmylQ",
        "title": "NASA",
        "handle": "@NASA",
        "thumbnail": "https://yt3.googleusercontent.com/eIf5fNPcIcj9ig-wZBeq4stFy1lgjWTW1nLT5dYlFkHZprZ03QBiMcbpwNMB6XSBjrSFGtAGQg=s68-c-k-c0x00ffffff-no-rj"
      },
      "viewCountText": "17,980,309 views",
      "viewCountInt": 17980309,
      "publishedTimeText": "5y ago",
      "publishedTime": null,
      "lengthText": "3:26",
      "lengthSeconds": 206,
      "badges": [
        "CC"
      ]
    },
    {
      "type": "video",
      "id": "MVTyRNbsqk8",
      "url": "https://www.youtube.com/watch?v=MVTyRNbsqk8",
      "title": "NASA's Mars Curiosity Rover Report #8",
      "thumbnail": "https://i.ytimg.com/vi/MVTyRNbsqk8/hqdefault.jpg?sqp=-oaymwE2CNACELwBSFXyq4qpAygIARUAAIhCGAFwAcABBvABAfgB_gmAAtAFigIMCAAQARhlIGIoUTAP&rs=AOn4CLAgJ8XkFRiMar1iuT1TegGZIccgoQ",
      "channel": {
        "id": "UCLA_DiR1FfKNvjuUpBHmylQ",
        "title": "NASA",
        "handle": "@NASA",
        "thumbnail": "https://yt3.googleusercontent.com/eIf5fNPcIcj9ig-wZBeq4stFy1lgjWTW1nLT5dYlFkHZprZ03QBiMcbpwNMB6XSBjrSFGtAGQg=s68-c-k-c0x00ffffff-no-rj"
      },
      "viewCountText": "38,580 views",
      "viewCountInt": 38580,
      "publishedTimeText": "14y ago",
      "publishedTime": null,
      "lengthText": "2:55",
      "lengthSeconds": 175,
      "badges": [
        "CC"
      ]
    },
    {
      "type": "video",
      "id": "FrIWSA1Blxo",
      "url": "https://www.youtube.com/watch?v=FrIWSA1Blxo",
      "title": "Have Humans Ever Visited Mars? We Asked a NASA Scientist",
      "thumbnail": "https://i.ytimg.com/vi/FrIWSA1Blxo/hqdefault.jpg?sqp=-oaymwEcCNACELwBSFXyq4qpAw4IARUAAIhCGAFwAcABBg==&rs=AOn4CLDHh877JNlXGbE_ei8FhnTQK_VCFg",
      "channel": {
        "id": "UCLA_DiR1FfKNvjuUpBHmylQ",
        "title": "NASA",
        "handle": "@NASA",
        "thumbnail": "https://yt3.googleusercontent.com/eIf5fNPcIcj9ig-wZBeq4stFy1lgjWTW1nLT5dYlFkHZprZ03QBiMcbpwNMB6XSBjrSFGtAGQg=s68-c-k-c0x00ffffff-no-rj"
      },
      "viewCountText": "72,938 views",
      "viewCountInt": 72938,
      "publishedTimeText": "3y ago",
      "publishedTime": null,
      "lengthText": "1:43",
      "lengthSeconds": 103,
      "badges": [
        "CC"
      ]
    }
  ],
  "channels": [],
  "playlists": [
    {
      "type": "playlist",
      "id": "PL2aBZuCeDwlRF14ds9UR1uVpLRjDQy7d5",
      "title": "Perseverance Mars Rover",
      "thumbnail": "https://i.ytimg.com/vi/SAPaWLQbU_s/hqdefault.jpg?sqp=-oaymwEXCOADEI4CSFryq4qpAwkIARUAAIhCGAE=&rs=AOn4CLD9gH4_btvI0VGPlpAUu9M5xnnW2A",
      "channel": {
        "id": "UCLA_DiR1FfKNvjuUpBHmylQ",
        "title": "NASA"
      },
      "videoCount": "113"
    }
  ],
  "shorts": [],
  "shelves": [],
  "lives": [],
  "continuationToken": "4qmFsgJ0EhhVQ0xBX0RpUjFGZktOdmp1VXBCSG15bFEaJkNCNFNCbk5sWVhKamFEQUJPQUZnQVdvQWVnTkhRalM0QVFBJTNEWgRtYXJzmgIpYnJvd3NlLWZlZWRVQ0xBX0RpUjFGZktOdmp1VXBCSG15bFFzZWFyY2g%3D"
}
Response JSON · /v1/youtube/channel/search

What it returns

success boolean
credits_remaining integer
credits_charged integer
videos array
channels array
playlists array
shorts array
shelves array
lives array
continuationToken string

Parameters

handle string query required

YouTube channel handle, with or without @.

query string query required

Keywords to search within this channel.

continuationToken string query optional

Token from the previous response. Keep the same handle and query; stop when the token is null.

Use cases

Billing

Errors cost zero credits. Empty results follow this operation’s rules.

Default: 1 credit

An empty result costs 0 credits.

How charges are determined

Cost is decided per call, not per endpoint: the same operation can cost different amounts depending on what it returns.

A call that fails costs 0 credits. A result served from cache costs 0 credits.

`default` is the cost when no rule matches. Rules are evaluated in order and the first whose conditions all hold wins.

A `when` condition is one of: `param` (the request parameter is true), `outcome` (the classifier's outcome), `empty` / `nonEmpty` (a response field is empty and absent, or a non-empty array or string), `flag` (a response field is exactly true).

A cost of `{ perStartedMinute: n, of: [fields] }` is n x max(1, ceil(seconds / 60)), so even a short result bills at least one minute.

FAQ

How much does the YouTube Channel Search API cost?

A call costs 1 credit by default. Errors cost 0 credits. New accounts get 100 free credits with no card. After that, credits come in one-time packs that never expire: 25,000 for $27 and 500,000 for $297 (plus any tax). There is no subscription.

What do I need to call it?

An API key in the x-api-key header, plus handle and query, and one of handle or continuationToken. You don't need a YouTube account or developer app.

What does it return?

Typed JSON. Top-level fields include videos, channels, playlists, shorts, shelves and lives. The full schema and a real sample response are on this page and in the API reference.

Is this an official YouTube API?

No. Fetchproof is an unofficial API that returns public YouTube data only.