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

# YouTube



## OpenAPI

````yaml https://emerge-openapi-specs.s3.eu-central-1.amazonaws.com/query/1.21.0/openapi.json get /v1/youtube
openapi: 3.1.0
info:
  title: Emerge Query API
  description: >-
    Privacy-first API for retrieving consented user data. Query provides
    asynchronous and synchronous endpoints for accessing search, browsing,
    YouTube, ads, and receipt data.
  contact:
    name: Emerge Support
    email: account@emergedata.ai
  version: 1.21.0
servers:
  - url: https://query.emergedata.ai
    description: Query API - Data retrieval
security: []
tags:
  - name: Query Async
    description: Asynchronous data queries with job polling
  - name: Query Sync
    description: Synchronous data queries with immediate response
  - name: Jobs
    description: Job status and management
paths:
  /v1/youtube:
    get:
      tags:
        - Query Async
      summary: YouTube
      operationId: youtube_v1_youtube_get
      parameters:
        - name: begin
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            description: Filter by event timestamp (start)
            title: Begin
          description: Filter by event timestamp (start)
        - name: end
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            description: Filter by event timestamp (end)
            title: End
          description: Filter by event timestamp (end)
        - name: user_ids
          in: query
          required: false
          schema:
            anyOf:
              - type: array
                items:
                  type: string
                maxItems: 25
              - type: 'null'
            description: User IDs to filter by (max 25)
            title: User Ids
          description: User IDs to filter by (max 25)
        - name: category
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Category subtree to filter by
            title: Category
          description: Category subtree to filter by
        - name: ingested_begin
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            description: Filter by ingestion timestamp (start)
            title: Ingested Begin
          description: Filter by ingestion timestamp (start)
        - name: ingested_end
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            description: Filter by ingestion timestamp (end)
            title: Ingested End
          description: Filter by ingestion timestamp (end)
      requestBody:
        content:
          application/json:
            schema:
              anyOf:
                - type: array
                  items:
                    type: string
                  maxItems: 25
                - type: 'null'
              deprecated: true
              title: Users
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateJobResponse'
              examples:
                default:
                  summary: Example response
                  value:
                    job_id: 82f80278-5e76-4d01-8f1d-b55e08f12a52
                    status: RUNNING
        '401':
          description: Unauthorized
          content:
            application/json:
              example:
                detail: Invalid token
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - bearerAuth: []
components:
  schemas:
    CreateJobResponse:
      properties:
        job_id:
          type: string
          title: Job Id
        status:
          $ref: '#/components/schemas/JobStatus'
      type: object
      title: CreateJobResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    JobStatus:
      type: string
      enum:
        - RUNNING
        - COMPLETED
        - FAILED
      title: JobStatus
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      title: ValidationError
  securitySchemes:
    bearerAuth:
      type: http
      description: >-
        API token from the Control Room. Include as `Authorization: Bearer
        <token>`
      scheme: bearer

````