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

# Search language assets

> Search across term bases and translation memories for matching language assets.

**Search behavior:**
- Translation memories: returns only 100% (exact) and 101% (in-context) matches. No fuzzy, wildcard, or sub-segment matching is supported.
- Term bases: returns only approved terms matching the search text. No wildcard or partial matching.

**Request limits:**
- Max 50 queries per request, each up to 1000 characters.
- Up to 100 translation memories and 100 term bases are searched.
- Up to 10 TM matches returned per query text.
- Optional `clientId` restricts to assets assigned to that client (or unassigned).

**Execution:**
- TM and TB searches run in parallel with a 20-second timeout.
- Partial results are returned if one search times out or fails.
- Check `metadata.tmSearchStatus` / `metadata.tbSearchStatus` (COMPLETED, TIMED_OUT, FAILED).
- Returns HTTP 503 when the service is under heavy load.



## OpenAPI

````yaml /openapi/phrase-tms-latest.json post /api2/v1/languageAssets/search
openapi: 3.0.0
info:
  description: |-
    Welcome to Phrase's TMS API documentation. 

     Please visit our [help center](https://support.phrase.com/hc/en-us/sections/5709662083612) for more information about the APIs. 

     If you have any questions, please contact [Support](https://support.phrase.com/hc/requests/new). 

     Please, include the `User-Agent` header with the name of your application or project. It might be a good idea to include some sort of contact information as well, so that we can get in touch if necessary. Examples of excellent `User-Agent` headers:
     > User-Agent: Example mobile app (example@phrase.com) <br/> User-Agent: ACME Inc Java 1.8 Client (http://acmeinc.com/contact)
  version: Latest
  title: Phrase TMS API
servers:
  - url: https://cloud.memsource.com/web
security:
  - ApiToken: []
  - OAuth2: []
tags:
  - name: Additional Workflow Step
  - name: Analysis
  - name: Async Request
  - name: Authentication
  - name: Automations
  - name: Bilingual File
  - name: Business Unit
  - name: Buyer
  - name: Client
  - name: Connector
  - name: Conversations
  - name: Cost Center
  - name: Custom Fields
  - name: Custom File Type
  - name: Domain
  - name: Due Date Scheme
  - name: Email Template
  - name: File
  - name: Glossary
  - name: Import settings
  - name: Job
  - name: Language AI
  - name: Language Assets
  - name: Language Quality Assessment
  - name: Machine Translation
  - name: Machine Translation Settings
  - name: Mapping
  - name: Net Rate Scheme
  - name: Notifications
  - name: Price List
  - name: Project
  - name: Project Template
  - name: Provider
  - name: Quality Assurance
  - name: Quality Profile
  - name: Quote
  - name: Reference File
  - name: SCIM
  - name: Segment
  - name: Segmentation Rules
  - name: Service
  - name: Spell Check
  - name: SubDomain
  - name: Supported Languages
  - name: Term Base
  - name: Translation
  - name: Translation Memory
  - name: User
  - name: Vendor
  - name: Webhook
  - name: Workflow Step
  - name: Workflow changes
  - name: XML Assistant
paths:
  /api2/v1/languageAssets/search:
    post:
      tags:
        - Language Assets
      summary: Search language assets
      description: >-
        Search across term bases and translation memories for matching language
        assets.


        **Search behavior:**

        - Translation memories: returns only 100% (exact) and 101% (in-context)
        matches. No fuzzy, wildcard, or sub-segment matching is supported.

        - Term bases: returns only approved terms matching the search text. No
        wildcard or partial matching.


        **Request limits:**

        - Max 50 queries per request, each up to 1000 characters.

        - Up to 100 translation memories and 100 term bases are searched.

        - Up to 10 TM matches returned per query text.

        - Optional `clientId` restricts to assets assigned to that client (or
        unassigned).


        **Execution:**

        - TM and TB searches run in parallel with a 20-second timeout.

        - Partial results are returned if one search times out or fails.

        - Check `metadata.tmSearchStatus` / `metadata.tbSearchStatus`
        (COMPLETED, TIMED_OUT, FAILED).

        - Returns HTTP 503 when the service is under heavy load.
      operationId: searchLanguageAssets
      requestBody:
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/LanguageAssetsSearchRequestDtoLanguageAssetsV1
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/LanguageAssetsSearchResponseDtoLanguageAssetsV1
        '400':
          description: Bad request
        '401':
          description: Not authorized
        '403':
          description: Forbidden
        '404':
          description: Resource not found
        '405':
          description: Method not allowed
        '408':
          description: Timeout
        '410':
          description: Gone
        '415':
          description: Unsupported media type
        '429':
          description: Too many requests
        '500':
          description: Internal server error
        '501':
          description: Not implemented
components:
  schemas:
    LanguageAssetsSearchRequestDtoLanguageAssetsV1:
      type: object
      required:
        - queries
        - sourceLocale
        - targetLocales
      properties:
        clientId:
          type: string
          example: TZTenUqAlyWE4NmAvQRMq1
          description: >-
            When provided, only Term Bases and Translation Memories assigned to
            this client are searched. If not provided, all Term Bases and
            Translation Memories are searched.
        queries:
          type: array
          items:
            $ref: '#/components/schemas/SearchAssetsQueryDtoLanguageAssetsV1'
          maxItems: 50
          minItems: 0
        sourceLocale:
          type: string
        targetLocales:
          type: array
          items:
            type: string
    LanguageAssetsSearchResponseDtoLanguageAssetsV1:
      type: object
      properties:
        metadata:
          $ref: '#/components/schemas/SearchMetadataDtoLanguageAssetsV1'
        results:
          type: array
          items:
            $ref: '#/components/schemas/SearchAssetsQueryResultDtoLanguageAssetsV1'
    SearchAssetsQueryDtoLanguageAssetsV1:
      type: object
      required:
        - text
      properties:
        text:
          type: string
          minLength: 0
          maxLength: 1000
    SearchMetadataDtoLanguageAssetsV1:
      type: object
      properties:
        searchedTermBaseIds:
          type: array
          items:
            type: string
        searchedTransMemoryIds:
          type: array
          items:
            type: string
        tbSearchStatus:
          type: string
          enum:
            - COMPLETED
            - TIMED_OUT
            - FAILED
        tmSearchStatus:
          type: string
          enum:
            - COMPLETED
            - TIMED_OUT
            - FAILED
        warnings:
          type: array
          items:
            type: string
    SearchAssetsQueryResultDtoLanguageAssetsV1:
      type: object
      properties:
        query:
          type: string
        termBaseMatches:
          type: array
          items:
            $ref: '#/components/schemas/TermBaseMatchDtoLanguageAssetsV1'
        translationMemoryMatches:
          type: array
          items:
            $ref: '#/components/schemas/TransMemoryMatchDtoLanguageAssetsV1'
    TermBaseMatchDtoLanguageAssetsV1:
      type: object
      properties:
        conceptId:
          type: string
        sourceTerm:
          $ref: '#/components/schemas/TermDtoLanguageAssetsV1'
        targetTerms:
          type: array
          items:
            $ref: '#/components/schemas/TermDtoLanguageAssetsV1'
        termBaseId:
          type: string
        termBaseName:
          type: string
    TransMemoryMatchDtoLanguageAssetsV1:
      type: object
      properties:
        netScore:
          type: number
          format: double
        sourceSegmentText:
          type: string
        targetSegments:
          type: array
          items:
            $ref: '#/components/schemas/TmTargetSegmentDtoLanguageAssetsV1'
        transMemoryId:
          type: string
        transMemoryName:
          type: string
    TermDtoLanguageAssetsV1:
      type: object
      properties:
        forbidden:
          type: boolean
        locale:
          type: string
        preferred:
          type: boolean
        status:
          type: string
          description: Term status
          enum:
            - New
            - Approved
            - Rejected
        termId:
          type: string
        text:
          type: string
    TmTargetSegmentDtoLanguageAssetsV1:
      type: object
      properties:
        locale:
          type: string
        text:
          type: string
  securitySchemes:
    ApiToken:
      description: >-
        Get a token from `auth/login` [endpoint](#operation/login) and then pass
        it in the `Authorization` HTTP header in every subsequent API call. For
        more information visit our [help
        center](https://support.phrase.com/hc/en-us/articles/5709662181404-API-Authentication-TMS-#token-0-0).
      type: apiKey
      name: Authorization
      in: header
    OAuth2:
      description: >-
        A standard OAuth 2.0 authorization code flow. For more information visit
        our [help
        center](https://support.phrase.com/hc/en-us/articles/5709662181404-API-Authentication-TMS-#oauth-2-0-0-1).
      type: oauth2
      flows:
        authorizationCode:
          authorizationUrl: https://cloud.memsource.com/web/oauth/authorize
          tokenUrl: https://cloud.memsource.com/web/oauth/token
          scopes: {}

````