> **For AI agents:** this page is a focused, LLM-optimized view of a
> single Fiber AI operation. Before calling it, fetch the routing
> instructions at [`https://api.fiber.ai/llms.txt`](https://api.fiber.ai/llms.txt) and the full operation
> index at [`https://api.fiber.ai/ai-docs/index.md`](https://api.fiber.ai/ai-docs/index.md).

# youtubeChannel

`POST /v1/youtube/channel`

**Tags:** `YouTube`

Fetch YouTube channel info and videos

**Endpoint:** `https://api.fiber.ai/v1/youtube/channel`

## Description

Fetches metadata and videos for a YouTube channel. Returns subscriber count, description, video count, total views, and a paginated list of videos. Use `nextPageToken` from the response to paginate through additional video pages.

⚡ Rate limit: 60 requests per 1 minute

💰 Cost: 2 credits per page of results ⓘ

## Request body (JSON Schema)

```json
{
  "type": "object",
  "properties": {
    "apiKey": {
      "type": "string",
      "description": "Your Fiber API key"
    },
    "channelIdentifier": {
      "type": "string",
      "minLength": 1,
      "description": "YouTube channel @handle, channel ID, or full channel URL. Accepts a @handle (e.g. '@veritasium'), a channel ID (e.g. 'UCBcRF18a7Qf58cCRy5xuWwQ'), or a URL (e.g. 'https://www.youtube.com/@veritasium')."
    },
    "nextPageToken": {
      "type": [
        "string",
        "null"
      ],
      "description": "Pagination token from a previous response to retrieve the next page of channel videos. Omit for the first page."
    }
  },
  "required": [
    "apiKey",
    "channelIdentifier"
  ]
}
```

## Response — success (JSON Schema)

```json
{
  "type": "object",
  "properties": {
    "output": {
      "type": "object",
      "properties": {
        "channel": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string",
              "description": "YouTube channel ID."
            },
            "name": {
              "type": "string",
              "description": "Channel display name."
            },
            "url": {
              "type": [
                "string",
                "null"
              ],
              "description": "URL to the channel page."
            },
            "subscriberCount": {
              "type": [
                "number",
                "null"
              ],
              "description": "Number of subscribers."
            },
            "description": {
              "type": [
                "string",
                "null"
              ],
              "description": "Channel description."
            },
            "countryCode": {
              "type": [
                "string",
                "null"
              ],
              "description": "Country associated with the channel (may be a full name or an ISO code)."
            },
            "videoCount": {
              "type": [
                "number",
                "null"
              ],
              "description": "Total number of videos on the channel."
            },
            "viewCount": {
              "type": [
                "number",
                "null"
              ],
              "description": "Total view count across all videos."
            }
          },
          "required": [
            "id",
            "name"
          ],
          "description": "Channel metadata."
        },
        "videos": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "description": "YouTube video ID — the unique identifier found in the URL. For example, in 'https://www.youtube.com/watch?v=094y1Z2wpJg', the video ID is '094y1Z2wpJg'."
              },
              "title": {
                "type": "string",
                "description": "Video title."
              },
              "url": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "URL to the video."
              },
              "publishedAt": {
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "date": {
                    "type": "string",
                    "description": "ISO 8601 date string (e.g. '2024-03-15T00:00:00.000Z')."
                  },
                  "estimated": {
                    "type": "boolean",
                    "description": "True when the date was estimated from an approximate time string (e.g. '2 years ago'). False when an exact date was available."
                  }
                },
                "required": [
                  "date",
                  "estimated"
                ],
                "description": "Publication date. When YouTube only provides approximate time (e.g. '2 years ago'), we estimate the date and set `estimated: true`."
              },
              "viewCount": {
                "type": [
                  "number",
                  "null"
                ],
                "description": "Number of views."
              },
              "durationSeconds": {
                "type": [
                  "number",
                  "null"
                ],
                "description": "Video duration in seconds."
              },
              "thumbnailUrl": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "URL of the video thumbnail."
              }
            },
            "required": [
              "id",
              "title"
            ]
          },
          "description": "Videos on this page."
        },
        "nextPageToken": {
          "type": [
            "string",
            "null"
          ],
          "description": "Token to retrieve the next page of channel videos. Pass this as `nextPageToken` in the next request. Null if there are no more pages."
        }
      },
      "required": [
        "channel",
        "videos"
      ]
    },
    "chargeInfo": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "method": {
              "type": "string",
              "enum": [
                "charged-now"
              ]
            },
            "creditsCharged": {
              "type": "number"
            },
            "lowCreditAlert": {
              "type": [
                "object",
                "null"
              ],
              "properties": {
                "getMoreCreditsUrl": {
                  "type": "string",
                  "format": "uri",
                  "description": "URL to top up credits or restart billing cycle to get fresh credits."
                },
                "message": {
                  "type": "string",
                  "description": "Human-readable credits warning."
                },
                "availableCredits": {
                  "type": "number",
                  "description": "Number of credits remaining in the current billing period."
                }
              },
              "required": [
                "getMoreCreditsUrl",
                "message",
                "availableCredits"
              ],
              "description": "Contains a link to get more credits, a warning message, and the remaining credit count."
            }
          },
          "required": [
            "method",
            "creditsCharged"
          ],
          "description": "Credits were charged immediately for this operation"
        },
        {
          "type": "object",
          "properties": {
            "method": {
              "type": "string",
              "enum": [
                "charging-later"
              ]
            },
            "message": {
              "type": "string"
            },
            "lowCreditAlert": {
              "type": [
                "object",
                "null"
              ],
              "properties": {
                "getMoreCreditsUrl": {
                  "type": "string",
                  "format": "uri",
                  "description": "URL to top up credits or restart billing cycle to get fresh credits."
                },
                "message": {
                  "type": "string",
                  "description": "Human-readable credits warning."
                },
                "availableCredits": {
                  "type": "number",
                  "description": "Number of credits remaining in the current billing period."
                }
              },
              "required": [
                "getMoreCreditsUrl",
                "message",
                "availableCredits"
              ],
              "description": "Contains a link to get more credits, a warning message, and the remaining credit count."
            }
          },
          "required": [
            "method",
            "message"
          ],
          "description": "Credits will be charged after the operation completes"
        },
        {
          "type": "object",
          "properties": {
            "method": {
              "type": "string",
              "enum": [
                "charged-for-async-process"
              ]
            },
            "creditsCharged": {
              "type": "number"
            },
            "message": {
              "type": "string"
            },
            "lowCreditAlert": {
              "type": [
                "object",
                "null"
              ],
              "properties": {
                "getMoreCreditsUrl": {
                  "type": "string",
                  "format": "uri",
                  "description": "URL to top up credits or restart billing cycle to get fresh credits."
                },
                "message": {
                  "type": "string",
                  "description": "Human-readable credits warning."
                },
                "availableCredits": {
                  "type": "number",
                  "description": "Number of credits remaining in the current billing period."
                }
              },
              "required": [
                "getMoreCreditsUrl",
                "message",
                "availableCredits"
              ],
              "description": "Contains a link to get more credits, a warning message, and the remaining credit count."
            }
          },
          "required": [
            "method",
            "creditsCharged",
            "message"
          ],
          "description": "Credits that were charged for an asynchronous operation"
        },
        {
          "type": "object",
          "properties": {
            "method": {
              "type": "string",
              "enum": [
                "free"
              ]
            },
            "message": {
              "type": "string"
            },
            "lowCreditAlert": {
              "type": [
                "object",
                "null"
              ],
              "properties": {
                "getMoreCreditsUrl": {
                  "type": "string",
                  "format": "uri",
                  "description": "URL to top up credits or restart billing cycle to get fresh credits."
                },
                "message": {
                  "type": "string",
                  "description": "Human-readable credits warning."
                },
                "availableCredits": {
                  "type": "number",
                  "description": "Number of credits remaining in the current billing period."
                }
              },
              "required": [
                "getMoreCreditsUrl",
                "message",
                "availableCredits"
              ],
              "description": "Contains a link to get more credits, a warning message, and the remaining credit count."
            }
          },
          "required": [
            "method",
            "message"
          ],
          "description": "No credits were charged for this operation"
        },
        {
          "type": "object",
          "properties": {
            "method": {
              "type": "string",
              "enum": [
                "credits-refunded"
              ]
            },
            "creditsRefunded": {
              "type": "number"
            },
            "message": {
              "type": "string"
            },
            "lowCreditAlert": {
              "type": [
                "object",
                "null"
              ],
              "properties": {
                "getMoreCreditsUrl": {
                  "type": "string",
                  "format": "uri",
                  "description": "URL to top up credits or restart billing cycle to get fresh credits."
                },
                "message": {
                  "type": "string",
                  "description": "Human-readable credits warning."
                },
                "availableCredits": {
                  "type": "number",
                  "description": "Number of credits remaining in the current billing period."
                }
              },
              "required": [
                "getMoreCreditsUrl",
                "message",
                "availableCredits"
              ],
              "description": "Contains a link to get more credits, a warning message, and the remaining credit count."
            }
          },
          "required": [
            "method",
            "creditsRefunded",
            "message"
          ],
          "description": "Credits were refunded for this operation"
        }
      ]
    },
    "warnings": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": "object",
        "properties": {
          "field": {
            "type": "string",
            "description": "Full path to extraneous field (e.g., 'searchParams.ExtraField')"
          },
          "message": {
            "type": "string",
            "description": "Warning message"
          }
        },
        "required": [
          "field",
          "message"
        ]
      },
      "description": "Warnings about extraneous fields in request"
    },
    "advice": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": "string"
      },
      "description": "Tips, recommendations, and suggestions for using this API effectively."
    }
  },
  "required": [
    "output",
    "chargeInfo"
  ],
  "additionalProperties": false
}
```

---

Canonical JSON: [`https://api.fiber.ai/openapi.json`](https://api.fiber.ai/openapi.json)
Operation index: [`https://api.fiber.ai/ai-docs/index.md`](https://api.fiber.ai/ai-docs/index.md)
