> ## 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.

# Search Hub Global

> Federated global/spotlight search across community, media, and member silos.



## OpenAPI

````yaml /openapi/mio-openapi.json get /api/v1/hubs/{hub_id}/search
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/hubs/{hub_id}/search:
    get:
      summary: Search Hub Global
      description: >-
        Federated global/spotlight search across community, media, and member
        silos.
      operationId: default.get_get_hubs_by_hub_id_search
      parameters:
        - in: path
          name: hub_id
          required: true
          schema:
            title: Hub Id
            type: string
        - in: query
          name: q
          required: true
          schema:
            maxLength: 500
            minLength: 1
            title: Q
            type: string
        - in: query
          name: type
          required: false
          schema:
            default: all
            enum:
              - all
              - files
              - media
              - discussions
              - comments
              - members
            title: Type
            type: string
        - in: query
          name: page[size]
          required: false
          schema:
            default: 20
            maximum: 100
            minimum: 1
            title: Page[Size]
            type: integer
        - in: query
          name: page[after]
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Page[After]
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/GlobalSearchListResponse'
          description: Successful Response
        '401':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/JsonApiErrorResponse'
          description: Unauthorized
        '403':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/JsonApiErrorResponse'
          description: Forbidden
        '404':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/JsonApiErrorResponse'
          description: Not Found
        '422':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/JsonApiErrorResponse'
          description: Unprocessable Content
        '429':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/JsonApiErrorResponse'
          description: Too Many Requests
      security:
        - HTTPBearer: []
components:
  schemas:
    GlobalSearchListResponse:
      description: JSON:API list response for global search with typed meta.
      properties:
        data:
          items:
            $ref: '#/components/schemas/JsonApiResource_GlobalSearchResultAttributes_'
          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/GlobalSearchMeta'
      required:
        - data
        - meta
      title: GlobalSearchListResponse
      type: object
    JsonApiErrorResponse:
      description: Error JSON:API response.
      properties:
        errors:
          items:
            $ref: '#/components/schemas/JsonApiError'
          title: Errors
          type: array
        meta:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Meta
      required:
        - errors
      title: JsonApiErrorResponse
      type: object
    JsonApiResource_GlobalSearchResultAttributes_:
      properties:
        attributes:
          $ref: '#/components/schemas/GlobalSearchResultAttributes'
        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[GlobalSearchResultAttributes]
      type: object
    JsonApiPaginationLinks:
      properties:
        next:
          anyOf:
            - type: string
            - type: 'null'
          title: Next
        self:
          anyOf:
            - type: string
            - type: 'null'
          title: Self
      title: JsonApiPaginationLinks
      type: object
    GlobalSearchMeta:
      properties:
        cap:
          title: Cap
          type: integer
        has_more:
          title: Has More
          type: boolean
        included_sources:
          items:
            type: string
          title: Included Sources
          type: array
        is_capped:
          title: Is Capped
          type: boolean
        pagination:
          const: top_n
          title: Pagination
          type: string
        query:
          title: Query
          type: string
      required:
        - query
        - has_more
        - is_capped
        - cap
        - pagination
        - included_sources
      title: GlobalSearchMeta
      type: object
    JsonApiError:
      properties:
        code:
          anyOf:
            - type: string
            - type: 'null'
          title: Code
        detail:
          anyOf:
            - type: string
            - type: 'null'
          title: Detail
        id:
          anyOf:
            - type: string
            - type: 'null'
          title: Id
        meta:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Meta
        source:
          anyOf:
            - additionalProperties:
                type: string
              type: object
            - type: 'null'
          title: Source
        status:
          title: Status
          type: string
        title:
          title: Title
          type: string
      required:
        - status
        - title
      title: JsonApiError
      type: object
    GlobalSearchResultAttributes:
      description: JSON:API attributes for a `global_search_results` resource.
      properties:
        body_excerpt:
          anyOf:
            - type: string
            - type: 'null'
          title: Body Excerpt
        end_seconds:
          anyOf:
            - type: integer
            - type: 'null'
          title: End Seconds
        hub_id:
          title: Hub Id
          type: string
        native_id:
          title: Native Id
          type: string
        rank_source:
          anyOf:
            - enum:
                - media
                - community
                - members
              type: string
            - type: 'null'
          title: Rank Source
        result_kind:
          enum:
            - media
            - discussion
            - comment
            - member
          title: Result Kind
          type: string
        rrf_score:
          anyOf:
            - type: number
            - type: 'null'
          title: Rrf Score
        snippet:
          anyOf:
            - type: string
            - type: 'null'
          title: Snippet
        source_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Source Type
        start_seconds:
          anyOf:
            - type: integer
            - type: 'null'
          title: Start Seconds
        title:
          anyOf:
            - type: string
            - type: 'null'
          title: Title
      required:
        - result_kind
        - hub_id
        - native_id
      title: GlobalSearchResultAttributes
      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

````