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

# Canonicalize job titles

> Parse a job description and return the best matching canonical job title.



## OpenAPI

````yaml POST /api/v1/job-titles/canonicalize
openapi: 3.0.3
info:
  title: Normalize API
  version: 1.0.0
  description: >-
    Job title normalization API. Convert natural language job descriptions to
    canonical titles or boolean search strings.
servers:
  - url: https://trynormalize.com
security:
  - bearerAuth: []
paths:
  /api/v1/job-titles/canonicalize:
    post:
      summary: Canonicalize job titles
      description: >-
        Parse a job description and return the best matching canonical job
        title.
      operationId: canonicalize
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/JobTitleRequest'
      responses:
        '200':
          description: Success (single or batch)
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/CanonicalizeResponse'
                  - type: object
                    required:
                      - results
                    properties:
                      results:
                        type: array
                        items:
                          $ref: '#/components/schemas/CanonicalizeResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '402':
          description: Quota exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Parsing or mapping failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: >-
            Rate limited. Retry after delay. Includes Retry-After and
            X-RateLimit-Remaining headers.
          headers:
            Retry-After:
              description: Seconds to wait before retrying
              schema:
                type: integer
                example: 2
            X-RateLimit-Remaining:
              description: Remaining requests in current window (0 when limited)
              schema:
                type: integer
                example: 0
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - bearerAuth: []
components:
  schemas:
    JobTitleRequest:
      type: object
      properties:
        input:
          type: string
          description: Single input string. Use `input` or `inputs`, not both.
          maxLength: 500
        inputs:
          type: array
          items:
            type: string
          maxItems: 100
          description: Batch of inputs. Use `input` or `inputs`, not both.
        exclude:
          type: array
          items:
            type: string
          maxItems: 25
          description: Titles or keywords to exclude from results.
        include:
          type: array
          items:
            type: string
          maxItems: 25
          description: Override parsed include phrases.
        debug:
          type: boolean
          default: false
          description: Include parse structure and matches in response.
      description: Use `input` or `inputs`, not both.
    CanonicalizeResponse:
      type: object
      required:
        - best_title
        - best_title_id
        - cluster
        - cluster_id
        - seniority
        - confidence
        - needs_review
      properties:
        best_title:
          type: string
          nullable: true
        best_title_id:
          type: string
          nullable: true
        cluster:
          type: string
          nullable: true
        cluster_id:
          type: string
          nullable: true
        seniority:
          type: array
          items:
            type: string
        confidence:
          type: number
          minimum: 0
          maximum: 1
        needs_review:
          type: boolean
        debug:
          type: object
          properties:
            parse:
              type: object
              properties:
                language:
                  type: string
                include_groups:
                  type: array
                  items:
                    type: object
                    properties:
                      op:
                        type: string
                      phrases:
                        type: array
                        items:
                          type: string
                exclude_phrases:
                  type: array
                  items:
                    type: string
                detected_seniority:
                  type: array
                  items:
                    type: string
                raw_intent:
                  type: string
            matches:
              type: array
              items:
                type: object
                properties:
                  phrase:
                    type: string
                  title_id:
                    type: string
                  title_label:
                    type: string
                  cluster_id:
                    type: string
                  method:
                    type: string
                  score:
                    type: number
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
            - details
            - request_id
          properties:
            code:
              type: string
              enum:
                - invalid_request
                - limits_exceeded
                - invalid_json
                - invalid_input_format
                - authentication_failed
                - invalid_api_key
                - quota_exceeded
                - plan_restricted_feature
                - resource_not_found
                - bulk_job_conflict
                - parsing_failed
                - ambiguous_mapping
                - rate_limited
                - public_try_exceeded
                - internal_error
                - llm_error
                - database_error
            message:
              type: string
            details:
              type: object
              additionalProperties: true
            request_id:
              type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: 'API key from the dashboard. Pass as `Authorization: Bearer <key>`.'

````