> ## Documentation Index
> Fetch the complete documentation index at: https://docs.scoutlayer.io/llms.txt
> Use this file to discover all available pages before exploring further.

# YouTube Channel Videos API

> Recent videos from a channel, newest first.



## OpenAPI

````yaml openapi.json GET /v1/youtube/channels/{handle}/videos
openapi: 3.0.0
info:
  title: ScoutLayer API
  version: 1.0.0
  description: Competitor data. One API.
servers:
  - url: https://api.scoutlayer.io
    description: Production
security:
  - ApiKeyAuth: []
  - BearerAuth: []
paths:
  /v1/youtube/channels/{handle}/videos:
    get:
      tags:
        - youtube
        - channels
        - videos
      summary: Get one page of a YouTube channel's videos
      description: Recent videos from a channel, newest first.
      parameters:
        - schema:
            type: string
            minLength: 1
            example: shopify
          required: true
          name: handle
          in: path
        - schema:
            type: string
            enum:
              - newest
              - popular
              - oldest
          required: false
          name: sort
          in: query
        - schema:
            type: string
          required: false
          name: cursor
          in: query
      responses:
        '200':
          description: Get one page of a YouTube channel's videos
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/YouTubeVideoList'
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '402':
          description: Insufficient credits
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '501':
          description: This endpoint is declared but not yet implemented — never charged
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '502':
          description: The orchestrator failed or was unreachable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - ApiKeyAuth: []
        - BearerAuth: []
components:
  schemas:
    YouTubeVideoList:
      type: object
      properties:
        videos:
          type: array
          items:
            $ref: '#/components/schemas/YouTubeVideo'
        nextCursor:
          type: string
          nullable: true
          description: >-
            Opaque pagination cursor — pass as ?cursor= for the next page; null
            on the last page
        hasMore:
          type: boolean
      required:
        - videos
        - nextCursor
        - hasMore
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              example: NOT_FOUND
            message:
              type: string
          required:
            - code
            - message
      required:
        - error
    YouTubeVideo:
      type: object
      properties:
        videoId:
          type: string
        url:
          type: string
        title:
          type: string
        description:
          type: string
        publishedAt:
          type: string
        durationMs:
          type: integer
        thumbnailUrl:
          type: string
        contentType:
          type: string
          enum:
            - video
            - short
            - live
        keywords:
          type: array
          items:
            type: string
        category:
          type: string
          nullable: true
        hasCaptions:
          type: boolean
        chapters:
          type: array
          items:
            type: object
            properties:
              title:
                type: string
              startMs:
                type: integer
            required:
              - title
              - startMs
        metrics:
          type: object
          properties:
            views:
              type: integer
            likes:
              type: integer
              nullable: true
            comments:
              type: integer
              nullable: true
          required:
            - views
            - likes
            - comments
        channel:
          type: object
          properties:
            channelId:
              type: string
            handle:
              type: string
            name:
              type: string
          required:
            - channelId
            - handle
            - name
      required:
        - videoId
        - url
        - title
        - description
        - publishedAt
        - durationMs
        - thumbnailUrl
        - contentType
        - keywords
        - category
        - hasCaptions
        - chapters
        - metrics
        - channel
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: >-
        API key passed as the X-API-Key request header. Recommended for
        server-to-server calls.
    BearerAuth:
      type: http
      scheme: bearer
      description: >-
        API key (or OAuth token) passed as a Bearer token in the Authorization
        header.

````