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

# Search full text

> Perform a full text search across documents.

This endpoint allows searching through documents with various filtering options. The search results are cleaned to include only whitelisted attributes.


<RequestExample>
  ```bash cURL theme={null}
  curl "https://customerName.ambersearch.de/api/beta/search?query=example&count=50" \
  -H "Authorization: Bearer ambrs-exampletoken"
  ```

  ```python Python theme={null}
  import requests

  response = requests.get(
      "https://customerName.ambersearch.de/api/beta/search",
      headers = {
          "Authorization": "Bearer ambrs-exampletoken"
      },
      params = {
          "query": "example",
          "count": 50
      }
  )
  print(response.json())
  ```

  ```javascript Javascript theme={null}
  const axios = require("axios");

  axios
      .get("https://customerName.ambersearch.de/api/beta/search", {
          headers: {
              Authorization: "Bearer ambrs-exampletoken",
          },
          params: {
              query: "example",
              count: 50,
          },
      })
      .then((res) => console.log(res.data));
  ```
</RequestExample>


## OpenAPI

````yaml get /api/beta/search
openapi: 3.1.0
info:
  title: amber
  version: v0.1.46
servers:
  - url: https://{customerDomain}.ambersearch.de
    variables:
      customerDomain:
        default: customerDomain
security: []
paths:
  /api/beta/search:
    get:
      tags:
        - Public REST API
      summary: Search Text Public Api
      description: >-
        Perform a full text search across documents.


        This endpoint allows searching through documents with various filtering
        options.

        The search results are cleaned to include only whitelisted attributes.


        ## Returns


        A dictionary containing search results with the following structure:


        ```json

        {
            "results": [
                {
                    "id": "string",
                    "title": "string",
                    "path": "string",
                    "path_preview": "string",
                    "parent_path": "string",
                    "data_source": "string",
                    "data_source_sub": "string",
                    "data_source_sub_sub": "string",
                    "file_type": "string",
                    "document_type": "string",
                    "last_modified": "string",
                    "file_size": "integer",
                    "author": "string",
                    "highlights": "array",
                    "summary": "string",
                    "suffix": "string",
                    "similar_docs": "array",
                    "duplicates": "array",
                    "same_thread_docs": "array"
                }
            ]
        }

        ```


        ## Raises


        - **HTTPException**: If the user is not authenticated or lacks proper
        permissions
      operationId: Full Text Search
      parameters:
        - name: query
          in: query
          required: true
          schema:
            type: string
            minLength: 1
            description: The search query string
            examples:
              - project documentation
            title: Query
          description: The search query string
        - name: count
          in: query
          required: false
          schema:
            type: integer
            maximum: 100
            minimum: 1
            description: Number of results to return
            examples:
              - 20
            default: 50
            title: Count
          description: Number of results to return
        - name: data_source
          in: query
          required: false
          schema:
            type: string
            description: |-
              Filter results by data source.

                      **Possible values:**
                      * `confluence` - Atlassian Confluence
                      * `jira` - Atlassian Jira
                      * `gitlab` - GitLab
                      * `sharepoint_online` - Microsoft SharePoint Online
                      * `outlook` - Microsoft Outlook
                      * `windowsshares` - Windows File Shares
                      * `other` - Other supported data sources
            examples:
              - confluence,jira
            default: allDataSources
            title: Data Source
          description: |-
            Filter results by data source.

                    **Possible values:**
                    * `confluence` - Atlassian Confluence
                    * `jira` - Atlassian Jira
                    * `gitlab` - GitLab
                    * `sharepoint_online` - Microsoft SharePoint Online
                    * `outlook` - Microsoft Outlook
                    * `windowsshares` - Windows File Shares
                    * `other` - Other supported data sources
        - name: file_type
          in: query
          required: false
          schema:
            type: string
            description: |-
              Filter results by file type.

                      **Possible values:**
                      * `pdf` - PDF documents
                      * `word` - Microsoft Word documents
                      * `powerpoint` - Microsoft PowerPoint presentations
                      * `excel` - Microsoft Excel spreadsheets
                      * `email` - Email messages
                      * `directory` - Directory/folder structures
                      * `html` - HTML files
                      * `txt` - Text files
                      * `compressed` - Compressed archive files
                      * `image` - Image files
                      * `message` - Message files
                      * `task` - Task files
                      * `issue` - Issue tracking files
                      * `wiki` - Wiki pages
                      * `news` - News articles
                      * `page` - Web pages
                      * `onenote` - OneNote files
                      * `comment` - Comment files
                      * `other` - Other file types
            examples:
              - pdf,word
            default: allFileTypes
            title: File Type
          description: |-
            Filter results by file type.

                    **Possible values:**
                    * `pdf` - PDF documents
                    * `word` - Microsoft Word documents
                    * `powerpoint` - Microsoft PowerPoint presentations
                    * `excel` - Microsoft Excel spreadsheets
                    * `email` - Email messages
                    * `directory` - Directory/folder structures
                    * `html` - HTML files
                    * `txt` - Text files
                    * `compressed` - Compressed archive files
                    * `image` - Image files
                    * `message` - Message files
                    * `task` - Task files
                    * `issue` - Issue tracking files
                    * `wiki` - Wiki pages
                    * `news` - News articles
                    * `page` - Web pages
                    * `onenote` - OneNote files
                    * `comment` - Comment files
                    * `other` - Other file types
        - name: last_modified_date
          in: query
          required: false
          schema:
            type: string
            description: |-
              Filter results by last modified date.

                      **Possible values:**
                      * `threeday` - Last three days
                      * `week` - Last week
                      * `month` - Last month
                      * `threemonth` - Last three months
                      * `year` - Last year
                      * `fiveyear` - Last five years
                      * Custom time range format: `YYYY-MM-DDThh:mm:ss.sssZ_YYYY-MM-DDThh:mm:ss.sssZ`

                      **Example:** `2024-02-01T00:00:00.000Z_2024-02-25T23:59:59.999Z
            examples:
              - month
            default: allTimes
            title: Last Modified Date
          description: |-
            Filter results by last modified date.

                    **Possible values:**
                    * `threeday` - Last three days
                    * `week` - Last week
                    * `month` - Last month
                    * `threemonth` - Last three months
                    * `year` - Last year
                    * `fiveyear` - Last five years
                    * Custom time range format: `YYYY-MM-DDThh:mm:ss.sssZ_YYYY-MM-DDThh:mm:ss.sssZ`

                    **Example:** `2024-02-01T00:00:00.000Z_2024-02-25T23:59:59.999Z
        - name: start_page
          in: query
          required: false
          schema:
            type: integer
            minimum: 0
            description: Starting page for pagination
            examples:
              - 0
            default: 0
            title: Start Page
          description: Starting page for pagination
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - Bearer: []
components:
  schemas:
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    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
  securitySchemes:
    Bearer:
      type: http
      scheme: bearer

````