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

# Search

> Search across all entity types within the authenticated organization.

Applies ilike substring matching on name fields and Postgres prefix
tsquery (``to_tsquery`` with ``:*``) FTS on free-form text fields (description, notes).

Parameters
----------
q : str
    Search query, minimum 2 characters.
limit : int
    Maximum number of results to return in this page (1–100).
offset : int
    Number of results to skip before this page.
per_type : int
    Maximum results to return per entity type (1–20). Defaults to 5.
entity_types : list[str] | None
    When provided, restrict results to these entity type strings.
    Omit to search all types.
project_id : str | None
    When set, scope project-scoped entities (pipelines, optimizations, studies)
    to this project. Org-scoped entities are unaffected.

Returns
-------
SearchResponse
    Paginated results from matching entity types with ``total`` count.



## OpenAPI

````yaml https://api.ionworks.com/openapi.json get /search
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers:
  - url: https://api.ionworks.com
    description: Production
security: []
paths:
  /search:
    get:
      summary: Search
      description: >-
        Search across all entity types within the authenticated organization.


        Applies ilike substring matching on name fields and Postgres prefix

        tsquery (``to_tsquery`` with ``:*``) FTS on free-form text fields
        (description, notes).


        Parameters

        ----------

        q : str
            Search query, minimum 2 characters.
        limit : int
            Maximum number of results to return in this page (1–100).
        offset : int
            Number of results to skip before this page.
        per_type : int
            Maximum results to return per entity type (1–20). Defaults to 5.
        entity_types : list[str] | None
            When provided, restrict results to these entity type strings.
            Omit to search all types.
        project_id : str | None
            When set, scope project-scoped entities (pipelines, optimizations, studies)
            to this project. Org-scoped entities are unaffected.

        Returns

        -------

        SearchResponse
            Paginated results from matching entity types with ``total`` count.
      operationId: search_search_get
      parameters:
        - name: q
          in: query
          required: true
          schema:
            type: string
            minLength: 2
            description: Search query (minimum 2 characters)
            title: Q
          description: Search query (minimum 2 characters)
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 100
            minimum: 1
            description: Maximum results to return in this page
            default: 25
            title: Limit
          description: Maximum results to return in this page
        - name: offset
          in: query
          required: false
          schema:
            type: integer
            minimum: 0
            description: Number of results to skip before this page
            default: 0
            title: Offset
          description: Number of results to skip before this page
        - name: per_type
          in: query
          required: false
          schema:
            type: integer
            maximum: 20
            minimum: 1
            description: Maximum results to return per entity type (1–20).
            default: 5
            title: Per Type
          description: Maximum results to return per entity type (1–20).
        - name: entity_types
          in: query
          required: false
          schema:
            anyOf:
              - items:
                  type: string
                type: array
              - type: 'null'
            description: >-
              Restrict to these entity type strings (repeatable). Omit to search
              all types.
            title: Entity Types
          description: >-
            Restrict to these entity type strings (repeatable). Omit to search
            all types.
        - name: project_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: When set, scope project-scoped entities to this project.
            title: Project Id
          description: When set, scope project-scoped entities to this project.
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SearchResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    SearchResponse:
      properties:
        results:
          items:
            $ref: '#/components/schemas/SearchResult'
          type: array
          title: Results
        query:
          type: string
          title: Query
        total:
          type: integer
          title: Total
        limit:
          type: integer
          title: Limit
        offset:
          type: integer
          title: Offset
      type: object
      required:
        - results
        - query
        - total
        - limit
        - offset
      title: SearchResponse
      description: Response from the global search endpoint.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    SearchResult:
      properties:
        id:
          type: string
          title: Id
        entity_type:
          type: string
          title: Entity Type
        name:
          type: string
          title: Name
        project_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Project Id
        parent_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Parent Id
      type: object
      required:
        - id
        - entity_type
        - name
      title: SearchResult
      description: A single search result from any searchable entity type.
    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

````