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

# Search for language suggestions

> Search for language suggestions using LanguageConstant with caching.

This endpoint provides autocomplete functionality for language selection.
Returns language IDs that can be used for keyword analysis and campaign creation.
Supports optional query parameter to filter languages by name.
Results are cached for 7 days unless force_refresh is True.



## OpenAPI

````yaml https://dev-api.cattix.com/openapi.json post /api/v1/google-ads/languages/search
openapi: 3.1.0
info:
  title: CATTIX API
  description: CATTIX Backend API
  version: 0.107.0
servers:
  - url: http://localhost:8000
    description: Local
  - url: https://dev-api.cattix.com
    description: Development
  - url: https://staging-api.cattix.com
    description: Staging
  - url: https://api.cattix.com
    description: Production
security: []
paths:
  /api/v1/google-ads/languages/search:
    post:
      tags:
        - Google Ads - Locations & Languages
      summary: Search for language suggestions
      description: >-
        Search for language suggestions using LanguageConstant with caching.


        This endpoint provides autocomplete functionality for language
        selection.

        Returns language IDs that can be used for keyword analysis and campaign
        creation.

        Supports optional query parameter to filter languages by name.

        Results are cached for 7 days unless force_refresh is True.
      operationId: search_languages_api_v1_google_ads_languages_search_post
      parameters:
        - name: token_id
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
              - type: 'null'
            description: Optional specific Token ID
            title: Token Id
          description: Optional specific Token ID
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LanguageSearchRequestSchema'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LanguageSearchResponseSchema'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - OAuth2PasswordBearer: []
components:
  schemas:
    LanguageSearchRequestSchema:
      properties:
        google_ads_customer_id:
          type: integer
          title: Google Ads Customer Id
          description: Google Ads customer ID
        query:
          type: string
          maxLength: 100
          title: Query
          description: Optional search query to filter languages
          default: ''
        limit:
          type: integer
          maximum: 100
          minimum: 1
          title: Limit
          description: Maximum number of results
          default: 50
        force_refresh:
          type: boolean
          title: Force Refresh
          description: Force refresh from API, bypass cache
          default: false
      type: object
      required:
        - google_ads_customer_id
      title: LanguageSearchRequestSchema
      description: Request schema for language search.
    LanguageSearchResponseSchema:
      properties:
        suggestions:
          items:
            $ref: '#/components/schemas/LanguageSuggestionSchema'
          type: array
          title: Suggestions
          description: List of language suggestions
      type: object
      required:
        - suggestions
      title: LanguageSearchResponseSchema
      description: Response schema for language search.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    LanguageSuggestionSchema:
      properties:
        id:
          type: integer
          title: Id
          description: Language ID from LanguageConstant
        name:
          type: string
          title: Name
          description: Language name (e.g., 'English', 'Spanish')
        code:
          type: string
          title: Code
          description: Language code (e.g., 'en', 'es')
      type: object
      required:
        - id
        - name
        - code
      title: LanguageSuggestionSchema
      description: Schema for a single language suggestion.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    OAuth2PasswordBearer:
      type: oauth2
      flows:
        password:
          scopes: {}
          tokenUrl: api/v1/users/authorization/token

````