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

# Busca em uma fonte de mídia



## OpenAPI

````yaml https://portal.unicontrol.me/v1/openapi post /v1/media-source/search
openapi: 3.1.0
info:
  title: Unicontrol API
  description: Welcome
  version: 1.0.0
servers:
  - url: http://0.0.0.0:3000
    description: Local Server
  - url: https://portal.test.flexhome.casa
    description: Development
  - url: https://portal.unicontrol.me
    description: Production
security:
  - bearerAuth: []
paths:
  /v1/media-source/search:
    post:
      tags:
        - MediaSource
      summary: Busca em uma fonte de mídia
      operationId: postV1Media-sourceSearch
      parameters:
        - in: header
          name: X-Organization-Id
          required: false
          schema:
            type: string
          description: >-
            ID da organização para contexto (opcional). Quando presente, filtra
            recursos da org.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - uri
                - query
              properties:
                uri:
                  type: string
                  description: 'URI do nó onde buscar, ex.: media-source://radio_browser'
                query:
                  type: string
                  description: Termo de busca
                media_filter_classes:
                  type: array
                  items:
                    type: string
      responses:
        '200':
          description: Resultados
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    type: array
                    items:
                      type: object
                      properties:
                        title:
                          type: string
                        media_class:
                          type: string
                        media_content_type:
                          type: string
                        media_content_id:
                          type: string
                        can_play:
                          type: boolean
                        can_expand:
                          type: boolean
                        thumbnail:
                          type: string
                          nullable: true
                        children_media_class:
                          type: string
                          nullable: true
                        children:
                          type: array
                          items: 0125994c-8fbe-46ba-8e9f-b6794709d8ee
                      required:
                        - title
                        - media_class
                        - media_content_type
                        - media_content_id
                        - can_play
                        - can_expand
        '400':
          description: Dados inválidos
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
              example:
                message: validation error
        '401':
          description: Não autenticado
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
              example:
                error: unauthorized
        '404':
          description: Recurso não encontrado
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
              example:
                message: not found
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.