# 在线翻译（支持 109 种语言）

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /v2/fanyi:
    get:
      summary: 在线翻译（支持 109 种语言）
      deprecated: false
      description: 数据来源于有道翻译，与其网页端同步。
      tags:
        - 🍱 实用功能
      parameters:
        - name: text
          in: query
          description: ''
          required: true
          example: こんにちは
          schema:
            type: string
        - name: from
          in: query
          description: 源语言类型，可通过 `/fanyi/langs` 查询，默认 auto，即自动检测
          required: false
          example: auto
          schema:
            type: string
        - name: to
          in: query
          description: 目标语言类型，可通过 `/fanyi/langs` 查询，默认 auto，源语言为中文则目标为英文，否则目标为中文
          required: false
          example: auto
          schema:
            type: string
        - name: encoding
          in: query
          description: 编码方式，支持 text/json/markdown
          required: false
          schema:
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  data:
                    type: object
                    properties:
                      source:
                        type: object
                        properties:
                          text:
                            type: string
                          type:
                            type: string
                          type_desc:
                            type: string
                          pronounce:
                            type: string
                        required:
                          - text
                          - type
                          - type_desc
                          - pronounce
                      target:
                        type: object
                        properties:
                          text:
                            type: string
                          type:
                            type: string
                          type_desc:
                            type: string
                          pronounce:
                            type: string
                        required:
                          - text
                          - type
                          - type_desc
                          - pronounce
                    required:
                      - source
                      - target
                required:
                  - code
                  - message
                  - data
          headers: {}
          x-apifox-name: 成功
      security: []
      x-apifox-folder: 🍱 实用功能
      x-apifox-status: released
      x-run-in-apifox: https://app.apifox.com/web/project/5757303/apis/api-254700383-run
components:
  schemas: {}
  securitySchemes: {}
servers:
  - url: https://60s.viki.moe
    description: 正式环境
security: []

```
