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

# Videos

> Rank cited YouTube videos, for one channel or across all of them.

Clasifica los videos de YouTube citados, para un canal o para todos. Se calcula
a partir de los datos de citas de Profound, no de YouTube Analytics.

* **Tipos de fuente:** `video`, `short`, `channel`, `playlist` u `other`.
  `other` está disponible con `unattributed` o `all`; con el modo predeterminado
  `attributed`, se rechazan las solicitudes que contienen `other`. Omite
  `source_types` para devolver `video` y `short` con el modo predeterminado
  `attributed`; `unattributed` y `all` amplían el valor predeterminado a los
  cinco tipos de fuente. Proporciona una lista no vacía; los valores duplicados
  se eliminan.
* **Atribución:** `attributed` (el valor predeterminado), `unattributed` o `all`.
  Una fila sin atribuir no tiene canal: `source_type` es `other` para una URL de
  búsqueda o de feed que no nombra ninguna fuente, y cualquier otro tipo es una
  fuente para la que no tenemos canal.
* **Agrupación y series temporales:** No se admiten. `/videos` no acepta `group_by`
  ni `interval`; los campos desconocidos se rechazan.
* **Paginación:** `limit` tiene un valor predeterminado de 10 y acepta de 1 a 50.
  Devuelve el valor opaco `info.next_cursor` como `cursor` de la solicitud para
  obtener la página siguiente; `info` repite tu `cursor` en las páginas
  posteriores a la primera. El `info` de la respuesta repite `category_id`, el
  `limit` efectivo y `attribution`.
* **Filtros:** Los campos a nivel de prompt son `model`, `topic`, `region`, `prompt`,
  `persona`, `tag` y `analysis_type`. El filtro `channel` acepta `is`,
  `in`, `contains`, `not_contains`, `contains_case_insensitive` y
  `not_contains_case_insensitive`: `is`/`in` seleccionan identificadores exactos,
  mientras que los demás operadores buscan coincidencias en los títulos o
  identificadores de los canales.
  `domain` y `page` se rechazan. Una hoja `channel` no puede compartir un `or` ni
  un `not` con una hoja a nivel de prompt; coloca las capas por separado en
  cláusulas `and`.

<Note>
  Los informes v2 comparten una forma de solicitud y un árbol de filtros. Consulta
  [Filtrado y conceptos](/es/rest-api/reports/reports-v2-overview) para ver los
  operadores de filtro, los rangos de fechas, la paginación y la profundidad de
  los filtros. Las indicaciones sobre agrupación y series temporales no se
  aplican a este endpoint.
</Note>

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST https://api.tryprofound.com/v2/reports/social/youtube/videos \
    -H "X-API-Key: <your-api-key>" \
    -H "Content-Type: application/json" \
    -d '{
      "category_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
      "start_date": "2026-06-01",
      "end_date": "2026-06-30",
      "filter": {
        "field": "channel",
        "op": "in",
        "value": ["examplechannel"]
      },
      "attribution": "attributed",
      "limit": 10
    }'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "info": {
      "category_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
      "total_results": 1,
      "count": 1,
      "next_cursor": null,
      "limit": 10,
      "attribution": "attributed",
      "models": ["ChatGPT", "Google Gemini"],
      "start_date": "2026-06-01",
      "end_date": "2026-06-30",
      "filter": {
        "field": "channel",
        "op": "in",
        "value": ["examplechannel"]
      },
      "source_types": ["video", "short"]
    },
    "data": [
      {
        "video_id": "dQw4w9WgXcQ",
        "source_type": "video",
        "title": "Example Video",
        "channel_title": "Example Channel",
        "channel_handle": "examplechannel",
        "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
        "channel_url": "https://www.youtube.com/@examplechannel",
        "rank": 1,
        "published_at": "2026-06-12",
        "duration_seconds": 245,
        "video_category": "Education",
        "count": 73,
        "citation_share": 0.21
      }
    ]
  }
  ```
</ResponseExample>


## OpenAPI

````yaml POST /v2/reports/social/youtube/videos
openapi: 3.1.0
info:
  title: External API
  version: 0.60.2
  x-scalar-sdk-installation:
    - lang: Python
      description: |-
        ```sh
        pip install profound
        ```
    - lang: TypeScript
      description: |-
        ```sh
        npm install @profoundai/client
        ```
    - lang: Rust
      description: |-
        ```sh
        cargo add profound
        ```
servers:
  - url: https://api.tryprofound.com
    description: Production Server
security:
  - APIKeyHeader:
      - X-API-Key
  - BearerAuth: []
paths:
  /v2/reports/social/youtube/videos:
    post:
      tags:
        - Reports
        - Reports
      summary: Query Youtube Videos
      description: Rank cited YouTube videos, for one channel or across all of them.
      operationId: query_youtube_videos_v2_reports_social_youtube_videos_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/YoutubeVideosQuery'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/YoutubeVideosResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
        - BearerAuth: []
      x-codeSamples:
        - label: Python
          lang: Python
          source: |-
            import os

            from profound import Profound

            client = Profound(
                api_key=os.environ.get("PROFOUND_API_KEY"),
            )

            youtube = client.reports.social.youtube.get_videos(
                category_id="7c9e6679-7425-40de-944b-e07fc1f90ae7",
                start_date="",
                end_date="",
                attribution="attributed",
            )

            print(youtube)
        - label: TypeScript
          lang: TypeScript
          source: |-
            import Profound from '@profoundai/client';

            const client = new Profound({
              apiKey: process.env['PROFOUND_API_KEY'], // defaults to the PROFOUND_API_KEY env var
              environment: 'production',
            });

            const youtube = await client.reports.social.youtube.getVideos({
              category_id: '7c9e6679-7425-40de-944b-e07fc1f90ae7',
              start_date: '',
              end_date: '',
              attribution: 'attributed',
            });

            console.log(youtube);
        - label: rust
          lang: rust
          source: |-
            use profound::*;

            #[tokio::main]
            async fn main() -> Result<(), Box<dyn std::error::Error>> {
                let client = ProfoundClient::builder()
                    .api_key(std::env::var("PROFOUND_API_KEY")?)
                    .build()?;

                let response = client
                    .reports()
                    .social()
                    .youtube()
                    .get_videos(YoutubeVideosQuery {
                        category_id: "7c9e6679-7425-40de-944b-e07fc1f90ae7".to_string(),
                        start_date: "".to_string(),
                        end_date: "".to_string(),
                        filter: None,
                        limit: None,
                        cursor: None,
                        source_types: None,
                        attribution: None,
                    })
                    .send()
                    .await?;

                println!("{:?}", response);

                Ok(())
            }
components:
  schemas:
    YoutubeVideosQuery:
      properties:
        category_id:
          type: string
          format: uuid
          title: Category Id
        start_date:
          type: string
          title: Start Date
          description: YYYY-MM-DD, ET, inclusive
        end_date:
          type: string
          title: End Date
          description: YYYY-MM-DD, ET, inclusive
        filter:
          anyOf:
            - $ref: '#/components/schemas/FilterNode'
            - type: 'null'
          description: >-
            Advanced filter tree. Prompt-level dimensions are `model`, `topic`,
            `region`, `prompt`, `persona`, `tag`, `analysis_type`. `channel`
            covers both channel cases: `in` with a list of handles selects
            exactly those channels, resolving each handle to its channel so a
            renamed channel is never returned in pieces; `contains` matches a
            channel's title or handle by name. Combine with `and`/`or`/`not` up
            to 3 deep. An exact `channel` selection must be its own `and`
            clause, and a `channel` leaf cannot share an `or` or `not` with a
            prompt-level leaf, because those compile at different stages of the
            query. `domain` and `page` are rejected rather than approximated:
            every row here is one domain, and `page` is not a video id.
        limit:
          anyOf:
            - type: integer
              maximum: 50
              exclusiveMinimum: 0
            - type: 'null'
          title: Limit
          description: Page size; default 10, max 50.
        cursor:
          anyOf:
            - type: string
            - type: 'null'
          title: Cursor
        source_types:
          anyOf:
            - items:
                type: string
                enum:
                  - video
                  - short
                  - channel
                  - playlist
                  - other
              type: array
            - type: 'null'
          title: Source Types
          description: >-
            Limit results to YouTube source types: `video`, `short`, `channel`,
            `playlist`, or `other`. Omit to include `video` and `short` with the
            default `attribution='attributed'`; `unattributed` and `all` widen
            the default to all five source types. Requests containing `other`
            with `attribution='attributed'` are rejected.
        attribution:
          type: string
          enum:
            - attributed
            - unattributed
            - all
          title: Attribution
          description: >-
            Choose attributed citations, unattributed citations, or all
            citations. An unattributed row has no channel: `source_type` is
            `other` for a search or feed URL that names no source, and any other
            type is a source we have no channel for.
          default: attributed
      additionalProperties: false
      type: object
      required:
        - category_id
        - start_date
        - end_date
      title: YoutubeVideosQuery
      description: Cited videos, optionally narrowed to specific channels.
    YoutubeVideosResponse:
      properties:
        info:
          $ref: '#/components/schemas/YoutubeVideosInfo'
        data:
          items:
            $ref: '#/components/schemas/YoutubeVideoRow'
          type: array
          title: Data
      type: object
      required:
        - info
        - data
      title: YoutubeVideosResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    FilterNode:
      properties:
        and:
          anyOf:
            - items:
                $ref: '#/components/schemas/FilterNode'
              type: array
            - type: 'null'
          title: And
        or:
          anyOf:
            - items:
                $ref: '#/components/schemas/FilterNode'
              type: array
            - type: 'null'
          title: Or
        not:
          anyOf:
            - $ref: '#/components/schemas/FilterNode'
            - type: 'null'
        field:
          anyOf:
            - type: string
            - type: 'null'
          title: Field
        op:
          anyOf:
            - type: string
            - type: 'null'
          title: Op
        value:
          title: Value
      additionalProperties: false
      type: object
      title: FilterNode
      description: A leaf (`field`/`op`/`value`) or an `and`/`or`/`not` group.
    YoutubeVideosInfo:
      properties:
        total_results:
          anyOf:
            - type: integer
            - type: 'null'
          title: Total Results
          description: >-
            Total rows matching the query before pagination (null when not
            computed).
        count:
          type: integer
          title: Count
          description: Number of rows returned in `data` for this page.
        next_cursor:
          anyOf:
            - type: string
            - type: 'null'
          title: Next Cursor
          description: Opaque cursor for the next page; null on the last page.
        models:
          items:
            type: string
          type: array
          title: Models
          description: Display names of the models the report covers.
        start_date:
          type: string
          title: Start Date
          description: Echoed request start date (YYYY-MM-DD, ET).
        end_date:
          type: string
          title: End Date
          description: Echoed request end date (YYYY-MM-DD, ET).
        filter:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Filter
          description: Echoed normalized filter tree, or null when no filter was sent.
        category_id:
          type: string
          format: uuid
          title: Category Id
          description: Echoed category id this report covers.
        source_types:
          items:
            type: string
            enum:
              - video
              - short
              - channel
              - playlist
              - other
          type: array
          title: Source Types
          description: >-
            Source types this report covers. Derived from the request, not
            returned rows, so a listed type may have no rows.
        cursor:
          anyOf:
            - type: string
            - type: 'null'
          title: Cursor
          description: Echoed request cursor; omitted on the first page.
        limit:
          type: integer
          title: Limit
          description: Effective page size applied to this paged report.
        attribution:
          type: string
          enum:
            - attributed
            - unattributed
            - all
          title: Attribution
          description: Effective video attribution mode.
      additionalProperties: true
      type: object
      required:
        - count
        - models
        - start_date
        - end_date
        - category_id
        - source_types
        - limit
        - attribution
      title: YoutubeVideosInfo
      description: >-
        Video report metadata, including effective paging and attribution
        settings.
    YoutubeVideoRow:
      properties:
        video_id:
          type: string
          title: Video Id
          description: YouTube video id, as in the watch URL.
        source_type:
          type: string
          enum:
            - video
            - short
            - channel
            - playlist
            - other
          title: Source Type
          description: >-
            YouTube source type: `video`, `short`, `channel`, `playlist` or
            `other`.
        title:
          anyOf:
            - type: string
            - type: 'null'
          title: Title
          description: Resolved title, or null when unavailable.
        channel_title:
          anyOf:
            - type: string
            - type: 'null'
          title: Channel Title
          description: Publishing channel title, or null when unknown.
        channel_handle:
          anyOf:
            - type: string
            - type: 'null'
          title: Channel Handle
          description: >-
            Handle of the publishing channel; select it with a `channel` filter
            of `in`. Null when unknown.
        url:
          anyOf:
            - type: string
            - type: 'null'
          title: Url
          description: Openable video URL, or null when unavailable.
        channel_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Channel Url
          description: Openable URL for the publishing channel, or null when unknown.
        rank:
          type: integer
          title: Rank
          description: 1-based position in the full ranked set, continuing across pages.
        published_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Published At
          description: Upload date, or null when unknown.
        duration_seconds:
          anyOf:
            - type: integer
            - type: 'null'
          title: Duration Seconds
          description: Length in seconds, or null when unknown.
        video_category:
          anyOf:
            - type: string
            - type: 'null'
          title: Video Category
          description: YouTube content category, or null when unknown.
        count:
          type: integer
          title: Count
          description: Citations attributed to this video.
        citation_share:
          type: number
          title: Citation Share
          description: >-
            Share of every YouTube citation in the window (attributed and
            unattributed alike), regardless of `source_types`. Shares sum to at
            most 1, reaching about 1 only with `attribution="all"` and no
            `source_types` filter; a narrowed ranking sums to its slice's share.
      additionalProperties: true
      type: object
      required:
        - video_id
        - source_type
        - rank
        - count
        - citation_share
      title: YoutubeVideoRow
    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
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````