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

# Member Search Media

> Hybrid (RRF) media search for a hub.

Authenticated hub members see all published content (member ACL).
Unauthenticated callers on public hubs see only publicly-visible media
on publicly-visible content nodes (anonymous ACL).
Private hubs return 403 for unauthenticated callers and non-members.

Rate limits:
  Members:   30 req/60s keyed by contact_id.
  Anonymous: 10 req/60s keyed by client IP (X-Forwarded-For or socket).



## OpenAPI

````yaml /openapi/mio-openapi.json get /api/v1/hub/{hub_id}/search/media
openapi: 3.1.0
info:
  description: >-
    Production API reference for Membership.io. Use the authored guides for
    workflows and the generated endpoint pages for exact parameters and schemas.
  title: Membership.io API
  version: 0.1.0
servers:
  - description: Production
    url: https://api.member.dev
security:
  - bearerAuth: []
paths:
  /api/v1/hub/{hub_id}/search/media:
    get:
      tags:
        - media-search
      summary: Member Search Media
      description: |-
        Hybrid (RRF) media search for a hub.

        Authenticated hub members see all published content (member ACL).
        Unauthenticated callers on public hubs see only publicly-visible media
        on publicly-visible content nodes (anonymous ACL).
        Private hubs return 403 for unauthenticated callers and non-members.

        Rate limits:
          Members:   30 req/60s keyed by contact_id.
          Anonymous: 10 req/60s keyed by client IP (X-Forwarded-For or socket).
      operationId: media_search.get_media_search_get_hub_by_hub_id_search_media
      parameters:
        - in: path
          name: hub_id
          required: true
          schema:
            title: Hub Id
            type: string
        - description: Search query string.
          in: query
          name: q
          required: true
          schema:
            description: Search query string.
            minLength: 1
            title: Q
            type: string
        - in: query
          name: page[size]
          required: false
          schema:
            default: 20
            maximum: 100
            minimum: 1
            title: Page[Size]
            type: integer
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/MediaSearchListResponse'
          description: Successful Response
        '422':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      security:
        - HTTPBearer: []
components:
  schemas:
    MediaSearchListResponse:
      description: >-
        Collection JSON:API response wrapping a list of
        MediaSearchResultResources.
      properties:
        data:
          items:
            $ref: '#/components/schemas/JsonApiResource_MediaSearchResultAttributes_'
          title: Data
          type: array
        included:
          anyOf:
            - items: {}
              type: array
            - type: 'null'
          title: Included
        links:
          anyOf:
            - $ref: '#/components/schemas/JsonApiPaginationLinks'
            - type: 'null'
        meta:
          $ref: '#/components/schemas/MediaSearchMeta'
      required:
        - data
        - meta
      title: MediaSearchListResponse
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    JsonApiResource_MediaSearchResultAttributes_:
      properties:
        attributes:
          $ref: '#/components/schemas/MediaSearchResultAttributes'
        id:
          title: Id
          type: string
        links:
          anyOf:
            - $ref: '#/components/schemas/JsonApiLinks'
            - type: 'null'
        meta:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Meta
        relationships:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Relationships
        type:
          title: Type
          type: string
      required:
        - id
        - type
        - attributes
      title: JsonApiResource[MediaSearchResultAttributes]
      type: object
    JsonApiPaginationLinks:
      properties:
        next:
          anyOf:
            - type: string
            - type: 'null'
          title: Next
        self:
          anyOf:
            - type: string
            - type: 'null'
          title: Self
      title: JsonApiPaginationLinks
      type: object
    MediaSearchMeta:
      description: |-
        Top-level meta block for media search list responses.

        Documents cap/pagination so they appear in the generated OpenAPI schema.
      properties:
        cap:
          title: Cap
          type: integer
        has_more:
          title: Has More
          type: boolean
        is_capped:
          title: Is Capped
          type: boolean
        pagination:
          const: top_n
          title: Pagination
          type: string
        total:
          title: Total
          type: integer
      required:
        - total
        - has_more
        - is_capped
        - cap
        - pagination
      title: MediaSearchMeta
      type: object
    ValidationError:
      properties:
        ctx:
          title: Context
          type: object
        input:
          title: Input
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object
    MediaSearchResultAttributes:
      description: Serialisable attributes of a media search result resource.
      properties:
        asset_kind:
          anyOf:
            - enum:
                - video
                - audio
                - pdf
                - image
                - document
              type: string
            - type: 'null'
          title: Asset Kind
        content_node_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Content Node Id
        cover_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Cover Url
        cover_url_expires_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          description: >-
            Expiry timestamp for cover_url. Clients must re-fetch after this to
            get a fresh signed URL. Read-only.
          readOnly: true
          title: Cover Url Expires At
        end_seconds:
          anyOf:
            - type: integer
            - type: 'null'
          title: End Seconds
        highlights:
          items:
            additionalProperties:
              type: integer
            type: object
          title: Highlights
          type: array
        lexical_rank:
          anyOf:
            - type: integer
            - type: 'null'
          title: Lexical Rank
        media_id:
          title: Media Id
          type: string
        rrf_score:
          title: Rrf Score
          type: number
        semantic_rank:
          anyOf:
            - type: integer
            - type: 'null'
          title: Semantic Rank
        share_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Share Url
        snippet:
          title: Snippet
          type: string
        source_type:
          title: Source Type
          type: string
        start_seconds:
          anyOf:
            - type: integer
            - type: 'null'
          title: Start Seconds
        title:
          anyOf:
            - type: string
            - type: 'null'
          title: Title
      required:
        - media_id
        - title
        - content_node_id
        - source_type
        - snippet
        - highlights
        - start_seconds
        - end_seconds
        - share_url
        - rrf_score
        - lexical_rank
        - semantic_rank
      title: MediaSearchResultAttributes
      type: object
    JsonApiLinks:
      properties:
        self:
          anyOf:
            - type: string
            - type: 'null'
          title: Self
      title: JsonApiLinks
      type: object
  securitySchemes:
    bearerAuth:
      bearerFormat: JWT or mio_sk API key
      description: >-
        Send platform JWTs, contact JWTs, or team API keys as `Authorization:
        Bearer <token>`.
      scheme: bearer
      type: http
    HTTPBearer:
      scheme: bearer
      type: http

````