# YouTube Channel Search API

> Retrieve channel search from YouTube with a single API request.

- Request: `GET https://fetchgoblin.com/api/data/v1/youtube/channel/search`
- Cost: 1 credit per successful request. Failed requests are not charged.
- Authentication: `x-api-key` header
- HTML reference: https://fetchgoblin.com/docs/get-v1-youtube-channel-search
- MCP: call tool `call_endpoint` with `endpoint_id: "get-v1-youtube-channel-search"` at https://fetchgoblin.com/mcp

## Query parameters

| Parameter | Required | Type | Description |
| --- | --- | --- | --- |
| `handle` | yes | string | YouTube channel handle, with or without @. Example: `NASA` |
| `query` | yes | string | Keywords to search within this channel. Example: `artemis` |
| `continuationToken` | no | string | Token from the previous response. Keep the same handle and query; stop when the token is null. |

## Example request

```sh
curl --request GET 'https://fetchgoblin.com/api/data/v1/youtube/channel/search?handle=NASA&query=artemis' \
  --header "x-api-key: $FETCHGOBLIN_API_KEY"
```

## Example response

Some platform fields may be absent or null. Every response also includes `credits_charged`, `credits_remaining` and `request_id`.

```json
{
  "success": true,
  "videos": [
    {
      "type": "video",
      "id": "_eeZQw9PBc0",
      "url": "https://www.youtube.com/watch?v=_eeZQw9PBc0",
      "title": "Artemis II Launches Astronauts to the Moon (Official NASA Recap)",
      "thumbnail": "https://i.ytimg.com/vi/_eeZQw9PBc0/hqdefault.jpg?sqp=-oaymwEnCNACELwBSFryq4qpAxkIARUAAIhCGAHYAQHiAQoIGBACGAY4AUAB&rs=AOn4CLC59RvmXk61RYq4qq4Wv2WFDDJQcA",
      "channel": {
        "id": "UCLA_DiR1FfKNvjuUpBHmylQ",
        "title": "NASA",
        "handle": "NASA",
        "thumbnail": "https://yt3.googleusercontent.com/eIf5fNPcIcj9ig-wZBeq4stFy1lgjWTW1nLT5dYlFkHZprZ03QBiMcbpwNMB6XSBjrSFGtAGQg=s68-c-k-c0x00ffffff-no-rj"
      },
      "viewCountText": "1,649,926 views",
      "viewCountInt": 1649926,
      "publishedTimeText": "6mo ago",
      "publishedTime": null,
      "lengthText": "2:24",
      "lengthSeconds": 144,
      "badges": [
        "CC"
      ]
    }
  ],
  "channels": [],
  "playlists": [
    {
      "type": "playlist",
      "id": "PL2aBZuCeDwlQvNtHhNJtarm9OewQwVntv",
      "title": "Artemis II Mission Coverage",
      "thumbnail": "https://i.ytimg.com/vi/DYY4nnfxKbU/hqdefault.jpg?sqp=-oaymwEXCOADEI4CSFryq4qpAwkIARUAAIhCGAE=&rs=AOn4CLAi1OCwehE4YN4-jFbe-SlII4gyyw",
      "channel": {
        "id": "UCLA_DiR1FfKNvjuUpBHmylQ",
        "title": "NASA · Playlist"
      },
      "videoCount": "23 videos"
    }
  ],
  "shorts": [
    {
      "type": "short",
      "id": "vMGuObY8_sw",
      "url": "https://www.youtube.com/watch?v=vMGuObY8_sw",
      "title": "Relive NASA's Artemis II Launch",
      "thumbnail": "https://i.ytimg.com/vi/vMGuObY8_sw/hq2.jpg?sqp=-oaymwFBCNACELwBSFryq4qpAzMIARUAAIhCGADYAQHiAQoIGBACGAY4AUAB8AEB-AG2CIACgA-KAgwIABABGHIgWyg-MA8=&rs=AOn4CLDHJ3063Ni7HpCRBtgzI6qn9OYC6g",
      "channel": {
        "id": "UCLA_DiR1FfKNvjuUpBHmylQ",
        "title": "NASA",
        "handle": "NASA",
        "thumbnail": "https://yt3.googleusercontent.com/eIf5fNPcIcj9ig-wZBeq4stFy1lgjWTW1nLT5dYlFkHZprZ03QBiMcbpwNMB6XSBjrSFGtAGQg=s68-c-k-c0x00ffffff-no-rj"
      },
      "viewCountText": "2,724,313 views",
      "viewCountInt": 2724313,
      "publishedTimeText": "6mo ago",
      "publishedTime": null,
      "lengthText": "0:33",
      "lengthSeconds": 33,
      "badges": [
        "CC"
      ]
    }
  ],
  "shelves": [],
  "lives": [
    {
      "type": "live",
      "id": "nfhDuOHMp0A",
      "url": "https://www.youtube.com/watch?v=nfhDuOHMp0A",
      "title": "NASA’s Artemis II Crew Comes Home (Official Broadcast)",
      "thumbnail": "https://i.ytimg.com/vi/nfhDuOHMp0A/hqdefault.jpg?sqp=-oaymwEnCNACELwBSFryq4qpAxkIARUAAIhCGAHYAQHiAQoIGBACGAY4AUAB&rs=AOn4CLAjOO178lfqwhZPRUo8SdcXZDfO8w",
      "channel": {
        "id": "UCLA_DiR1FfKNvjuUpBHmylQ",
        "title": "NASA",
        "handle": "NASA",
        "thumbnail": "https://yt3.googleusercontent.com/eIf5fNPcIcj9ig-wZBeq4stFy1lgjWTW1nLT5dYlFkHZprZ03QBiMcbpwNMB6XSBjrSFGtAGQg=s68-c-k-c0x00ffffff-no-rj"
      },
      "viewCountText": "27,771,040 views",
      "viewCountInt": 27771040,
      "publishedTimeText": "Streamed 6mo ago",
      "publishedTime": null,
      "lengthText": "3:53:41",
      "lengthSeconds": 14021,
      "badges": [
        "CC"
      ]
    }
  ],
  "continuationToken": "CONTINUATION_TOKEN_FROM_RESPONSE",
  "credits_charged": 1,
  "credits_remaining": 1000,
  "request_id": "00000000-0000-4000-8000-000000000000"
}
```
