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

# Post searchv1document

> Searches documents in the whole domain matching the provided query.



## OpenAPI

````yaml /openapis/search.json post /search/v1/document
openapi: 3.0.1
info:
  description: "The AODocs REST API exposes most of the features of AODocs. It can be used to implement custom applications, third-party integration, bulk tools, or\n\t\t\t\t\t\t\t\t\t\tjust to experiment with AODocs."
  version: '69.4'
  title: AODocs REST API
servers:
  - url: https://aodocs.altirnao.com/api
security: []
tags:
  - name: search
    description: Lets you search and count documents
paths:
  /search/v1/document:
    post:
      tags:
        - search
      description: Searches documents in the whole domain matching the provided query.
      operationId: search:v1.Search.searchDocumentsCrossLibrary
      parameters:
        - $ref: '#/components/parameters/domain_query_parameter'
        - $ref: '#/components/parameters/searchQuery_query_parameter'
        - name: searchQueryTarget
          in: query
          description: >-
            The scope of the search: 'PROPERTIES_ONLY' to search only in the
            document metadata, 'ATTACHMENTS_ONLY' to search only in the
            attachment contents.
          required: true
          schema:
            type: string
            enum:
              - PROPERTIES_ONLY
              - ATTACHMENTS_ONLY
              - PROPERTIES_AND_ATTACHMENTS
        - $ref: '#/components/parameters/pageToken_query_parameter'
        - $ref: '#/components/parameters/limit_query_parameter'
        - $ref: '#/components/parameters/timezone_query_parameter'
        - $ref: '#/components/parameters/securityCode_query_parameter'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ApiCrossLibrarySearchRequest'
        required: true
      responses:
        '200':
          description: A ApiCrossLibrarySearchResult response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiCrossLibrarySearchResult'
      security:
        - google_id_token-a99f12e0:
            - https://www.googleapis.com/auth/userinfo.email
        - google_id_token_legacy-a99f12e0:
            - https://www.googleapis.com/auth/userinfo.email
components:
  parameters:
    domain_query_parameter:
      name: domain
      in: query
      description: The G Suite domain
      required: false
      schema:
        type: string
    searchQuery_query_parameter:
      name: searchQuery
      in: query
      description: The text searched to filter documents
      required: false
      schema:
        type: string
    pageToken_query_parameter:
      name: pageToken
      in: query
      description: >-
        The token for continuing a previous list request on the next page. This
        should be set to the value of 'nextPageToken' from the previous
        response.
      required: false
      schema:
        type: string
    limit_query_parameter:
      name: limit
      in: query
      description: 'The maximum number of documents per page. (Default: 20)'
      required: false
      schema:
        type: integer
        format: int32
        default: 20
    timezone_query_parameter:
      name: timezone
      in: query
      description: >-
        The timezone to use for datetime field searches (default: UTC). Format:
        'Europe/Paris' or '+01:00'
      required: false
      schema:
        type: string
    securityCode_query_parameter:
      name: securityCode
      in: query
      description: The security code
      required: false
      schema:
        type: string
  schemas:
    ApiCrossLibrarySearchRequest:
      type: object
      properties:
        additionalFields:
          type: array
          items:
            type: string
        filters:
          type: array
          items:
            $ref: '#/components/schemas/ApiFilterItem'
        kind:
          type: string
        sort:
          type: array
          items:
            $ref: '#/components/schemas/ApiSortItem'
    ApiCrossLibrarySearchResult:
      type: object
      properties:
        count:
          type: integer
          format: int32
        exactCount:
          type: boolean
        hits:
          type: array
          items:
            $ref: '#/components/schemas/ApiSearchDocument'
        kind:
          type: string
        nextPageToken:
          type: string
    ApiFilterItem:
      type: object
      properties:
        column:
          type: string
        joinType:
          type: string
          enum:
            - AND
            - OR
        kind:
          type: string
        operator:
          type: string
          enum:
            - EQUAL
            - NOT_EQUAL
            - STRICTLY_GREATER_THAN
            - STRICTLY_LESSER_THAN
            - GREATER_THAN_OR_EQUAL_TO
            - LESSER_THAN_OR_EQUAL_TO
            - BETWEEN
            - EMPTY
            - NOT_EMPTY
            - WITHIN_THE_AREA
            - IN
            - NOT_IN
            - STARTS_WITH
            - ENDS_WITH
            - CONTAINS_SUBSTRING
        value:
          type: string
    ApiSortItem:
      type: object
      properties:
        ascending:
          type: boolean
        direction:
          type: string
          enum:
            - ASCENDING
            - DESCENDING
        fieldName:
          type: string
        kind:
          type: string
        type:
          type: string
          enum:
            - RELEVANCE
            - SYSTEM_FIELD
            - CUSTOM_FIELD
    ApiSearchDocument:
      type: object
      properties:
        additionalFields:
          type: array
          items:
            $ref: '#/components/schemas/ApiSearchField'
        className:
          type: string
        documentId:
          type: string
        folderId:
          type: string
        folderIsRootFolderOfLibrary:
          type: boolean
        folderName:
          type: string
        iconLink:
          type: string
        kind:
          type: string
        lastUpdateTimestamp:
          type: string
          format: date-time
        lastUpdater:
          $ref: '#/components/schemas/ApiPersonValue'
        libraryId:
          type: string
        libraryName:
          type: string
        stateName:
          type: string
        title:
          type: string
    ApiSearchField:
      type: object
      properties:
        fieldName:
          type: string
        type:
          type: string
          enum:
            - STRING
            - TEXT
            - DATE
            - TIME
            - DATETIME
            - INTEGER
            - FILESIZE
            - DECIMAL
            - BOOLEAN
            - PERSON
            - CATEGORY
            - GEOPOINT
            - URL
            - REFERENCE_CATALOG
            - MIMETYPEGROUP
            - CLASS
            - FOLDER
            - STATE
            - OSS_ATTACHMENT
            - DRIVE_ATTACHMENT
            - TABLE
        values:
          type: array
          items:
            $ref: '#/components/schemas/Object'
    ApiPersonValue:
      type: object
      properties:
        email:
          type: string
        personName:
          type: string
        thumbnailPictureLink:
          type: string
    Object:
      type: object
  securitySchemes:
    google_id_token-a99f12e0:
      type: oauth2
      x-google-issuer: https://accounts.google.com
      x-google-jwks_uri: https://www.googleapis.com/oauth2/v1/certs
      x-google-audiences: >-
        755040865326-h5gomu85549lkh2qf9d3lku39vnaf6ii.apps.googleusercontent.com,563231141203-231sn7f6ptedncun5h00h7ktbe3o2nd5.apps.googleusercontent.com,993707107224.apps.googleusercontent.com,ao-docs,aodocs-core-eu-1,ao-docs-staging,ao-docs-dev,aodocs-core-dev-us,aodocs-total-poc-euw3
      flows:
        implicit:
          authorizationUrl: https://accounts.google.com/o/oauth2/v2/auth
          scopes:
            https://www.googleapis.com/auth/userinfo.email: View your email address
    google_id_token_legacy-a99f12e0:
      type: oauth2
      x-google-issuer: accounts.google.com
      x-google-jwks_uri: https://www.googleapis.com/oauth2/v1/certs
      x-google-audiences: >-
        755040865326-h5gomu85549lkh2qf9d3lku39vnaf6ii.apps.googleusercontent.com,563231141203-231sn7f6ptedncun5h00h7ktbe3o2nd5.apps.googleusercontent.com,993707107224.apps.googleusercontent.com,ao-docs,aodocs-core-eu-1,ao-docs-staging,ao-docs-dev,aodocs-core-dev-us,aodocs-total-poc-euw3
      flows:
        implicit:
          authorizationUrl: https://accounts.google.com/o/oauth2/v2/auth
          scopes:
            https://www.googleapis.com/auth/userinfo.email: View your email address

````