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

# Global Search

> Federated search across entity types.

Results are grouped by entity type. Each group contains up to `limit` hits.
The `cursor` param is only valid when a single `types` value is supplied.



## OpenAPI

````yaml /openapi.json get /v1/search
openapi: 3.1.0
info:
  description: Causeloop Platform Backend
  title: Causeloop API
  version: 1.0.0
servers: []
security: []
paths:
  /v1/search:
    get:
      tags:
        - search
      summary: Global Search
      description: >-
        Federated search across entity types.


        Results are grouped by entity type. Each group contains up to `limit`
        hits.

        The `cursor` param is only valid when a single `types` value is
        supplied.
      operationId: global_search_v1_search_get
      parameters:
        - in: query
          name: q
          required: true
          schema:
            maxLength: 256
            minLength: 1
            title: Q
            type: string
        - in: query
          name: types
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Types
        - in: query
          name: limit
          required: false
          schema:
            default: 20
            maximum: 50
            minimum: 1
            title: Limit
            type: integer
        - in: query
          name: cursor
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Cursor
        - in: query
          name: sort
          required: false
          schema:
            default: relevance
            pattern: ^(relevance|-created_at|-risk_score)$
            title: Sort
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SearchResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      security:
        - HTTPBearer: []
components:
  schemas:
    SearchResponse:
      properties:
        groups:
          items:
            $ref: '#/components/schemas/SearchGroup'
          title: Groups
          type: array
        query:
          title: Query
          type: string
        took_ms:
          title: Took Ms
          type: integer
      required:
        - query
        - groups
        - took_ms
      title: SearchResponse
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    SearchGroup:
      properties:
        hits:
          items:
            $ref: '#/components/schemas/SearchHit'
          title: Hits
          type: array
        next_cursor:
          anyOf:
            - type: string
            - type: 'null'
          title: Next Cursor
        total:
          title: Total
          type: integer
        type:
          title: Type
          type: string
      required:
        - type
        - total
        - hits
      title: SearchGroup
      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
    SearchHit:
      properties:
        id:
          title: Id
          type: string
        link:
          title: Link
          type: string
        meta:
          additionalProperties: true
          default: {}
          title: Meta
          type: object
        risk_score:
          anyOf:
            - type: integer
            - type: 'null'
          title: Risk Score
        score:
          maximum: 1
          minimum: 0
          title: Score
          type: number
        snippet:
          title: Snippet
          type: string
        title:
          title: Title
          type: string
        type:
          title: Type
          type: string
      required:
        - id
        - type
        - title
        - snippet
        - link
        - score
      title: SearchHit
      type: object
  securitySchemes:
    HTTPBearer:
      scheme: bearer
      type: http

````