openapi: 3.0.3
info:
  title: UAPI
  version: 1.0.0
  description: UAPI 官方接口文档
servers:
  - url: https://uapis.cn/api/v1
tags:
  - name: Convert
    description: 提供一系列便捷的数据格式转换工具，帮你处理开发中常见的数据转换任务。
  - name: Daily
    description: 提供每日更新的趣味性或信息性内容，例如新闻、图片等。
  - name: Game
    description: 提供一系列与游戏相关的查询服务，涵盖 Minecraft、Steam 等平台。
  - name: Image
    description: 提供一系列与图片处理和获取相关的功能，从生成二维码到获取壁纸，应有尽有。
  - name: Misc
    description: 一个“百宝箱”，集合了各种实用但不好归类的API，从查天气到查热榜，应有尽有。
  - name: Network
    description: 提供一系列网络诊断和查询工具，帮助你快速定位网络问题或获取网络信息。
  - name: Poem
    description: 提供与诗词、名言相关的API，为你的应用增添一抹人文色彩。
  - name: Random
    description: 提供各种随机内容生成器，从随机字符串到随机图片。
  - name: Social
    description: 提供与主流社交平台（如B站、QQ）相关的用户信息查询服务。
  - name: Status
    description: 提供API自身的状态、监控和使用情况统计。通常需要管理员权限才能访问。
  - name: Text
    description: 提供一系列文本处理工具，包括加解密、哈希计算、内容分析等。
  - name: Translate
    description: 提供文本翻译服务，打破语言的壁垒。
  - name: WebParse
    description: 提供网页内容解析和提取的工具。
  - name: Clipzy 在线剪贴板
    description: |-
      由第三方服务 [Clipzy™](https://paste.sdjz.wiki/) 提供的端到端加密文本片段服务。详情请参阅其[隐私协议](https://paste.sdjz.wiki/privacy)。

      Clipzy 的核心是 **“端到端加密”**，意思是**加密和解密的“钥匙”只存在于您和接收者的设备上**，服务器只负责保管一个谁也打不开的“加密保险箱”，从而确保了内容的绝对隐私。

      ## 如何使用：两种方法
      根据您的安全需求和使用场景，我们提供两种使用方法。

      ### 方法一：最高安全等级 (推荐)

      此方法遵循严格的端到端加密模型，您的原始文本和密钥**永远不会**发送到服务器。

      **适用场景**：在网页应用中分享敏感信息，构建安全的在线便签等。

      **工作流程**：

      -   **第一步：创建和加密 (在你的应用中)**
          1.  **生成密钥**：在客户端本地创造一把独一无二的钥匙。
          2.  **加密内容**：用这把钥匙将你的原文锁进一个保险箱。
          3.  **上传保险箱**：调用 [POST /api/store](/docs/api-reference/post-clipzy-store) 接口，把锁好的保险箱（密文）交给服务器保管，服务器会给你一个储物柜编号 (ID)。
          4.  **组合分享链接**：将储物柜编号 (ID) 和你的钥匙 (密钥) 组合成一个特殊的分享链接。

      -   **第二步：分享和解密 (在接收者的应用中)**
          1.  **解析链接**：接收者打开链接，应用自动从链接中分离出储物柜编号和钥匙。
          2.  **取回保险箱**：调用 [GET /api/get](/docs/api-reference/get-clipzy-get) 接口，凭编号取回加密的保险箱。
          3.  **开锁**：用钥匙在本地打开保险箱，看到原始内容。

      *下面的 **JavaScript 完整示例**详细演示了此方法。*

      ### 方法二：服务器端解密 (方便自动化)

      此方法**安全性较低**，因为它需要您将密钥作为参数发送给服务器。但对于无法执行复杂解密操作的自动化脚本（如 `curl` 或 Python 脚本）来说，非常方便。

      **适用场景**：在命令行或后端服务中，快速获取之前存储的配置或秘密信息。

      **工作流程**：

      1.  **准备工作**：你首先需要知道一个加密片段的 **ID** (储物柜编号) 和它的**密钥** (钥匙)。这通常是你之前通过方法一创建并自己保存下来的。
      2.  **请求解密**：调用 [GET /api/raw/{id}](/docs/api-reference/get-clipzy-raw) 接口，把储物柜编号 (ID) 和钥匙 (密钥) 同时交给服务器。
      3.  **获取原文**：服务器用你给的钥匙打开保险箱，然后直接把里面的东西（原始纯文本）递给你。

      > [!WARNING]
      > **请谨慎使用！** 虽然服务器承诺不记录密钥或解密后的内容，但此操作破坏了严格的端到端加密模型。请仅在您信任服务器或内容敏感度不高时使用。

      --- 

      ## 代码示例

      ### 示例1 (最高安全): 完整的JavaScript实现

      在线API测试工具无法模拟完整的端到端加密流程。下面的示例展示了如何在您的网站或应用中，通过JavaScript实现从生成密钥到最终解密的全部步骤。您可以将此代码保存为一个HTML文件直接在浏览器中运行。

      ```html
      <!DOCTYPE html>
      <html>
      <head>
          <title>Clipzy E2EE Demo</title>
          <!-- 引入 lz-string 库 -->
          <script src="https://cdnjs.cloudflare.com/ajax/libs/lz-string/1.5.0/lz-string.min.js"></script>
      </head>
      <body>
          <h1>Clipzy 端到端加密示例</h1>
          <textarea id="originalText" rows="10" cols="80" placeholder="在此输入您想加密分享的文本..."></textarea>
          <br>
          <button onclick="createEncryptedPaste()">创建加密链接</button>
          <hr>
          <h2>生成的分享链接:</h2>
          <input id="shareableLink" type="text" size="100" readonly>
          <hr>
          <h2>从链接解析内容:</h2>
          <input id="pasteLink" type="text" size="100" placeholder="将上面生成的链接粘贴到此处进行解密">
          <button onclick="decryptPasteFromLink()">解密</button>
          <h3>解密后的内容:</h3>
          <pre id="decryptedText" style="background-color: #f0f0f0; border: 1px solid #ccc; padding: 10px;"></pre>

          <script>
              // --- 辅助函数：ArrayBuffer 与 Base64 互相转换 ---
              function arrayBufferToBase64(buffer) {
                  let binary = '';
                  const bytes = new Uint8Array(buffer);
                  const len = bytes.byteLength;
                  for (let i = 0; i < len; i++) {
                      binary += String.fromCharCode(bytes[i]);
                  }
                  return window.btoa(binary);
              }

              function base64ToArrayBuffer(base64) {
                  const binary_string = window.atob(base64);
                  const len = binary_string.length;
                  const bytes = new Uint8Array(len);
                  for (let i = 0; i < len; i++) {
                      bytes[i] = binary_string.charCodeAt(i);
                  }
                  return bytes.buffer;
              }

              // --- 核心加密函数 ---
              async function createEncryptedPaste() {
                  try {
                      document.getElementById('shareableLink').value = '正在创建，请稍候...';
                      const originalText = document.getElementById('originalText').value;
                      if (!originalText) {
                          alert('请输入内容！');
                          return;
                      }

                      // 1. 在客户端生成一个 AES-GCM 密钥
                      const key = await window.crypto.subtle.generateKey(
                          { name: "AES-GCM", length: 256 },
                          true, // a boolean value indicating whether the key can be extracted from the CryptoKey object
                          ["encrypt", "decrypt"]
                      );

                      // 2. 使用 LZ-String 压缩原始文本
                      const compressedText = LZString.compressToUTF16(originalText);

                      // 3. 使用密钥加密压缩后的数据
                      const iv = window.crypto.getRandomValues(new Uint8Array(12)); // GCM 推荐使用 12 字节的 IV
                      const encryptedData = await window.crypto.subtle.encrypt(
                          { name: "AES-GCM", iv: iv },
                          key,
                          new TextEncoder().encode(compressedText)
                      );

                      // 将 IV 和加密数据合并，并转为 Base64
                      const combined = new Uint8Array(iv.length + encryptedData.byteLength);
                      combined.set(iv, 0);
                      combined.set(new Uint8Array(encryptedData), iv.length);
                      const dataToSend = arrayBufferToBase64(combined);
                      
                      // 4. 调用 POST /api/store 上传加密数据
                      const response = await fetch('https://uapipro.cn/api/proxy?url=https%3A%2F%2Fpaste.sdjz.wiki%2Fapi%2Fstore', {
                          method: 'POST',
                          headers: { 'Content-Type': 'application/json' },
                          body: JSON.stringify({ compressedData: dataToSend, ttl: 3600 })
                      });
                      const result = await response.json();
                      if (!response.ok) throw new Error(result.error || '上传失败');

                      // 5. 将 ID 和 Base64 密钥组合成 URL 片段
                      const exportedKey = await window.crypto.subtle.exportKey("raw", key);
                      const keyB64 = arrayBufferToBase64(exportedKey);
                      const fragment = `${result.id}!${keyB64}`;

                      // 6. 构建完整的分享链接
                      const shareableLink = `https://paste.sdjz.wiki/#${fragment}`;
                      document.getElementById('shareableLink').value = shareableLink;

                  } catch (error) {
                      console.error('加密失败:', error);
                      document.getElementById('shareableLink').value = `错误: ${error.message}`;
                  }
              }

              // --- 核心解密函数 ---
              async function decryptPasteFromLink() {
                  try {
                      document.getElementById('decryptedText').innerText = '正在解密，请稍候...';
                      const pasteLink = document.getElementById('pasteLink').value;
                      const fragment = new URL(pasteLink).hash.substring(1);
                      if (!fragment.includes('!')) throw new Error('无效的链接格式');
                      
                      // 1. 从 URL 片段中解析出 ID 和密钥
                      const [id, keyB64] = fragment.split('!');
                      const keyBuffer = base64ToArrayBuffer(keyB64);
                      const key = await window.crypto.subtle.importKey(
                          "raw",
                          keyBuffer,
                          { name: "AES-GCM" },
                          true,
                          ["decrypt"]
                      );

                      // 2. 调用 GET /api/get 获取加密数据
                      const response = await fetch(`https://uapipro.cn/api/proxy?url=https%3A%2F%2Fpaste.sdjz.wiki%2Fapi%2Fget%3Fid%3D${id}`);
                      const result = await response.json();
                      if (!response.ok) throw new Error(result.error || '获取数据失败');

                      const combined = base64ToArrayBuffer(result.compressedData);
                      const iv = combined.slice(0, 12);
                      const data = combined.slice(12);

                      // 3. 使用密钥在客户端解密数据
                      const decryptedData = await window.crypto.subtle.decrypt(
                          { name: "AES-GCM", iv: iv },
                          key,
                          data
                      );

                      // 4. 解压解密后的数据
                      const decompressedText = LZString.decompressFromUTF16(new TextDecoder().decode(decryptedData));
                      
                      // 5. 成功，显示原始文本
                      document.getElementById('decryptedText').innerText = decompressedText;

                  } catch (error) {
                      console.error('解密失败:', error);
                      document.getElementById('decryptedText').innerText = `错误: ${error.message}`;
                  }
              }

          </script>
      </body>
      </html>
      ```

      ### 示例2 (方便自动化): 使用cURL直接获取明文
      假设您已经通过某种方式（例如运行了上面的JS示例）创建了一个加密片段，并得到了ID和密钥：
      -   **ID**: `tzy4AllxQP`
      -   **密钥**: `a1b2c3d4e5f6g7h8` (这里只是一个例子，实际密钥是一长串Base64字符)

      现在，您可以在任何地方的命令行中，使用 `curl` 直接获取原始文本：

      ```bash
      # 将 {id} 和 {key} 替换成你自己的
      curl "https://paste.sdjz.wiki/api/raw/tzy4AllxQP?key=a1b2c3d4e5f6g7h8"
      ```

      服务器会返回解密后的纯文本，非常适合在脚本中使用。
  - name: 智能搜索
    description: UAPI Pro Search 是一个智能搜索引擎 API，提供高质量的实时网页搜索、AI 智能摘要和自有机器学习回归排序算法。
  - name: 敏感词识别
    description: 提供智能敏感词检测服务，能够从多个维度分析文本的风险等级，并提供详细的分析结果和风险评分。
paths:
  /convert/json:
    post:
      tags:
        - Convert
      summary: JSON 格式化
      description: >-
        还在为一团乱麻的 JSON 字符串头疼吗？这个接口能瞬间让它变得井井有条，赏心悦目。


        ## 功能概述

        你只需要提供一个原始的、可能是压缩过的或者格式混乱的 JSON 字符串，这个 API 就会返回一个经过美化（带标准缩进和换行）的版本。这在调试
        API 响应、或者需要在前端界面清晰展示 JSON 数据时非常有用。


        ## 使用须知

        > [!NOTE]

        > **请求格式**

        > 请注意，待格式化的 JSON 字符串需要被包裹在另一个 JSON 对象中，作为 `content` 字段的值提交。具体格式请参考请求体示例。


        ## 错误处理指南

        - **400 Bad Request**: 最常见的原因是你提供的 `content` 字符串本身不是一个有效的
        JSON。请仔细检查括号、引号是否正确闭合，或者有没有多余的逗号等语法错误。
      operationId: post-convert-json
      parameters: []
      responses:
        "200":
          description: 格式化成功！返回一个包含美化后JSON字符串的对象。
          content:
            application/json:
              schema:
                type: object
                properties:
                  content:
                    type: string
                    description: 格式化后的JSON字符串，带有标准缩进和换行。
                    example: |-
                      {
                        "name": "John Doe",
                        "age": 30,
                        "isStudent": false,
                        "courses": [
                          {
                            "title": "History",
                            "credits": 3
                          },
                          {
                            "title": "Math",
                            "credits": 4
                          }
                        ]
                      }
        "400":
          description: 请求失败。这通常意味着你提供的 `content`
            字符串不是一个合法的JSON格式。请检查括号、引号是否匹配，以及末尾是否有多余的逗号等常见错误。
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    description: 机器可读的错误代码。
                    example: INVALID_ARGUMENT
                  details:
                    type: object
                    description: 包含错误详情的对象。
                    example:
                      reason: Invalid JSON format in 'content' field
                  message:
                    type: string
                    description: 人类可读的错误描述信息。
                    example: The provided JSON string is invalid.
      requestBody:
        description: 这是一个JSON对象，里面必须包含一个名为 `content` 的字段。这个字段的值，就是你希望格式化的、原始的JSON字符串。
        required: true
        content:
          application/json:
            schema:
              required:
                - content
              type: object
              properties:
                content:
                  type: string
                  description: 需要被格式化的原始JSON字符串。
                  example: '{"name":"John
                    Doe","age":30,"isStudent":false,"courses":[{"title":"History","credits":3},{"title":"Math","credits":4}]}'
      x-search-words:
        - 格式化
        - 美化
        - 校验
        - 验证
        - 压缩
        - 字符串
        - prettify
        - beautify
        - format
        - validate
        - parse
      x-seo-optimized-text: 免费JSON格式化API接口，快速美化和格式化JSON字符串。支持JSON校验、压缩、美化等功能。专业的JSON处理工具，适用于API调试、数据展示、开发调试等场景。
      x-seo-keywords:
        - 免费JSON格式化API
        - JSON美化接口
        - JSON校验API
        - JSON解析服务
        - JSON处理工具
        - JSON prettify
        - 数据格式化API
      x-seo-title: 免费JSON格式化美化API接口 - JSON字符串处理服务
      x-seo-usage-scenarios: 适用于API响应调试、前端数据展示、配置文件美化、JSON数据校验、开发工具集成、代码格式化、数据可视化等场景
      x-seo-related-apis:
        - 文本处理
        - 数据校验
        - 格式转换
        - 开发工具
  /convert/unixtime:
    get:
      tags:
        - Convert
      summary: 时间戳转换
      description: >-
        时间戳和日期字符串，哪个用着更顺手？别纠结了，这个接口让你轻松拥有两种格式！


        ## 功能概述

        这是一个非常智能的转换器。你给它一个 Unix 时间戳，它还你一个人类可读的日期时间；你给它一个日期时间字符串，它还你一个 Unix
        时间戳。它会自动识别你输入的是哪种格式。


        ## 使用须知

        这个接口非常智能，能够自动识别输入格式：


        - **输入时间戳**：支持10位秒级（如 `1672531200`）和13位毫秒级（如 `1672531200000`）。

        - **输入日期字符串**：为了确保准确性，推荐使用 `YYYY-MM-DD HH:mm:ss` 标准格式（如 `2023-01-01
        08:00:00`）。


        > [!TIP]

        > 无论你输入哪种格式，响应中都会同时包含标准日期字符串和秒级Unix时间戳，方便你按需取用。


        ## 错误处理指南

        - **400 Bad Request**: 如果你提供的 `time`
        参数既不是有效的时间戳，也不是我们支持的日期格式，就会收到这个错误。请检查你的输入值。
      operationId: get-convert-unixtime
      parameters:
        - name: time
          in: query
          required: true
          description: 一个智能时间参数，可传入Unix时间戳（10位或13位）或标准日期字符串（如 '2023-10-27
            10:30:00'），系统将自动识别并转换。
          schema:
            type: string
            example: "1698380645"
          x-tooltip: 传入时间戳返回日期，传入日期返回时间戳。
      responses:
        "200":
          description: 转换成功！响应中会同时包含标准日期字符串和秒级Unix时间戳，方便你使用。
          content:
            application/json:
              schema:
                type: object
                properties:
                  datetime:
                    type: string
                    description: 标准格式（YYYY-MM-DD HH:mm:ss）的日期时间字符串。
                    example: 2023-10-27 15:04:05
                  timestamp:
                    type: integer
                    description: 转换后的10位秒级Unix时间戳。
                    example: 1698380645
        "400":
          description: 请求失败。请检查你提供的 `time` 参数是否是有效的时间戳或我们支持的日期格式（YYYY-MM-DD HH:mm:ss）。
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    description: 机器可读的错误代码。
                    example: INVALID_TIME_FORMAT
                  details:
                    type: object
                    description: 包含错误详情的对象。
                    example:
                      input: 2023/10/27 15:04:05
                  message:
                    type: string
                    description: 人类可读的错误描述信息。
                    example: Invalid time parameter format.
      x-search-words:
        - 时间戳
        - 日期
        - 转换
        - timestamp
        - unixtime
        - datetime
        - date
        - format
        - 时间格式化
        - 毫秒
        - 秒
      x-seo-optimized-text: 免费Unix时间戳转换API接口，支持时间戳与日期字符串双向转换。提供多种日期格式，支持时区转换。专业的时间处理工具，适用于系统开发、数据处理、日志分析等场景。
      x-seo-keywords:
        - 免费时间戳转换API
        - Unix时间戳API
        - 日期转换接口
        - 时间格式化服务
        - 时间戳工具API
        - 日期时间API
        - 时间处理接口
      x-seo-title: 免费Unix时间戳转换API接口 - 日期时间格式化服务
      x-seo-usage-scenarios: 适用于系统日志处理、数据库时间字段、API时间参数、前端时间展示、数据分析、定时任务、事件记录等场景
      x-seo-related-apis:
        - 文本处理
        - 数据格式化
        - 系统工具
        - 开发辅助
  /daily/news-image:
    get:
      tags:
        - Daily
      summary: 每日新闻图
      description: |-
        想用一张图快速了解天下大事？这个接口为你一键生成今日新闻摘要，非常适合用在早报、数字看板或应用首页等场景。

        ## 功能概述
        此接口会实时抓取各大平台的热点新闻，并动态地将它们渲染成一张清晰、美观的摘要图片。你调用接口，直接就能得到一张可以展示的图片。

        ## 使用须知
        调用此接口时，请务必注意以下两点：

        1.  **响应格式是图片**：接口成功时直接返回 `image/jpeg` 格式的二进制数据，而非 JSON。请确保你的客户端能正确处理二进制流，例如直接在 `<img>` 标签中显示，或保存为 `.jpg` 文件。

        2.  **设置合理超时**：由于涉及实时新闻抓取和图片渲染，处理过程可能耗时数秒。建议将客户端请求超时时间设置为至少10秒，以防止因等待过久而失败。

        > [!IMPORTANT]
        > 未能正确处理图片响应或超时设置过短，是导致调用失败的最常见原因。
      operationId: get-daily-news-image
      parameters: []
      responses:
        "200":
          description: 请求成功！响应体是JPEG格式的图片二进制数据。你可以直接将其显示或保存为图片文件。
          content:
            image/jpeg:
              schema:
                type: string
                format: binary
        "500":
          description: 服务器内部错误。这可能是我们的图片渲染服务遇到了临时故障。我们已经被自动通知，请稍后重试。
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    description: 机器可读的错误代码。
                    example: INTERNAL_SERVER_ERROR
                  message:
                    type: string
                    description: 人类可读的错误描述信息。
                    example: Failed to generate image due to an internal error.
        "502":
          description: 上游服务错误。我们在尝试从新闻源（如微博、知乎等）获取数据时失败了。这可能是因为上游服务暂时不可用或更改了接口。这个问题通常很快会解决，请稍后重试。
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    description: 机器可读的错误代码。
                    example: UPSTREAM_ERROR
                  message:
                    type: string
                    description: 人类可读的错误描述信息。
                    example: Failed to fetch news from upstream provider.
      x-search-words:
        - 新闻
        - 早报
        - 日报
        - 摘要
        - 热点
        - 资讯
        - 图片生成
        - news
        - summary
        - image
        - 简报
      x-seo-optimized-text: 免费每日新闻摘要图片生成API接口，自动抓取热点新闻并生成精美的摘要图片。支持实时新闻、热点资讯、日报生成。适用于新闻应用、数字看板、社交分享等场景。
      x-seo-keywords:
        - 免费新闻摘要API
        - 新闻图片生成接口
        - 每日新闻API
        - 热点资讯服务
        - 新闻早报API
        - 图片生成API
        - 新闻摘要工具
      x-seo-title: 免费每日新闻摘要图片生成API - 热点资讯图片服务
      x-seo-usage-scenarios: 适用于新闻应用首页、企业数字看板、社交媒体分享、个人博客配图、微信公众号素材、教育机构资讯展示等场景
      x-seo-related-apis:
        - 图片处理
        - 内容生成
        - 数据抓取
        - 图片合成
  /game/minecraft/historyid:
    get:
      tags:
        - Game
      summary: 查询 MC 曾用名
      description: >-
        想知道某个大佬以前叫什么名字吗？这个接口可以帮你追溯一个 Minecraft 玩家的“黑历史”！


        ## 功能概述

        通过提供玩家的用户名或 UUID，你可以获取到该玩家所有曾用名及其变更时间的列表。这对于识别回归的老玩家或者社区管理非常有用。


        ## 使用须知

        > [!NOTE]

        > **参数说明**

        > - `name` 和 `uuid` 二选一

        > - UUID 支持带连字符（如 `ee9b4ed1-aac1-491e-b761-1471be374b80`）或不带连字符格式


        > [!IMPORTANT]

        > **响应结构差异**

        > - 使用 `uuid` 查询：返回单个用户的历史记录

        > - 使用 `name` 查询：返回所有匹配用户的列表（包括当前用户名或曾用名匹配的玩家），需判断响应中是否有 `results`
        字段来区分两种模式
      operationId: get-game-minecraft-historyid
      parameters:
        - name: name
          in: query
          required: false
          description: 玩家的 Minecraft 用户名。使用此参数查询时，会返回所有匹配用户的列表（包括当前用户名或曾用名匹配的玩家）。
          schema:
            type: string
            example: ExamplePlayer
          x-tooltip: 输入用户名，返回所有匹配的玩家列表
        - name: uuid
          in: query
          required: false
          description: 玩家的 Minecraft UUID，支持带连字符或不带连字符格式。
          schema:
            type: string
            example: ee9b4ed1-aac1-491e-b761-1471be374b80
          x-tooltip: "格式示例: ee9b4ed1-aac1-491e-b761-1471be374b80"
      responses:
        "200":
          description: |-
            查询成功！根据查询方式返回不同结构：
            - **uuid 查询**：返回单个用户的历史记录
            - **name 查询**：返回匹配用户列表（判断响应中是否有 `results` 字段来区分）
          content:
            application/json:
              schema:
                type: object
                description: 响应结构根据查询参数不同而变化
                properties:
                  query:
                    type: string
                    description: 【name 查询时返回】查询的用户名。
                    example: ExamplePlayer
                  count:
                    type: integer
                    description: 【name 查询时返回】匹配到的用户数量，为 0 时表示未找到。
                    example: 2
                  results:
                    type: array
                    description: 【name 查询时返回】匹配用户列表，包含当前用户名或曾用名匹配的所有玩家。
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          description: 玩家当前的用户名。
                          example: ExamplePlayer
                        uuid:
                          type: string
                          description: 玩家的UUID（带连字符格式）。
                          example: a1b2c3d4-e5f6-7890-abcd-ef1234567890
                        name_num:
                          type: integer
                          description: 历史名称的总数。
                          example: 1
                        history:
                          type: array
                          description: 历史用户名数组。
                          items:
                            type: object
                            properties:
                              name:
                                type: string
                                example: ExamplePlayer
                              changedToAt:
                                type: string
                                example: 2023/09/13 10:10:06
                  id:
                    type: string
                    description: 【uuid 查询时返回】玩家当前的用户名。
                    example: T8K_
                  uuid:
                    type: string
                    description: 【uuid 查询时返回】被查询玩家的UUID（带连字符格式）。
                    example: ee9b4ed1-aac1-491e-b761-1471be374b80
                  name_num:
                    type: integer
                    description: 【uuid 查询时返回】历史名称的总数（包含当前名称）。
                    example: 4
                  history:
                    type: array
                    description: 【uuid 查询时返回】包含所有历史用户名的数组，按时间倒序排列。
                    items:
                      type: object
                      properties:
                        changedToAt:
                          type: string
                          description: 更名为此名称的时间，格式为 `YYYY/MM/DD HH:mm:ss`。如果是初始名称，则为 `Initial`。
                          example: 2015/02/04 22:42:25
                        name:
                          type: string
                          description: 当时使用的用户名。
                          example: jeb_
        "400":
          description: 请求失败。请检查你是否提供了 `name` 或 `uuid` 参数中的至少一个。
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: INVALID_ARGUMENT
                  details:
                    type: object
                  message:
                    type: string
                    example: uuid or name query parameter is required
        "404":
          description: 用户未找到。我们根据你提供的 UUID 未能找到对应的 Minecraft 玩家。请确认 UUID 是否正确。
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: NOT_FOUND
                  details:
                    type: object
                  message:
                    type: string
                    example: User with the specified UUID not found.
        "502":
          description: 服务暂时不可用，请稍后重试。
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: UPSTREAM_ERROR
                  details:
                    type: object
                  message:
                    type: string
                    example: Service temporarily unavailable.
      x-search-words:
        - minecraft
        - mc
        - 我的世界
        - 曾用名
        - 历史用户名
        - 改名记录
        - uuid
        - 玩家查询
        - mojang
        - id
        - name
        - 用户名
      x-seo-optimized-text: 免费Minecraft玩家曾用名查询API，我的世界历史用户名追溯接口。通过用户名或UUID查询玩家所有历史名称及变更时间。稳定可靠的MC玩家历史数据API服务，适用于服务器管理、玩家识别、社区运营等场景。
      x-seo-keywords:
        - 免费Minecraft API
        - MC曾用名查询
        - 我的世界历史ID
        - Minecraft改名记录
        - 玩家历史用户名
        - UUID查询API
        - Mojang玩家数据
      x-seo-title: 免费Minecraft玩家曾用名查询API - MC历史用户名追溯
      x-seo-usage-scenarios: 适用于Minecraft服务器管理、玩家身份追溯、社区运营、封禁记录关联、老玩家识别、游戏数据分析等场景
      x-seo-related-apis:
        - Minecraft玩家信息
        - Minecraft服务器状态
        - Steam用户信息
        - 游戏数据API
  /game/minecraft/serverstatus:
    get:
      tags:
        - Game
      summary: 查询 MC 服务器
      description: >-
        想在加入服务器前看看有多少人在线？或者检查一下服务器开没开？用这个接口就对了！


        ## 功能概述

        你可以通过提供服务器地址（域名或IP），来获取一个 Minecraft Java
        版服务器的实时状态。返回信息非常丰富，包括服务器是否在线、当前玩家数、最大玩家数、服务器版本、MOTD（每日消息）以及服务器图标等。
      operationId: get-game-minecraft-serverstatus
      parameters:
        - name: server
          in: query
          required: true
          description: Minecraft服务器的地址，可以是域名（如 `hypixel.net`）或 `IP:端口` 的形式（如
            `mc.example.com:25565`）。如果省略端口，将默认使用 `25565`。
          schema:
            type: string
            example: hypixel.net
          x-tooltip: "例如: hypixel.net 或 mc.example.com"
      responses:
        "200":
          description: 查询成功！返回服务器的详细状态信息。
          content:
            application/json:
              schema:
                type: object
                properties:
                  favicon_url:
                    type: string
                    description: 服务器图标的 Base64 Data URI。你可以直接在 `<img>` 标签的 `src` 属性中使用它。
                    example: data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACayAAACqaXHeAAAA...
                  ip:
                    type: string
                    description: 服务器解析后的IP地址。
                    example: 172.65.252.238
                  max_players:
                    type: integer
                    description: 服务器配置的最大玩家容量。
                    example: 20000
                  motd_clean:
                    type: string
                    description: 纯文本格式的服务器MOTD（每日消息），去除了所有颜色和格式代码。
                    example: |-
                      Hypixel Network [1.8-1.20]
                                                            SKYBLOCK
                  motd_html:
                    type: string
                    description: HTML格式的服务器MOTD，保留了颜色和样式，方便你在网页上直接渲染。
                    example: '<span style="color: #ffff55"><b>Hypixel Network </b></span><span
                      style="color: #555555">[</span><span style="color:
                      #aaaaaa">1.8-1.20</span><span style="color:
                      #555555">]</span><br /><span style="color:
                      #ffffff">                                      </span><span
                      style="color: #55ff55"><b>SKYBLOCK</b></span>'
                  online:
                    type: boolean
                    description: 服务器当前是否在线。
                    example: true
                  players:
                    type: integer
                    description: 当前在线的玩家数量。
                    example: 45321
                  port:
                    type: integer
                    description: 服务器使用的端口。
                    example: 25565
                  version:
                    type: string
                    description: 服务器报告的版本信息。
                    example: Requires 1.8-1.20
        "400":
          description: 请求失败。请检查你是否提供了 `server` 参数。
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: INVALID_ARGUMENT
                  details:
                    type: object
                  message:
                    type: string
                    example: Missing 'server' parameter.
        "404":
          description: 服务器未找到。这可能意味着你提供的服务器地址无法解析，或者服务器当前处于离线状态。
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: NOT_FOUND
                  details:
                    type: object
                  message:
                    type: string
                    example: Server not found or is offline.
        "502":
          description: 查询失败。在尝试连接并获取服务器信息时发生网络错误或协议错误。
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: UPSTREAM_ERROR
                  details:
                    type: object
                  message:
                    type: string
                    example: Failed to query server status.
      x-search-words:
        - minecraft
        - mc
        - 我的世界
        - 服务器状态
        - 服务器信息
        - 在线人数
        - motd
        - ping
        - server status
        - java
      x-seo-optimized-text: 免费Minecraft服务器状态查询API，实时获取MC
        Java版服务器在线状态、玩家人数、服务器版本、MOTD和图标。支持Hypixel等主流服务器查询，无需注册即可调用。适用于服务器监控、玩家社区、MC工具开发等场景。
      x-seo-keywords:
        - Minecraft服务器查询API
        - MC服务器状态
        - 我的世界服务器API
        - Minecraft在线人数查询
        - MC服务器监控
        - Hypixel服务器状态
        - 免费MC API
        - 服务器Ping
      x-seo-title: Minecraft服务器状态查询API - 在线人数实时监控
      x-seo-usage-scenarios: 适用于Minecraft服务器监控面板、玩家社区网站、MC服务器列表、游戏启动器、Discord机器人等场景
      x-seo-related-apis:
        - Minecraft玩家信息查询
        - Minecraft历史ID查询
        - Steam用户信息
  /game/minecraft/userinfo:
    get:
      tags:
        - Game
      summary: 查询 MC 玩家
      description: |-
        只需要一个玩家的用户名，就能快速获取到他的正版皮肤和独一无二的UUID！

        ## 功能概述
        这是一个基础但非常实用的接口。通过玩家当前的游戏内名称（Username），你可以查询到他对应的UUID（唯一标识符）和当前皮肤的URL地址。这是构建许多其他玩家相关服务的第一步。
      operationId: get-game-minecraft-userinfo
      parameters:
        - name: username
          in: query
          required: true
          description: 玩家的 Minecraft 游戏内名称（正版ID）。
          schema:
            type: string
            example: Notch
          x-tooltip: "例如: Notch"
      responses:
        "200":
          description: 查询成功！返回用户的UUID和皮肤链接。
          content:
            application/json:
              schema:
                type: object
                properties:
                  skin_url:
                    type: string
                    description: 玩家当前使用的皮肤图片URL。
                    example: http://textures.minecraft.net/texture/292009a499420915b854a9913d9fa92750175814529452a55982791844863f53
                  username:
                    type: string
                    description: 玩家当前的准确用户名（注意大小写可能与输入不同）。
                    example: Notch
                  uuid:
                    type: string
                    description: 玩家的32位无破折号UUID。
                    example: ee9b4ed1aac1491eb7611471be374b80
        "400":
          description: 请求失败。请检查你是否提供了 `username` 参数。
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: INVALID_ARGUMENT
                  details:
                    type: object
                  message:
                    type: string
                    example: Missing 'username' parameter.
        "404":
          description: 玩家未找到。根据你提供的用户名，未能找到对应的 Minecraft 玩家。请检查拼写是否正确。
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: NOT_FOUND
                  details:
                    type: object
                  message:
                    type: string
                    example: Player with the specified username not found.
        "502":
          description: 上游服务错误。在向 Mojang 的官方 API 请求数据时遇到了问题。这可能是他们的服务暂时中断，请稍后重试。
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: UPSTREAM_ERROR
                  details:
                    type: object
                  message:
                    type: string
                    example: Failed to fetch data from Mojang API.
      x-search-words:
        - minecraft
        - mc
        - 我的世界
        - 玩家信息
        - 查uuid
        - 皮肤
        - skin
        - 正版查询
        - username
        - id
      x-seo-optimized-text: 免费Minecraft玩家信息查询API，通过用户名获取正版玩家UUID和皮肤URL。支持快速验证正版账号，获取高清皮肤图片。无需注册，即调即用。适用于服务器管理、玩家验证、皮肤展示等场景。
      x-seo-keywords:
        - 免费Minecraft API
        - MC玩家查询
        - 我的世界UUID查询
        - Minecraft皮肤API
        - 正版玩家验证
        - MC用户名查询
        - 游戏玩家信息API
        - Mojang API
      x-seo-title: 【免费】Minecraft玩家信息查询API - UUID/皮肤一键获取
      x-seo-usage-scenarios: 适用于Minecraft服务器管理、玩家身份验证、皮肤展示系统、玩家数据统计、游戏社区应用、MC工具开发等场景
      x-seo-related-apis:
        - Minecraft服务器状态
        - Minecraft历史ID查询
        - Steam用户信息
        - 游戏数据API
  /game/steam/summary:
    get:
      tags:
        - Game
      summary: 查询 Steam 用户
      description: >-
        想在你的网站或应用中展示用户的 Steam 个人资料？这个接口就是为你准备的。


        ## 功能概述

        通过一个用户的 Steam
        标识（支持多种格式），你可以获取到他公开的个人资料摘要，包括昵称、头像、在线状态、真实姓名（如果公开）和个人资料主页URL等信息。


        ## 支持的参数格式

        接口现在支持以下几种标识符格式：

        - **`steamid`**: 64位SteamID（如 `76561197960287930`）

        - **`id`**: 自定义URL名称（如 `gabelogannewell`）

        - **`id3`**: Steam ID3格式（如 `STEAM_0:0:22202`）

        - 完整的个人资料链接

        - 好友代码


        ## 使用须知


        > [!IMPORTANT]

        > **API Key 安全**

        > 此接口需要一个 Steam Web API Key。我们强烈建议由后端统一配置和调用，以避免在客户端泄露。当然，你也可以通过 `key`
        查询参数临时提供一个Key来覆盖后端配置。


        在处理响应时，请注意以下数字代码的含义：

        - **`personastate` (用户状态)**: 0-离线, 1-在线, 2-忙碌, 3-离开, 4-打盹, 5-想交易, 6-想玩。

        - **`communityvisibilitystate` (社区可见性)**: 1-私密, 3-公开 (API通常只能查到这两种状态)。
      operationId: get-game-steam-summary
      parameters:
        - name: steamid
          in: query
          required: false
          description: |-
            用户的 Steam 标识。可以是以下任意一种格式：
            - 纯数字的 **SteamID64**
            - 用户的 **自定义 URL 名称** (Vanity URL)
            - 完整的 **个人资料链接** (包含 SteamID64 或自定义名称)
            - 好友代码 (如 `22202`)
          schema:
            type: string
            example: "76561197960287930"
          x-tooltip: |-
            支持多种格式，例如：
            - SteamID64: 76561197960287930
            - 自定义名称: gabelogannewell
            - 个人资料链接（ID）: https://steamcommunity.com/profiles/76561197960287930
            - 个人资料链接（自定义名）: https://steamcommunity.com/id/gabelogannewell
            - 好友代码: 22202
        - name: id
          in: query
          required: false
          description: 用户的 Steam 自定义URL名称（Vanity URL）。例如个人资料链接中 `/id/` 后面的部分。
          schema:
            type: string
            example: gabelogannewell
          x-tooltip: "自定义URL名称，例如: gabelogannewell"
        - name: id3
          in: query
          required: false
          description: 用户的 Steam ID3 格式标识符。传统的 Steam ID 格式，形如 STEAM_X:Y:Z。
          schema:
            type: string
            example: STEAM_0:0:22202
          x-tooltip: "Steam ID3格式，例如: STEAM_0:0:22202"
        - name: key
          in: query
          required: false
          description: 你的 Steam Web API
            Key。这是一个可选参数，如果提供，它将覆盖我们在后端配置的全局Key。这为你提供了更大的灵活性，但请务必注意Key的保密，不要在前端暴露。
          schema:
            type: string
          x-tooltip: 可选，用于覆盖全局API Key。
      responses:
        "200":
          description: 查询成功！返回用户的 Steam 公开资料摘要。
          content:
            application/json:
              schema:
                type: object
                properties:
                  avatar:
                    type: string
                    description: 32x32 像素的小尺寸头像URL。
                    example: https://avatars.steamstatic.com/fef49e7fa7e1997310d705b2a6158ff8dc1cdfeb.jpg
                  avatarfull:
                    type: string
                    description: 184x184 像素的大尺寸头像URL。
                    example: https://avatars.steamstatic.com/fef49e7fa7e1997310d705b2a6158ff8dc1cdfeb_full.jpg
                  avatarmedium:
                    type: string
                    description: 64x64 像素的中等尺寸头像URL。
                    example: https://avatars.steamstatic.com/fef49e7fa7e1997310d705b2a6158ff8dc1cdfeb_medium.jpg
                  communityvisibilitystate:
                    type: integer
                    description: "社区资料的可见性状态: 1=私密, 3=公开。"
                    example: 3
                  loccountrycode:
                    type: string
                    description: 用户个人资料中设置的国家代码 (ISO 3166-1)，前提是用户已设置并公开。
                    example: US
                  personaname:
                    type: string
                    description: 玩家的当前昵称。
                    example: Gabe Newell
                  personastate:
                    type: integer
                    description: "用户当前的在线状态: 0-离线, 1-在线, 2-忙碌, 3-离开, 4-打盹, 5-想交易, 6-想玩。"
                    example: 1
                  primaryclanid:
                    type: string
                    description: 玩家设置的主要部落的64位ID。
                    example: "103582791429521412"
                  profilestate:
                    type: integer
                    description: 如果用户设置了个人资料，则为1。
                    example: 1
                  profileurl:
                    type: string
                    description: 用户的Steam社区个人资料页完整URL。
                    example: https://steamcommunity.com/id/gabelogannewell/
                  realname:
                    type: string
                    description: 用户的真实姓名，前提是用户已设置并公开。
                    example: Gabe Logan Newell
                  steamid:
                    type: string
                    description: 被查询用户的64位SteamID。
                    example: "76561197960435530"
                  timecreated:
                    type: integer
                    description: 账户创建时的Unix时间戳（秒）。
                    example: 1063407589
                  timecreated_str:
                    type: string
                    description: 我们为你格式化好的账户创建时间，更直观。
                    example: 2003-09-12 22:59:49
        "400":
          description: 请求失败。请检查你是否提供了 `steamid`、`id` 或 `id3` 中的任意一个参数。
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: INVALID_ARGUMENT
                  details:
                    type: object
                  message:
                    type: string
                    example: "Missing steam identifier parameter. Please provide one of: steamid,
                      id, or id3."
        "401":
          description: 认证失败。你提供的 Steam Web API Key 无效或已过期，或者你没有提供 Key。请检查你的 Key。
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: UNAUTHENTICATED
                  details:
                    type: object
                  message:
                    type: string
                    example: Missing or invalid API Key.
        "404":
          description: 用户未找到。根据你提供的 SteamID 未能找到对应的用户，或者该用户资料为完全私密。
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: NOT_FOUND
                  details:
                    type: object
                  message:
                    type: string
                    example: User with the specified SteamID not found.
        "502":
          description: 上游服务错误。在向 Steam 的官方 API 请求数据时遇到了问题。这可能是他们的服务暂时中断，请稍后重试。
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: UPSTREAM_ERROR
                  details:
                    type: object
                  message:
                    type: string
                    example: Failed to fetch data from Steam API.
      x-search-words:
        - steam
        - steamid
        - 个人资料
        - 用户查询
        - 头像
        - 在线状态
        - g胖
        - valve
        - summary
        - profile
        - id
        - id3
        - vanity url
        - 自定义链接
        - steam id3
  /game/epic-free:
    get:
      tags:
        - Game
      summary: Epic 免费游戏
      description: |-
        白嫖党的福音来了！想第一时间知道Epic商店本周送了哪些游戏大作吗？

        ## 功能概述
        这个接口帮你实时追踪Epic Games商店的每周免费游戏活动。无需任何参数，调用后即可获得当前所有免费游戏的完整信息，包括游戏封面、原价、剩余时间等，再也不用担心错过心仪的免费游戏了！

        ## 使用场景
        - 开发游戏资讯应用或网站
        - 制作Epic免费游戏推送机器人
        - 为用户提供游戏收藏建议
        - 构建个人游戏库管理工具

        > [!TIP]
        > **关于时间格式**
        > 为了方便不同场景的使用，我们同时提供了可读的时间字符串（如 `2025/01/10 00:00:00`）和13位毫秒时间戳。前端显示用字符串，程序逻辑用时间戳
      operationId: get-game-epic-free
      parameters: []
      responses:
        "200":
          description: 获取成功！白嫖成功，返回当前Epic Games商店的免费游戏大礼包。
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    description: 免费游戏列表数组。
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          description: 游戏的唯一标识ID。
                          example: epic-game-123456
                        title:
                          type: string
                          description: 游戏的完整标题名称。
                          example: Control Ultimate Edition
                        cover:
                          type: string
                          description: 游戏封面图片的URL地址。
                          example: https://cdn1.epicgames.com/salesEvent/salesEvent/EGS_ControlUltimateEdition_RemedyEntertainment_S1_2560x1440-a2a40e2b9164c2c0e031bd4e88bacd01.jpg
                        original_price:
                          type: number
                          description: 游戏的原价，单位为人民币元。
                          example: 40
                        original_price_desc:
                          type: string
                          description: 格式化后的原价描述字符串。
                          example: ¥40.00
                        description:
                          type: string
                          description: 游戏的简介描述。
                          example: 在这款超自然动作冒险游戏中，你将掌握一系列超自然能力、改装武器，探索神秘的联邦控制局。
                        seller:
                          type: string
                          description: 游戏的发行商或销售商。
                          example: Remedy Entertainment
                        is_free_now:
                          type: boolean
                          description: 当前是否处于免费状态。
                          example: true
                        free_start:
                          type: string
                          description: 免费开始时间的可读字符串格式。
                          example: 2025/01/10 00:00:00
                        free_start_at:
                          type: integer
                          description: 免费开始时间的13位毫秒时间戳。
                          example: 1736438400000
                        free_end:
                          type: string
                          description: 免费结束时间的可读字符串格式。
                          example: 2025/01/17 00:00:00
                        free_end_at:
                          type: integer
                          description: 免费结束时间的13位毫秒时间戳。
                          example: 1737043200000
                        link:
                          type: string
                          description: 游戏在Epic Games商店的详情页链接。
                          example: https://store.epicgames.com/zh-CN/p/control
        "500":
          description: Epic Games 免费游戏服务暂时不可用，请稍后再试
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: SERVICE_UNAVAILABLE
                  message:
                    type: string
                    example: Epic Games 免费游戏服务暂时不可用，请稍后再试
      x-search-words:
        - epic
        - epic games
        - 免费游戏
        - 每周免费
        - 白嫖
        - 游戏
        - 限时免费
        - epic商店
        - free games
        - weekly free
  /image/bing-daily:
    get:
      tags:
        - Image
      summary: 必应壁纸
      description: >-
        每天都想换张新壁纸？让必应的美图点亮你的一天吧！


        ## 功能概述

        这个接口会获取 Bing
        搜索引擎当天全球同步的每日壁纸，并直接以图片形式返回。你可以用它来做应用的启动页、网站背景，或者任何需要每日更新精美图片的地方。


        ## 使用须知


        > [!NOTE]

        > **响应格式是图片**

        > 请注意，此接口成功时直接返回图片二进制数据（通常为 `image/jpeg`），而非 JSON 格式。请确保客户端能够正确处理。


        我们内置了备用方案：如果从必应官方获取图片失败，系统会尝试返回一张预存的高质量风景图，以保证服务的稳定性。
      operationId: get-image-bing-daily
      parameters: []
      responses:
        "200":
          description: 请求成功！响应体是JPEG或PNG格式的图片二进制数据。
          content:
            image/*:
              schema:
                type: string
                format: binary
        "502":
          description: 上游服务错误。我们无法从必应官方API获取到图片，并且备用图片方案也失败了。请稍后重试。
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: UPSTREAM_ERROR
                  message:
                    type: string
                    example: Failed to fetch Bing daily image or fallback image.
      x-search-words:
        - 每日必应壁纸api
        - bing每日壁纸
        - 必应壁纸api
        - 必应每日壁纸
        - bing每日一图
        - 微软壁纸
        - 必应背景图
        - 每日壁纸
        - 高清壁纸
        - 桌面背景
        - 免费壁纸api
        - 壁纸接口
        - 自动更新壁纸
        - bing壁纸
        - 必应
        - wallpaper api
        - daily wallpaper
        - microsoft wallpaper
        - 免费接口
        - 背景图片api
      x-seo-optimized-text: 免费必应每日壁纸API接口，获取微软Bing搜索引擎的精美每日壁纸。每日自动更新，提供1920x1080高清壁纸图片，直接返回图片数据。无需注册，即调即用。适用于桌面背景、网站装饰、应用启动页等场景。
      x-seo-keywords:
        - 每日必应壁纸api
        - bing每日壁纸
        - 必应壁纸api接口
        - 微软壁纸API
        - 每日壁纸服务
        - Bing每日一图
        - 免费必应壁纸
        - 高清壁纸API
        - 必应背景图
        - 每日自动更新壁纸
        - 桌面壁纸API
        - 免费壁纸接口
      x-seo-title: 【免费】必应每日壁纸API - Bing高清壁纸自动更新
      x-seo-usage-scenarios: 适用于桌面壁纸应用、移动应用启动页、网站背景图、博客配图、设计项目素材、社交媒体背景、幻灯片背景、屏保程序、个人网站装饰、自动壁纸更换工具等场景
      x-seo-related-apis:
        - 图片处理
        - 随机图片
        - 图片上传
        - 素材服务
      x-faq:
        - question: 这个API如何使用？
          answer: 直接访问 https://uapis.cn/api/v1/image/bing-daily
            即可获取当天的必应壁纸。接口返回图片二进制数据，可以直接在 <img> 标签中使用。
        - question: 图片是什么格式和分辨率？
          answer: 图片通常为JPEG格式，分辨率为1920x1080或更高。必应会根据当天的图片自动选择最佳质量。
        - question: 如果必应官方服务不可用怎么办？
          answer: 我们有备用方案，如果无法获取必应官方图片，系统会返回一张预存的高质量风景图，确保服务稳定性。
        - question: 这个服务是否免费？
          answer: 是的，这个API完全免费，无需注册或API密钥，适合个人和商业项目使用。
        - question: 图片会缓存多长时间？
          answer: 图片每天自动更新，我们会缓存当天的图片以提高访问速度，次日会自动获取新的壁纸。
      x-jsonld:
        "@context": https://schema.org
        "@type": TechnicalArticle
        headline: 每日必应壁纸API - 免费Bing高清壁纸服务
        description: 免费必应每日壁纸API接口，获取微软Bing搜索引擎的精美每日壁纸。每日自动更新，提供高清壁纸图片，支持直接获取图片二进制数据。适用于桌面背景、网站装饰、应用启动页、设计素材等场景。
        author:
          "@type": Organization
          name: UAPI
          url: https://uapis.cn
        publisher:
          "@type": Organization
          name: UAPI
          url: https://uapis.cn
        datePublished: 2024-01-01
        dateModified: 2024-12-01
        mainEntity:
          "@type": SoftwareApplication
          name: 必应每日壁纸API
          applicationCategory: WebAPI
          operatingSystem: All
          url: https://uapis.cn/api/v1/image/bing-daily
          offers:
            "@type": Offer
            price: "0"
            priceCurrency: CNY
        about:
          - "@type": Thing
            name: API端点
            description: 主要API端点：https://uapis.cn/api/v1/image/bing-daily
          - "@type": Thing
            name: 响应格式
            description: 直接返回图片二进制数据（JPEG/PNG格式），而非JSON格式
          - "@type": Thing
            name: 使用方法
            description: 可以直接在 <img> 标签中使用：<img
              src='https://uapis.cn/api/v1/image/bing-daily' />
          - "@type": Thing
            name: 备用方案
            description: 如果无法获取必应官方图片，系统会返回预存的高质量风景图，确保服务稳定性
          - "@type": Thing
            name: 实际应用
            description: 桌面壁纸应用、网站背景、移动应用启动页、设计素材、自动壁纸更换工具
        mentions:
          - "@type": WebAPI
            name: 必应每日壁纸API
            url: https://uapis.cn/api/v1/image/bing-daily
  /image/frombase64:
    post:
      tags:
        - Image
      summary: 通过Base64编码上传图片
      description: >-
        当你需要在前端处理完图片（比如裁剪、加滤镜后），不通过传统表单，而是直接上传图片的场景，这个接口就派上用场了。


        ## 功能概述

        你只需要将图片的 Base64 编码字符串发送过来，我们就会把它解码、保存为图片文件，并返回一个可供访问的公开 URL。


        ## 使用须知


        > [!IMPORTANT]

        > **关于 `imageData` 格式**

        > 你发送的 `imageData` 字符串必须是完整的 Base64 Data URI 格式，它需要包含 MIME 类型信息，例如
        `data:image/png;base64,iVBORw0KGgo...`。缺少 `data:image/...;base64,`
        前缀将导致解码失败。
      operationId: post-image-frombase64
      parameters: []
      responses:
        "200":
          description: 上传成功！返回图片的访问地址。
          content:
            application/json:
              schema:
                type: object
                properties:
                  image_url:
                    type: string
                    description: 图片保存后在服务器上的绝对访问URL。
                    example: https://uapis.cn/static/uploads/91e42db1c66c0b276abf6234dc50b2eb.png
                  msg:
                    type: string
                    description: 操作结果描述。
                    example: success
        "400":
          description: 请求失败。可能的原因有：请求体不是有效的JSON，缺少 `imageData` 字段，或者 `imageData`
            的内容不是有效的Base64 Data URI。
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: INVALID_ARGUMENT
                  details:
                    type: object
                  message:
                    type: string
                    example: Invalid request body or imageData.
        "500":
          description: 服务器内部错误。在解码或保存图片文件时发生了未知错误。请稍后重试。
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: INTERNAL_SERVER_ERROR
                  details:
                    type: object
                  message:
                    type: string
                    example: Failed to save the image.
      requestBody:
        description: 一个JSON对象，包含 `imageData` 字段，其值为你想要上传图片的完整Base64 Data URI。
        required: true
        content:
          application/json:
            schema:
              required:
                - imageData
              type: object
              properties:
                imageData:
                  type: string
                  description: 图片的Base64 Data URI，必须包含MIME类型头。例如：`data:image/png;base64,...`
                  example: data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII=
      x-search-words:
        - base64
        - 图片上传
        - 图床
        - 解码
        - datauri
        - upload image
        - 图片存储
      x-seo-optimized-text: 免费Base64图片上传API接口，支持通过Base64编码上传图片文件。快速便捷的图片处理服务，支持多种图片格式。适用于图片存储、文件上传、图片转换等场景。
      x-seo-keywords:
        - 免费图片上传API
        - Base64图片接口
        - 图片处理API
        - 文件上传服务
        - 图片转换API
        - 图片存储接口
        - Base64上传工具
      x-seo-title: 免费Base64图片上传API接口 - 图片处理服务
      x-seo-usage-scenarios: 适用于网站图片上传、移动应用图片处理、图片格式转换、临时图片存储、图片编辑工具、文件管理系统等场景
      x-seo-related-apis:
        - Base64编码
        - 图片处理
        - 文件服务
        - 图片压缩
  /image/motou:
    get:
      tags:
        - Image
      summary: 生成摸摸头GIF (QQ号)
      description: >-
        想在线rua一下好友的头像吗？这个趣味接口可以满足你。


        ## 功能概述

        此接口通过GET方法，专门用于通过QQ号生成摸摸头GIF。你只需要提供一个QQ号码，我们就会自动获取其公开头像，并制作成一个可爱的动图。


        ## 使用须知

        - **响应格式**：接口成功时直接返回 `image/gif` 格式的二进制数据。

        - **背景颜色**：你可以通过 `bg_color` 参数来控制GIF的背景。使用 `transparent`
        选项可以让它更好地融入各种聊天背景中。
      operationId: get-image-motou
      parameters:
        - name: qq
          in: query
          required: true
          description: 你想要摸头的对象的QQ号码。
          schema:
            type: string
            example: "10001"
          x-tooltip: 纯数字的QQ号。
        - name: bg_color
          in: query
          required: false
          description: GIF的背景颜色。留空则由后端服务决定默认值。
          schema:
            type: string
            enum:
              - white
              - black
              - transparent
            example: transparent
            x-enumLabels:
              white: 白色
              black: 黑色
              transparent: 透明
          x-tooltip: 可选值为 'white', 'black', 'transparent'。推荐使用 'transparent'。
      responses:
        "200":
          description: 生成成功！响应体是GIF格式的图片二进制数据。
          content:
            image/gif:
              schema:
                type: string
                format: binary
        "400":
          description: 请求参数错误。必须提供有效的 'qq' 参数。
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: QQ number is required
        "500":
          description: 服务器内部错误。可能的原因包括：获取QQ头像失败，或在生成GIF过程中发生错误。
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Failed to generate image
      x-search-words:
        - 摸头
        - 摸摸头
        - petpet
        - rua
        - gif
        - 表情包
        - qq头像
        - 生成器
        - 动图
      x-seo-optimized-text: 免费摸头GIF生成API，输入QQ号自动获取头像并生成可爱的摸摸头动图。支持透明背景，适合聊天斗图、表情包制作。Petpet风格动图生成器，无需注册即可使用。
      x-seo-keywords:
        - 摸头GIF生成
        - petpet API
        - QQ头像摸头
        - 摸摸头表情包
        - GIF生成器
        - rua头像
        - 动图制作API
        - 表情包生成
      x-seo-title: 【免费】摸头GIF生成API - Petpet风格动图制作
      x-seo-usage-scenarios: 适用于QQ机器人、聊天斗图、表情包制作、社交娱乐应用、趣味头像生成等场景
      x-seo-related-apis:
        - 表情包生成
        - 图片处理
        - QQ头像获取
        - GIF制作
    post:
      tags:
        - Image
      summary: 生成摸摸头GIF
      description: |-
        除了使用QQ头像，你还可以通过上传自己的图片或提供图片URL来制作独一无二的摸摸头GIF。

        ## 功能概述
        此接口通过POST方法，支持两种方式生成GIF：
        1.  **图片URL**：在表单中提供 `image_url` 字段。
        2.  **上传图片**：在表单中上传 `file` 文件。

        ## 使用须知
        - **响应格式**：接口成功时直接返回 `image/gif` 格式的二进制数据。
        - **参数优先级**：如果同时提供了 `image_url` 和上传的 `file` 文件，系统将 **优先使用 `image_url`**。
        - **背景颜色**：同样支持 `bg_color` 表单字段来控制GIF背景。
      operationId: post-image-motou
      parameters: []
      responses:
        "200":
          description: 生成成功！响应体是GIF格式的图片二进制数据。
          content:
            image/gif:
              schema:
                type: string
                format: binary
        "400":
          description: 请求参数错误。必须提供 'image_url' 或上传 'file' 文件两者中的一个。
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Either image_url or file is required
        "500":
          description: 服务器内部错误。可能的原因包括：从URL获取图片失败、处理上传文件失败，或在生成GIF过程中发生错误。
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Failed to generate image from URL
      requestBody:
        description: 包含图片来源和背景色的表单数据。必须提供 'image_url' 或 'file' 两者之一。
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                image_url:
                  type: string
                  format: uri
                  description: 图片的URL地址。如果提供此项，将优先使用该URL的图片。
                  example: https://example.com/avatar.jpg
                file:
                  type: string
                  format: binary
                  description: 上传的图片文件。支持JPG、PNG、GIF等常见格式。
                  x-accept: .jpg,.jpeg,.png,.gif,.webp,.bmp
                bg_color:
                  type: string
                  description: GIF的背景颜色。可选值为 'white', 'black', 'transparent'。
                  enum:
                    - white
                    - black
                    - transparent
                  example: transparent
                  x-enumLabels:
                    white: 白色
                    black: 黑色
                    transparent: 透明
      x-search-words:
        - 摸头
        - 摸摸头
        - petpet
        - rua
        - gif
        - 表情包
        - 生成器
        - 动图
        - 图片上传
        - URL
        - 自定义头像
  /image/speechless:
    post:
      tags:
        - Image
      summary: 生成你们怎么不说话了表情包
      description: |-
        你们怎么不说话了？是不是都在偷偷玩Uapi，求求你们不要玩Uapi了

        ## 使用须知
        - **响应格式**：接口成功时直接返回 `image/png` 格式的二进制数据。
        - **文字内容**：至少需要提供 `top_text`（上方文字）或 `bottom_text`（下方文字）之一。
        - **梗图逻辑**：上方描述某个行为，下方通常以「们」开头表示劝阻，形成戏谑的对比效果。
      operationId: post-image-speechless
      parameters: []
      responses:
        "200":
          description: 生成成功！响应体是PNG格式的表情包图片二进制数据。
          content:
            image/png:
              schema:
                type: string
                format: binary
        "400":
          description: 请求参数错误。必须提供 'top_text' 或 'bottom_text' 至少其中之一。
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: At least one of top_text or bottom_text is required
        "500":
          description: 服务器内部错误。在生成表情包图片过程中发生错误。
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Failed to generate speechless meme
      requestBody:
        description: 包含表情包文字内容的JSON对象。至少需要提供上方或下方文字之一。
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                top_text:
                  type: string
                  description: 表情包上方的文字内容。你们怎么不说话了，是不是都在偷偷 _______
                  example: 玩Uapi
                bottom_text:
                  type: string
                  description: 表情包下方的文字内容。求求你_______
                  example: 们不要玩Uapi了
      x-search-words:
        - 你们怎么不说话了
        - 怎么不说话了
        - speechless
        - 无语
        - 无言以对
        - 表情包
        - 表情包生成
        - 斗图
        - meme
        - 梗图
        - 自定义表情包
        - 文字表情包
        - 在线表情包
        - 表情包制作器
        - 聊天表情
        - 趣味图片
        - 对比梗
        - 反差梗
      x-seo-optimized-text: 免费你们怎么不说话了表情包生成API接口，快速生成经典梗图表情包。支持自定义上下文字，一键生成趣味对比反差表情包图片。适用于聊天斗图、群聊娱乐、社交分享等场景。
      x-seo-keywords:
        - 你们怎么不说话了表情包
        - 你们怎么不说话了API
        - 表情包生成API
        - 免费表情包接口
        - 自定义表情包
        - 斗图API
        - 表情包制作
        - 在线表情包生成器
        - 对比梗图
      x-seo-title: 你们怎么不说话了表情包生成API - 经典梗图制作接口
      x-seo-usage-scenarios: 适用于社交聊天斗图、群聊娱乐、内容创作配图、社交媒体分享、趣味营销素材、个性化表情制作、娱乐互动应用、网络梗图创作等场景
      x-seo-related-apis:
        - 摸头表情包
        - 图片生成
        - 图片处理
        - 表情包制作
  /image/qrcode:
    get:
      tags:
        - Image
      summary: 生成二维码
      description: |-
        无论是网址、文本还是联系方式，通通可以变成一个二维码！这是一个非常灵活的二维码生成工具。

        ## 功能概述
        你提供一段文本内容，我们为你生成对应的二维码图片。你可以自定义尺寸、前景色、背景色，还支持透明背景，并选择不同的返回格式以适应不同场景。

        ## 使用须知

        > [!IMPORTANT]
        > **关键参数 `format`**
        > 此参数决定了成功响应的内容类型和结构，请务必根据你的需求选择并正确处理响应：
        > - **`image`** (默认): 直接返回 `image/png` 格式的图片二进制数据，适合在 `<img>` 标签中直接使用。
        > - **`json`**: 返回一个包含 Base64 Data URI 的 JSON 对象，适合需要在前端直接嵌入CSS或HTML的场景。
        > - **`json_url`**: 返回一个包含图片临时URL的JSON对象，适合需要图片链接的场景。

        > [!TIP]
        > **颜色参数说明**
        > - 颜色参数使用十六进制格式（如 `#FF0000`）
        > - URL 中需要对 `#` 进行编码，即 `%23`（例如：`fgcolor=%23FF0000`）
        > - 当 `transparent=true` 时，`bgcolor` 参数会被忽略
      operationId: get-image-qrcode
      parameters:
        - name: text
          in: query
          required: true
          description: 你希望编码到二维码中的任何文本内容，比如一个URL、一段话或者一个JSON字符串。
          schema:
            type: string
            example: https://www.bilibili.com/video/BV1uT4y1P7CX/
          x-tooltip: URL、文本、名片信息等都可以。
        - name: size
          in: query
          required: false
          description: 二维码图片的边长（正方形），单位是像素。有效范围是 256 到 2048 之间。
          schema:
            type: integer
            default: 256
            maximum: 2048
            example: 512
          x-tooltip: 默认256px，最大2048px。
        - name: format
          in: query
          required: false
          description: 指定响应内容的格式。可选值为 `image`, `json`, `json_url`。
          schema:
            type: string
            default: image
            enum:
              - image
              - json
              - json_url
            example: image
            x-enumLabels:
              image: 图片
              json: JSON数据
              json_url: JSON+URL
          x-tooltip: 默认为'image'，直接返回图片。
        - name: transparent
          in: query
          required: false
          description: 是否使用透明背景。启用后生成的 PNG 图片将具有 alpha 通道，背景透明。
          schema:
            type: boolean
            default: false
          x-tooltip: 启用后 bgcolor 参数会被忽略。
        - name: fgcolor
          in: query
          required: false
          description: 二维码前景色（即二维码本身的颜色），使用十六进制格式。URL 中需要将 `#` 编码为 `%23`。
          schema:
            type: string
            default: "#000000"
          x-tooltip: "默认黑色，URL中使用 %23 代替 #"
        - name: bgcolor
          in: query
          required: false
          description: 二维码背景色，使用十六进制格式。当 `transparent=true` 时此参数会被忽略。URL 中需要将 `#` 编码为 `%23`。
          schema:
            type: string
            default: "#FFFFFF"
          x-tooltip: 默认白色，透明背景时忽略此参数。
      responses:
        "200":
          description: 请求成功。响应的格式和内容取决于你传入的 `format` 参数。请参考下面不同 `Content-Type` 的定义。
          content:
            image/png:
              schema:
                type: string
                format: binary
              x-description: 当 `format=image` (默认)时，你会收到此响应。
            application/json:
              schema:
                type: object
                properties:
                  url:
                    type: string
                    description: 图片的URL。当`format=json_url`时是临时公网URL；当`format=json`时是Base64 Data URI。
                    example: data:image/png;base64,iVBORw0KGgoAAA...
              x-description: 当 `format=json` 或 `format=json_url` 时，你会收到此响应。
        "400":
          description: 请求参数错误。请检查 `text` 是否提供，`size` 是否在有效范围内，`format` 是否为支持的值。
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: INVALID_ARGUMENT
                  details:
                    type: object
                  message:
                    type: string
                    example: Invalid parameter provided.
        "500":
          description: 服务器内部错误。在生成二维码的过程中发生了未知错误。
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: INTERNAL_SERVER_ERROR
                  details:
                    type: object
                  message:
                    type: string
                    example: Failed to generate QR code.
      x-search-words:
        - 二维码
        - qrcode
        - 生成
        - 扫码
        - qr
        - generator
        - 链接
        - 文本
        - 名片
        - 透明
        - 颜色
      x-seo-optimized-text: 免费二维码生成API接口，支持自定义尺寸、颜色、透明背景和多种输出格式。将任意文本、网址、名片信息转换为二维码图片。支持直接返回图片、Base64编码、临时URL三种格式。无需注册，即调即用。
      x-seo-keywords:
        - 免费二维码API
        - 二维码生成接口
        - QRCode API
        - 在线生成二维码
        - 二维码图片API
        - 文本转二维码
        - 链接二维码生成
        - 名片二维码
        - 透明背景二维码
        - 自定义颜色二维码
      x-seo-title: 【免费】二维码生成API - 支持自定义尺寸、颜色和透明背景
      x-seo-usage-scenarios: 适用于支付二维码生成、分享链接二维码、电子名片、产品溯源码、活动签到码、WiFi连接码、批量二维码生成、品牌定制二维码等场景
      x-seo-related-apis:
        - 图片转Base64
        - Base64图片上传
        - 图片处理
        - 短链接
  /image/tobase64:
    get:
      tags:
        - Image
      summary: 图片转 Base64
      description: |-
        看到一张网上的图片，想把它转换成 Base64 编码以便嵌入到你的 HTML 或 CSS 中？用这个接口就对了。

        ## 功能概述
        你提供一个公开可访问的图片 URL，我们帮你把它下载下来，并转换成包含 MIME 类型的 Base64 Data URI 字符串返回给你。
      operationId: get-image-tobase64
      parameters:
        - name: url
          in: query
          required: true
          description: 需要转换为Base64的、可公开访问的图片URL地址。
          schema:
            type: string
            format: url
            example: https://ts3.tc.mm.bing.net/th?id=ORMS.44196851bb1757ec3f66572811fe8e07&pid=Wdp&w=612&h=304&qlt=90&c=1&rs=1&dpr=1.25&p=0
          x-tooltip: 必须是公网可以直接访问的图片链接。
      responses:
        "200":
          description: 转换成功！返回包含Base64编码的JSON对象。
          content:
            application/json:
              schema:
                type: object
                properties:
                  base64:
                    type: string
                    description: 转换后的完整Base64 Data URI，可以直接在CSS或HTML中使用。
                    example: data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII=
                  msg:
                    type: string
                    description: 操作结果描述。
                    example: success
        "400":
          description: 请求参数错误。请检查你是否提供了 `url` 参数，以及它是否是一个合法的URL格式。
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: INVALID_ARGUMENT
                  details:
                    type: object
                  message:
                    type: string
                    example: Missing or invalid 'url' parameter.
        "502":
          description: 获取图片失败。我们无法从你提供的URL下载图片。请检查该URL是否可以公开访问，以及它是否指向一个有效的图片资源。
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: UPSTREAM_ERROR
                  details:
                    type: object
                  message:
                    type: string
                    example: Failed to fetch image from the provided URL.
      x-search-words:
        - base64
        - 图片转换
        - 编码
        - image to base64
        - url to base64
        - encode
        - 链接转图片
      x-seo-optimized-text: 免费图片转Base64 API接口，将任意网络图片URL转换为Base64 Data
        URI编码。支持PNG、JPG、GIF等常见格式，可直接嵌入HTML/CSS使用。无需注册，即调即用。
      x-seo-keywords:
        - 免费图片转Base64
        - 图片Base64编码API
        - URL转Base64
        - 图片编码接口
        - image to base64
        - Data URI转换
        - 图片内嵌编码
      x-seo-title: 【免费】图片转Base64 API - URL图片一键转换Data URI
      x-seo-usage-scenarios: 适用于邮件模板图片内嵌、CSS背景图编码、离线应用图片存储、小程序图片处理、前端图片预加载等场景
      x-seo-related-apis:
        - Base64图片上传
        - 二维码生成
        - 图片处理
        - SVG转图片
  /image/svg:
    post:
      tags:
        - Image
      summary: SVG转图片
      description: >-
        需要将灵活的 SVG 矢量图形转换为常见的光栅图像格式吗？这个接口可以帮你轻松实现。


        ## 功能概述

        上传一个 SVG 文件，并指定目标格式（如 PNG、JPEG
        等），接口将返回转换后的图像。你还可以调整输出图像的尺寸和（对于JPEG）压缩质量，以满足不同场景的需求。
      operationId: post-image-svg
      parameters:
        - name: format
          in: query
          required: false
          description: 输出图像的目标格式。支持的值：`png`, `jpeg`, `jpg`, `gif`, `tiff`, `bmp`。
          schema:
            type: string
            default: png
            enum:
              - png
              - jpeg
              - jpg
              - gif
              - tiff
              - bmp
        - name: width
          in: query
          required: false
          description: 输出图像的宽度（像素）。如果省略，将根据 `height` 保持宽高比，或者使用 SVG 的原始宽度。
          schema:
            type: integer
        - name: height
          in: query
          required: false
          description: 输出图像的高度（像素）。如果省略，将根据 `width` 保持宽高比，或者使用 SVG 的原始高度。
          schema:
            type: integer
        - name: quality
          in: query
          required: false
          description: JPEG 图像的压缩质量（1-100）。仅当 `format` 为 `jpeg` 或 `jpg` 时有效。
          schema:
            type: integer
            default: 90
      responses:
        "200":
          description: 转换成功！响应体是转换后图像的二进制数据。
          content:
            image/*:
              schema:
                type: string
                format: binary
        "400":
          description: 请求无效。可能是未上传文件或指定了不支持的输出格式。
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: FILE_REQUIRED / UNSUPPORTED_FORMAT
                  message:
                    type: string
                    example: A human-readable error message.
        "500":
          description: 服务器内部错误。SVG 渲染或文件处理过程中发生错误。
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: CONVERSION_FAILED
                  message:
                    type: string
                    example: A human-readable error message.
      requestBody:
        description: 要转换的 SVG 文件。
        required: false
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                file:
                  type: string
                  format: binary
                  description: 支持SVG文件
                  x-accept: .svg
      x-search-words:
        - svg
        - 转换
        - png
        - jpeg
        - gif
        - tiff
        - bmp
        - 矢量图
        - 光栅图
  /image/compress:
    post:
      tags:
        - Image
      summary: 无损压缩图片
      description: >-
        还在为图片体积和加载速度发愁吗？体验一下我们强大的**无损压缩服务**，它能在几乎不牺牲任何肉眼可感知的画质的前提下，将图片体积压缩到极致。


        ## 功能概述

        你只需要上传一张常见的图片（如 PNG,
        JPG），选择一个压缩等级，就能获得一个体积小到惊人的压缩文件。这对于需要大量展示高清图片的网站、App
        或小程序来说，是优化用户体验、节省带宽和存储成本的利器。


        ## 使用须知

        > [!TIP]

        > 为了给您最好的压缩效果，我们的算法需要进行复杂计算，处理时间可能会稍长一些，请耐心等待。


        > [!WARNING]

        > **服务排队提醒**

        > 这是一个计算密集型服务。在高并发时，您的请求可能会被排队等待处理。如果您需要将其集成到对延迟敏感的生产服务中，请注意这一点。


        ### 请求与响应格式

        - 请求必须使用 `multipart/form-data` 格式上传文件。

        - 成功响应将直接返回压缩后的文件二进制流 (`image/*`)，并附带 `Content-Disposition`
        头，建议客户端根据此头信息保存文件。


        ## 参数详解

        ### `level` (压缩等级)

        这是一个从 `1` 到 `5`
        的整数，它决定了压缩的强度和策略，数字越小，压缩率越高。所有等级都经过精心调校，以在最大化压缩率的同时保证出色的视觉质量。

        - `1`: **极限压缩** (推荐，体积最小，画质优异)

        - `2`: **高效压缩**

        - `3`: **智能均衡** (默认选项)

        - `4`: **画质优先**

        - `5`: **专业保真** (压缩率稍低，保留最多图像信息)


        ## 错误处理指南

        - **400 Bad Request**: 通常因为没有上传文件，或者 `level` 参数不在 1-5 的范围内。

        - **500 Internal Server Error**: 如果在压缩过程中服务器发生内部错误，会返回此状态码。
      operationId: post-image-compress
      parameters:
        - name: level
          in: query
          required: false
          description: 压缩强度 (1-5)，默认为 3。数字越小，压缩率越高。
          schema:
            type: integer
            default: 3
            enum:
              - 1
              - 2
              - 3
              - 4
              - 5
            example: 3
          x-tooltip: |-
            - `1`: **极限压缩** (推荐)
            - `2`: **高效压缩**
            - `3`: **智能均衡** (默认)
            - `4`: **画质优先**
            - `5`: **专业保真**
        - name: format
          in: query
          required: false
          description: 输出图片格式，可以是 'png' 或 'jpeg'。
          schema:
            type: string
            default: png
            enum:
              - png
              - jpeg
            example: png
          x-tooltip: 默认为 'png'。
      responses:
        "200":
          description: 压缩成功响应。响应是压缩后的图片二进制数据。`Content-Type` 依据选择的目标格式，默认为 image/png。
          headers:
            Content-Disposition:
              schema:
                type: string
                example: attachment; filename="compressed.png"
              description: 提示客户端文件下载为压缩后的文件。建议扩展名与输出格式一致。
          content:
            image/*:
              schema:
                type: string
                format: binary
        "400":
          description: 请求无效。可能是未上传文件、文件格式不受支持或参数错误。
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    description: 机器可读的错误代码。
                    example: INVALID_ARGUMENT
                  message:
                    type: string
                    description: 人类可读的错误描述信息。
                    example: Level must be between 1 and 5.
        "500":
          description: 服务器内部错误。压缩过程中发生错误。
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    description: 机器可读的错误代码。
                    example: COMPRESSION_FAILED
                  message:
                    type: string
                    description: 人类可读的错误描述信息。
                    example: An internal error occurred during image compression.
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                file:
                  type: string
                  format: binary
                  description: 支持PNG, JPG, JPEG等常见图片格式。文件大小不超过15MB。
                  x-accept: .png,.jpg,.jpeg
              required:
                - file
      x-search-words:
        - 图片压缩
        - 无损压缩
        - 图片优化
        - 减小体积
        - image compression
        - lossless
        - optimize
        - png
        - jpg
  /avatar/gravatar:
    get:
      tags:
        - Image
      summary: 获取Gravatar头像
      description: 提供一个超高速、高可用的Gravatar头像代理服务。内置了强大的ETag条件缓存，确保用户在更新Gravatar头像后能几乎立刻看到变化，同时最大化地利用缓存。
      operationId: get-avatar-gravatar
      parameters:
        - name: email
          in: query
          required: false
          description: 用户的 Email 地址。如果未提供 `hash` 参数，则此参数为必需。
          schema:
            example: shuakami@sdjz.wiki
            type: string
        - name: hash
          in: query
          required: false
          description: 用户 Email 地址的小写 MD5 哈希值。如果提供此参数，将忽略 `email` 参数。
          schema:
            type: string
        - name: s
          in: query
          required: false
          description: 头像的尺寸，单位为像素。有效范围是 1 到 2048。
          schema:
            type: integer
            default: 80
        - name: d
          in: query
          required: false
          description: 当用户没有自己的 Gravatar 头像时，显示的默认头像类型。可选值包括 `mp`, `identicon`,
            `monsterid`, `wavatar`, `retro`, `robohash`, `blank`, `404`。
          schema:
            type: string
            default: mp
        - name: r
          in: query
          required: false
          description: 头像分级。可选值：`g`, `pg`, `r`, `x`。
          schema:
            type: string
            default: g
      responses:
        "200":
          description: 成功响应，返回图片二进制数据。
          headers:
            Content-Type:
              schema:
                type: string
                example: image/png
            ETag:
              schema:
                type: string
            Cache-Control:
              schema:
                type: string
                example: public, max-age=3600
          content:
            image/*:
              schema:
                type: string
                format: binary
        "400":
          description: 当请求中既没有提供 `email` 也没有提供 `hash` 参数时。
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: INVALID_PARAMETER
                  message:
                    type: string
                    example: 请求失败，必须提供 'email' 或 'hash' 参数。
        "404":
          description: 当 `d=404` 且请求的 email 或 hash 没有对应的 Gravatar 头像时。
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: AVATAR_NOT_FOUND
                  message:
                    type: string
                    example: 指定的 Gravatar 头像不存在
      x-search-words:
        - gravatar
        - avatar
        - 头像
        - email
        - md5
        - 头像代理
  /image/nsfw:
    post:
      tags:
        - Image
      summary: 图片敏感检测
      description: |-
        这是一个图片内容审核接口，自动识别图片中的违规内容并返回处理建议。

        > [!VIP]
        > 此接口限时免费开放，无需企业认证即可使用。

        ## 功能概述
        上传图片文件或提供图片URL，接口会自动分析图片内容，返回是否违规、风险等级和处理建议。适合对接到用户上传流程中，实现自动化内容审核。

        ## 返回字段说明
        - **is_nsfw**: 是否判定为违规内容，`true` 表示违规，`false` 表示正常
        - **nsfw_score**: 违规内容置信度，0-1 之间，越高表示越可能违规
        - **normal_score**: 正常内容置信度，0-1 之间，与 nsfw_score 互补
        - **suggestion**: 处理建议
          - `pass`: 内容正常，可以直接放行
          - `review`: 存在风险，建议转人工复核
          - `block`: 高风险内容，建议直接拦截
        - **risk_level**: 风险等级
          - `low`: 低风险
          - `medium`: 中风险
          - `high`: 高风险
        - **label**: 内容标签，`nsfw` 或 `normal`
        - **confidence**: 模型对当前判断的整体置信度
        - **inference_time_ms**: 模型推理耗时，单位毫秒
      operationId: post-image-nsfw
      parameters: []
      responses:
        "200":
          description: 检测成功！返回图片的 NSFW 分析结果。
          content:
            application/json:
              schema:
                type: object
                properties:
                  nsfw_score:
                    type: number
                    description: NSFW 内容的置信度分数，范围 0-1，越高表示越可能是敏感内容。
                    example: 0.05
                  normal_score:
                    type: number
                    description: 正常内容的置信度分数，范围 0-1。
                    example: 0.95
                  is_nsfw:
                    type: boolean
                    description: 是否判定为 NSFW 内容。
                    example: false
                  label:
                    type: string
                    description: 内容标签，'nsfw' 或 'normal'。
                    example: normal
                  suggestion:
                    type: string
                    description: 处理建议：'pass'（通过）、'review'（人工复核）、'block'（拦截）。
                    example: pass
                  risk_level:
                    type: string
                    description: 风险等级：'low'、'medium'、'high'。
                    example: low
                  confidence:
                    type: number
                    description: 模型对当前判断的置信度。
                    example: 0.95
                  inference_time_ms:
                    type: number
                    description: 模型推理耗时，单位毫秒。
                    example: 156
        "400":
          description: 请求参数错误。可能是未提供图片、文件格式不支持或文件过大。
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: INVALID_ARGUMENT
                  message:
                    type: string
                    example: 必须提供图片文件或图片URL
        "413":
          description: 文件过大。上传的图片超过了 20MB 的限制。
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: FILE_TOO_LARGE
                  message:
                    type: string
                    example: 文件大小超过限制（最大20MB）
        "500":
          description: 服务器内部错误。在处理图片或进行 NSFW 检测时发生错误。
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: INTERNAL_SERVER_ERROR
                  message:
                    type: string
                    example: NSFW检测服务暂时不可用
      requestBody:
        description: 包含图片来源的表单数据。必须提供 'file' 或 'url' 两者之一。
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                file:
                  type: string
                  format: binary
                  description: 要检测的图片文件。支持 JPG、JPEG、PNG、GIF、WebP 格式，最大 20MB。
                  x-accept: .jpg,.jpeg,.png,.gif,.webp
                url:
                  type: string
                  format: uri
                  description: 图片的 URL 地址。如果同时提供 file 和 url，将优先使用 file。
                  example: https://example.com/image.jpg
      x-search-words:
        - 图片审核
        - 图片审核API
        - 免费图片审核
        - 图片敏感
        - 敏感图片
        - 敏感图片检测
        - 内容审核
        - 内容安全
        - 图片检测
        - 违规检测
        - UGC审核
        - 图片过滤
        - 图片安全
        - 自动审核
        - 内容过滤
        - 图片合规
        - 图片风控
        - 在线审核
      x-seo-optimized-text: 免费图片审核、敏感检测API接口，自动检测用户上传图片中的违规内容。支持上传文件或URL，秒级返回审核结果、风险等级和处理建议。适用于社交平台、电商、论坛等UGC场景的内容安全审核。
      x-seo-keywords:
        - 免费图片审核API
        - 图片审核接口
        - 图片内容检测
        - 图片敏感检测
        - 敏感图片识别
        - UGC图片审核
        - 图片违规检测
        - 内容安全API
        - 图片过滤接口
        - 在线图片审核
      x-seo-title: 免费图片审核API接口 - 敏感图片检测/违规内容识别
      x-seo-usage-scenarios: 社交App用户头像审核、电商平台商品图检测、论坛UGC图片过滤、在线教育内容安全、直播平台截图审核、小程序图片检测、企业内容合规
      x-seo-related-apis:
        - 图片处理
        - 图片压缩
        - 图片上传
        - 内容安全
      x-faq:
        - question: 准确率怎么样？
          answer: 基于深度学习模型，大部分场景准确率90%+。建议 suggestion 返回 review 时转人工复核。
        - question: 支持什么格式？
          answer: 支持 JPG、PNG、GIF、WebP 格式，文件最大 20MB。
        - question: 怎么接入？
          answer: 上传图片或传 URL，根据返回的 suggestion 字段处理：pass 放行，review 人工看，block 拦截。
      x-jsonld:
        "@context": https://schema.org
        "@type": TechnicalArticle
        headline: 免费图片审核API接口 - 自动检测违规内容
        description: 免费图片审核API接口，自动检测用户上传图片中的违规内容。支持上传文件或URL，秒级返回审核结果、风险等级和处理建议。
        author:
          "@type": Organization
          name: UAPI
          url: https://uapis.cn
        publisher:
          "@type": Organization
          name: UAPI
          url: https://uapis.cn
        datePublished: 2024-01-01
        dateModified: 2026-02-03
        mainEntity:
          "@type": SoftwareApplication
          name: 免费图片审核API
          applicationCategory: WebAPI
          operatingSystem: All
          url: https://uapis.cn/api/v1/image/nsfw
          offers:
            "@type": Offer
            price: "0"
            priceCurrency: CNY
        about:
          - "@type": Thing
            name: API端点
            description: POST https://uapis.cn/api/v1/image/nsfw
          - "@type": Thing
            name: 使用方式
            description: 上传图片文件或传图片URL
          - "@type": Thing
            name: 支持格式
            description: JPG、PNG、GIF、WebP，最大20MB
          - "@type": Thing
            name: 返回结果
            description: 是否涉黄、风险等级、处理建议
  /misc/hotboard:
    get:
      tags:
        - Misc
      summary: 查询热榜
      description: |
        想快速跟上网络热点？这个接口让你一网打尽各大主流平台的实时热榜/热搜！

        ## 功能概述
        你只需要指定一个平台类型，就能获取到该平台当前的热榜数据列表。每个热榜条目都包含标题、热度值和原始链接。非常适合用于制作信息聚合类应用或看板。

        ## 三种使用模式

        ### 默认模式
        只传 `type` 参数，返回该平台当前的实时热榜。

        ### 时光机模式
        传 `type` + `time` 参数，返回最接近指定时间的热榜快照。如果不可用或无数据，会返回空。

        ### 搜索模式
        传 `type` + `keyword` + `time_start` + `time_end` 参数，在指定时间范围内搜索包含关键词的热榜条目。可选传 `limit` 限制返回数量。

        ### 数据源列表
        传 `sources=true`，返回所有支持历史数据的平台列表。

        ## 可选值
        `type` 参数接受多种不同的值，每种值对应一个不同的热榜来源。以下是目前支持的所有值：

        | 分类       | 支持的 type 值 |
        |------------|-----------------------------------------------------------------------------------------------------------------------------------|
        | 视频/社区  | bilibili（哔哩哔哩弹幕网）, acfun（A站弹幕视频网站）, weibo（新浪微博热搜）, zhihu（知乎热榜）, zhihu-daily（知乎日报热榜）, douyin（抖音热榜）, kuaishou（快手热榜）, douban-movie（豆瓣电影榜单）, douban-group（豆瓣小组话题）, tieba（百度贴吧热帖）, hupu（虎扑热帖）, ngabbs（NGA游戏论坛热帖）, v2ex（V2EX技术社区热帖）, 52pojie（吾爱破解热帖）, hostloc（全球主机交流论坛）, coolapk（酷安热榜） |
        | 新闻/资讯  | baidu（百度热搜）, thepaper（澎湃新闻热榜）, toutiao（今日头条热榜）, qq-news（腾讯新闻热榜）, sina（新浪热搜）, sina-news（新浪新闻热榜）, netease-news（网易新闻热榜）, huxiu（虎嗅网热榜）, ifanr（爱范儿热榜） |
        | 技术/IT    | sspai（少数派热榜）, ithome（IT之家热榜）, ithome-xijiayi（IT之家·喜加一栏目）, juejin（掘金社区热榜）, jianshu（简书热榜）, guokr（果壳热榜）, 36kr（36氪热榜）, 51cto（51CTO热榜）, csdn（CSDN博客热榜）, nodeseek（NodeSeek 技术社区）, hellogithub（HelloGitHub 项目推荐） |
        | 游戏       | lol（英雄联盟热帖）, genshin（原神热榜）, honkai（崩坏3热榜）, starrail（星穹铁道热榜） |
        | 音乐       | netease-music（网易云音乐热歌榜）, qq-music（QQ音乐热歌榜） |
        | 其他       | weread（微信读书热门书籍）, weatheralarm（天气预警信息）, earthquake（地震速报）, history（历史上的今天） |
      operationId: get-misc-hotboard
      parameters:
        - name: type
          in: query
          required: true
          description: 你想要查询的热榜平台。支持多种主流平台类型，详见下方[可选值](#可选值)表格。
          schema:
            type: string
            enum:
              - bilibili
              - acfun
              - weibo
              - zhihu
              - zhihu-daily
              - douyin
              - kuaishou
              - douban-movie
              - douban-group
              - tieba
              - hupu
              - ngabbs
              - v2ex
              - 52pojie
              - hostloc
              - coolapk
              - baidu
              - thepaper
              - toutiao
              - qq-news
              - sina
              - sina-news
              - netease-news
              - huxiu
              - ifanr
              - sspai
              - ithome
              - ithome-xijiayi
              - juejin
              - jianshu
              - guokr
              - 36kr
              - 51cto
              - csdn
              - nodeseek
              - hellogithub
              - lol
              - genshin
              - honkai
              - starrail
              - netease-music
              - qq-music
              - weread
              - weatheralarm
              - earthquake
              - history
            x-enumIconPattern: /icons/hotboard/{value}.png
            example: weibo
            x-enumLabels:
              bilibili: 哔哩哔哩
              acfun: A站
              weibo: 微博热搜
              zhihu: 知乎热榜
              zhihu-daily: 知乎日报
              douyin: 抖音
              kuaishou: 快手
              douban-movie: 豆瓣电影
              douban-group: 豆瓣小组
              tieba: 百度贴吧
              hupu: 虎扑
              ngabbs: NGA论坛
              v2ex: V2EX
              52pojie: 吾爱破解
              hostloc: 全球主机交流
              coolapk: 酷安
              baidu: 百度热搜
              thepaper: 澎湃新闻
              toutiao: 今日头条
              qq-news: 腾讯新闻
              sina: 新浪热搜
              sina-news: 新浪新闻
              netease-news: 网易新闻
              huxiu: 虎嗅
              ifanr: 爱范儿
              sspai: 少数派
              ithome: IT之家
              ithome-xijiayi: IT之家喜加一
              juejin: 掘金
              jianshu: 简书
              guokr: 果壳
              36kr: 36氪
              51cto: 51CTO
              csdn: CSDN
              nodeseek: NodeSeek
              hellogithub: HelloGitHub
              lol: 英雄联盟
              genshin: 原神
              honkai: 崩坏3
              starrail: 星穹铁道
              netease-music: 网易云音乐热歌榜
              qq-music: QQ音乐热歌榜
              weread: 微信读书
              weatheralarm: 天气预警
              earthquake: 地震速报
              history: 历史上的今天
          x-tooltip: 例如，'weibo' 代表微博热搜。
        - name: time
          in: query
          required: false
          description: 时光机模式：毫秒时间戳，返回最接近该时间的热榜快照。不传则返回当前实时热榜。
          schema:
            type: integer
            format: int64
            example: 1700000000000
          x-tooltip: 传入毫秒时间戳，如 1700000000000，返回该时间点附近的热榜快照。
        - name: keyword
          in: query
          required: false
          description: 搜索模式：搜索关键词，在历史热榜中搜索包含该关键词的条目。需配合 time_start 和 time_end 使用。
          schema:
            type: string
            example: AI
          x-tooltip: 搜索历史热榜中包含该关键词的条目。
        - name: time_start
          in: query
          required: false
          description: 搜索模式必填：搜索起始时间戳（毫秒）。
          schema:
            type: integer
            format: int64
            example: 1699900000000
          x-tooltip: 搜索的起始时间，毫秒时间戳。
        - name: time_end
          in: query
          required: false
          description: 搜索模式必填：搜索结束时间戳（毫秒）。
          schema:
            type: integer
            format: int64
            example: 1700100000000
          x-tooltip: 搜索的结束时间，毫秒时间戳。
        - name: limit
          in: query
          required: false
          description: 搜索模式下最大返回条数，默认 50，最大 200。
          schema:
            type: integer
            default: 50
            maximum: 200
            example: 50
          x-tooltip: 限制搜索结果数量，默认50条。
        - name: sources
          in: query
          required: false
          description: 设为 true 时列出所有可用的历史数据源，忽略其他参数。
          schema:
            type: boolean
            example: true
          x-tooltip: 传 true 可查看支持时光机/搜索的数据源列表。
      responses:
        "200":
          description: 查询成功！返回指定平台的热榜列表数据。不同模式返回格式不同：默认模式和时光机模式返回 list 数组；搜索模式返回 results
            数组；数据源列表模式返回 sources 数组。
          content:
            application/json:
              schema:
                type: object
                properties:
                  list:
                    type: array
                    description: 热榜条目列表。
                    items:
                      type: object
                      properties:
                        extra:
                          type: object
                          description: 额外信息，不同平台该字段内容不同，例如微博热搜的标签（如'新'、'爆'）。
                          additionalProperties: true
                        hot_value:
                          type: string
                          example: "1234567"
                        index:
                          type: integer
                          example: 1
                        title:
                          type: string
                          example: 今天天气真好
                        url:
                          type: string
                          example: https://s.weibo.com/weibo?q=%23%E4%BB%8A%E5%A4%A9%E5%A4%A9%E6%B0%94%E7%9C%9F%E5%A5%BD%23
                        cover:
                          type: string
                          description: 封面图 URL，音乐类热榜返回专辑封面，其他平台无此字段。
                          example: https://p1.music.126.net/xxx/109951170483249998.jpg
                  type:
                    type: string
                    example: weibo
                  update_time:
                    type: string
                    example: 2023-10-27 12:00:00
                  snapshot_time:
                    type: integer
                    description: 时光机模式返回的快照实际时间戳（毫秒）。
                    example: 1700000000000
                  keyword:
                    type: string
                    description: 搜索模式返回的搜索关键词。
                    example: AI
                  count:
                    type: integer
                    description: 搜索模式返回的结果数量。
                    example: 25
                  results:
                    type: array
                    description: 搜索模式返回的结果数组。
                    items:
                      type: object
                      properties:
                        title:
                          type: string
                          example: AI技术突破
                        hot_value:
                          type: string
                          example: "999999"
                        url:
                          type: string
                          example: https://example.com
                  sources:
                    type: array
                    description: 数据源列表模式返回的可用历史数据源数组。
                    items:
                      type: string
                      example: weibo
        "400":
          description: 请求参数错误。你提供的 `type` 参数不是我们支持的平台类型，请检查拼写。
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: INVALID_ARGUMENT
                  details:
                    type: object
                  message:
                    type: string
                    example: Invalid hotboard type specified.
        "500":
          description: 获取热榜失败。服务器在处理数据时发生内部错误。
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: INTERNAL_SERVER_ERROR
                  details:
                    type: object
                  message:
                    type: string
                    example: Failed to process hotboard data.
        "502":
          description: 上游服务错误。我们从目标平台（如微博）获取数据时失败，可能是对方接口暂时不可用或有反爬策略。
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: UPSTREAM_ERROR
                  details:
                    type: object
                  message:
                    type: string
                    example: Failed to fetch hotboard from upstream source.
      x-search-words:
        - 热榜
        - 热搜
        - 排行榜
        - 微博
        - 知乎
        - bilibili
        - 抖音
        - 头条
        - 新闻
        - trending
        - hot
        - v2ex
        - 虎扑
        - 时光机
        - 历史热榜
        - 搜索热榜
        - 快照
      x-seo-optimized-text: 免费全网热榜聚合API接口，一键获取微博、知乎、B站、抖音、头条等40+平台实时热搜榜单。无需注册，即调即用，支持热度值、排名、原始链接等完整数据。适用于热点监控、舆情分析、内容聚合、信息看板等场景。新增时光机模式，可查看历史任意时间点的热榜快照；搜索模式支持在历史热榜中按关键词检索。
      x-seo-keywords:
        - 免费热榜API
        - 微博热搜API
        - 知乎热榜接口
        - B站热门API
        - 抖音热榜查询
        - 全网热搜聚合
        - 热点监控API
        - 舆情分析接口
        - 实时热榜
        - 热搜排行榜API
        - 今日头条热榜
        - 热门话题API
        - 热榜时光机
        - 历史热搜查询
        - 热榜搜索API
      x-seo-title: 【免费】全网热榜聚合API - 微博/知乎/B站/抖音40+平台热搜
      x-seo-usage-scenarios: 适用于热点监控系统、舆情分析平台、内容聚合应用、信息看板、新闻客户端、社交媒体分析、营销热点追踪、数据可视化大屏等场景
      x-seo-related-apis:
        - 天气查询
        - 快递查询
        - 世界时间
        - 新闻资讯
      x-faq:
        - question: 支持哪些平台的热榜？
          answer: 支持40+平台，包括微博、知乎、B站、抖音、快手、今日头条、百度、豆瓣、虎扑、V2EX、掘金、CSDN等主流社交媒体和技术社区。
        - question: 热榜数据多久更新一次？
          answer: 热榜数据实时获取，每次调用都会返回最新的热搜榜单。不同平台的更新频率略有不同，通常在几分钟内同步。
        - question: 返回的数据包含哪些信息？
          answer: 返回数据包括：热搜标题、热度值、排名位置、原始链接、更新时间，部分平台还包含标签（如'新'、'爆'、'沸'）等额外信息。
        - question: 这个API是免费的吗？
          answer: 是的，这个API完全免费，无需注册或API密钥，可以直接调用。
        - question: 什么是时光机模式？
          answer: 时光机模式允许你查看历史某个时间点的热榜快照。传入 time 参数（毫秒时间戳），API
            会返回最接近该时间的热榜数据。如果没有历史数据，会自动返回当前热榜。
        - question: 如何搜索历史热榜？
          answer: 使用搜索模式：传入 keyword（关键词）、time_start（起始时间戳）和 time_end（结束时间戳），API
            会在指定时间范围内搜索包含关键词的热榜条目。可通过 limit 参数限制返回数量，默认50条，最大200条。
        - question: 哪些平台支持时光机和搜索功能？
          answer: 可以通过 sources=true 参数查询支持历史数据的平台列表。并非所有平台都有历史数据，具体取决于数据采集的时间范围。
  /misc/phoneinfo:
    get:
      tags:
        - Misc
      summary: 查询手机归属地
      description: |-
        想知道一个手机号码来自哪里？是移动、联通还是电信？这个接口可以告诉你答案。

        ## 功能概述
        提供一个国内的手机号码，我们会查询并返回它的归属地（省份和城市）以及所属的运营商信息。
      operationId: get-misc-phoneinfo
      parameters:
        - name: phone
          in: query
          required: true
          description: 需要查询的11位中国大陆手机号码。
          schema:
            type: string
            example: "13800138000"
          x-tooltip: 请输入11位手机号。
      responses:
        "200":
          description: 查询成功！返回号码的归属地和运营商信息。
          content:
            application/json:
              schema:
                type: object
                properties:
                  city:
                    type: string
                    example: 深圳
                  province:
                    type: string
                    example: 广东
                  sp:
                    type: string
                    description: 运营商 (Service Provider) 名称。
                    example: 联通
        "400":
          description: 请求参数错误。请检查你是否提供了 `phone` 参数，以及它是否是有效的11位手机号码。
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: INVALID_ARGUMENT
                  details:
                    type: object
                  message:
                    type: string
                    example: Missing or invalid 'phone' parameter.
        "500":
          description: 查询失败。我们的号码归属地数据库可能暂时无法访问，请稍后重试。
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: INTERNAL_SERVER_ERROR
                  details:
                    type: object
                  message:
                    type: string
                    example: Failed to query phone information.
      x-search-words:
        - 手机号
        - 归属地
        - 运营商
        - 查号码
        - phone
        - location
        - carrier
        - 移动
        - 联通
        - 电信
  /misc/randomnumber:
    get:
      tags:
        - Misc
      summary: 随机数生成
      description: >-
        需要一个简单的随机数，还是需要一串不重复的、带小数的随机数？这个接口都能满足你！


        ## 功能概述

        这是一个强大的随机数生成器。你可以指定生成的范围（最大/最小值）、数量、是否允许重复、以及是否生成小数（并指定小数位数）。


        ## 流程图

        ```mermaid

        graph TD
            A[开始] --> B{参数校验};
            B --> |通过| C{是否允许小数?};
            C --> |是| D[生成随机小数];
            C --> |否| E[生成随机整数];
            D --> F{是否允许重复?};
            E --> F;
            F --> |是| G[直接生成指定数量];
            F --> |否| H[生成不重复的数字];
            G --> I[返回结果];
            H --> I;
            B --> |失败| J[返回 400 错误];
        ```

        ## 使用须知

        > [!WARNING]

        > **不重复生成的逻辑限制**

        > 当设置 `allow_repeat=false` 时，请确保取值范围 `(max - min + 1)` 大于或等于你请求的数量
        `count`。否则，系统将无法生成足够的不重复数字，请求会失败并返回 400 错误。
      operationId: get-misc-randomnumber
      parameters:
        - name: min
          in: query
          required: false
          description: 生成随机数的最小值（包含）。
          schema:
            type: integer
            default: 1
            example: 10
          x-tooltip: 默认为 1。
        - name: max
          in: query
          required: false
          description: 生成随机数的最大值（包含）。
          schema:
            type: integer
            default: 100
            example: 50
          x-tooltip: 默认为 100。
        - name: count
          in: query
          required: false
          description: 需要生成的随机数的数量。
          schema:
            type: integer
            default: 1
            example: 5
          x-tooltip: 默认为 1。
        - name: allow_repeat
          in: query
          required: false
          description: 是否允许生成的多个数字中出现重复值。
          schema:
            type: boolean
            default: false
            example: true
          x-tooltip: 默认为 false (不重复)。
        - name: allow_decimal
          in: query
          required: false
          description: 是否生成小（浮点）数。如果为 false，则只生成整数。
          schema:
            type: boolean
            default: false
            example: true
          x-tooltip: 默认为 false (整数)。
        - name: decimal_places
          in: query
          required: false
          description: 如果 `allow_decimal=true`，这里可以指定小数的位数。
          schema:
            type: integer
            default: 2
            example: 2
          x-tooltip: 仅在 allow_decimal=true 时生效。
      responses:
        "200":
          description: 生成成功！返回一个包含随机数的数组。
          content:
            application/json:
              schema:
                type: object
                properties:
                  numbers:
                    type: array
                    description: 生成的随机数列表。
                    items:
                      type: number
                    example:
                      - 42
                      - 8
                      - 77
        "400":
          description: 请求参数无效。例如，`min` 大于 `max`，或者在不允许重复的情况下，请求的数量大于可能生成的数字总数。
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: INVALID_ARGUMENT
                  details:
                    type: object
                  message:
                    type: string
                    example: Invalid parameters. 'min' cannot be greater than 'max'.
      x-search-words:
        - 随机数
        - 生成
        - 整数
        - 小数
        - random
        - number
        - generator
        - int
        - float
        - 抽奖
        - 摇号
  /misc/timestamp:
    get:
      tags:
        - Misc
      summary: 转换时间戳 (旧版，推荐使用/convert/unixtime)
      description: |-
        这是一个用于将Unix时间戳转换为人类可读日期时间的旧版接口。

        ## 功能概述
        输入一个秒级或毫秒级的时间戳，返回其对应的本地时间和UTC时间。

        > [!WARNING]
        > **接口已过时**：这个接口已被新的 `/convert/unixtime` 取代。新接口功能更强大，支持双向转换。我们建议你迁移到新接口。

        [➡️ 前往新版接口文档](/docs/api-reference/get-convert-unixtime)
      operationId: get-misc-timestamp
      parameters:
        - name: ts
          in: query
          required: true
          description: 需要转换的Unix时间戳，支持10位（秒）或13位（毫秒）。
          schema:
            type: string
            example: "1672531200"
          x-tooltip: "例如: 1672531200"
      responses:
        "200":
          description: 转换成功！
          content:
            application/json:
              schema:
                type: object
                properties:
                  datetime_local:
                    type: string
                    example: 2023-01-01 08:00:00
                  datetime_utc:
                    type: string
                    example: 2023-01-01 00:00:00
                  input:
                    type: string
                    example: "1672531200"
                  type:
                    type: string
                    example: 秒
                  unix_timestamp:
                    type: integer
                    example: 1672531200
        "400":
          description: 无效的时间戳参数。请检查 `ts` 参数是否为纯数字字符串。
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: INVALID_ARGUMENT
                  details:
                    type: object
                  message:
                    type: string
                    example: Invalid timestamp parameter.
      x-search-words:
        - 时间戳
        - 日期
        - 转换
        - timestamp
        - unixtime
        - datetime
        - date
        - 旧版
        - legacy
  /misc/weather:
    get:
      tags:
        - Misc
      summary: 查询天气
      description: |-
        出门前，查一下天气总是个好习惯。这个接口为你提供精准、实时的天气数据，支持国内和国际城市。

        ## 功能概述
        这个接口支持三种查询方式：
        - 可以传 `adcode`，按行政区编码查询（优先级最高）
        - 可以传 `city`，按城市名称查询，支持中文（`北京`）和英文（`Tokyo`）
        - 两个都不传时，按客户端 IP 自动定位查询

        支持 `lang` 参数，可选 `zh`（默认）和 `en`，城市名翻译覆盖 7000+ 城市。

        ## 可选功能模块
        - `extended=true`：扩展气象字段（体感温度、能见度、气压、紫外线、空气质量及污染物分项数据）
        - `forecast=true`：多天预报（最多7天，含日出日落、风速等详细数据）
        - `hourly=true`：逐小时预报（24小时）
        - `minutely=true`：分钟级降水预报（仅国内城市）
        - `indices=true`：18项生活指数（穿衣、紫外线、洗车、运动、花粉等）

        ## 天气字段说明
        `weather` 是天气现象文本，不是固定枚举。

        常见值包括：晴、多云、阴、小雨、中雨、大雨、雷阵雨、小雪、中雪、大雪、雨夹雪、雾、霾、沙尘。

        如果你的业务需要稳定分类，建议结合 `weather_code` 做自己的映射归类。
      operationId: get-misc-weather
      parameters:
        - name: city
          in: query
          required: false
          description: 城市名称，支持中文（`北京`）和英文（`Tokyo`）。可选参数，不传时会尝试 IP 自动定位。
          schema:
            type: string
            example: 北京
          x-tooltip: 与 adcode 至少传一个，或都不传走自动定位。
        - name: adcode
          in: query
          required: false
          description: 城市行政区划代码（如 `110000`），优先级高于 city。可选参数，不传时会尝试 IP 自动定位。
          schema:
            type: string
          x-tooltip: 传 adcode 时优先按 adcode 查询。
        - name: extended
          in: query
          required: false
          description: 返回扩展气象字段（体感温度、能见度、气压、紫外线、降水量、云量、空气质量指数及污染物分项数据）。
          schema:
            type: boolean
            enum:
              - false
              - true
            x-enumLabels:
              "false": 不返回扩展字段（默认）
              "true": 返回扩展气象字段
          x-tooltip: 设为 true 获取更多气象数据
        - name: forecast
          in: query
          required: false
          description: 返回多天预报数据（最多7天），含白天夜间天气、风向风力、日出日落等。
          schema:
            type: boolean
            enum:
              - false
              - true
            x-enumLabels:
              "false": 不返回预报数据（默认）
              "true": 返回多天预报
          x-tooltip: 设为 true 获取最多7天天气预报
        - name: hourly
          in: query
          required: false
          description: 返回逐小时预报（24小时），含温度、天气、风向风速、湿度、降水概率等。
          schema:
            type: boolean
            enum:
              - false
              - true
            x-enumLabels:
              "false": 不返回逐小时预报（默认）
              "true": 返回逐小时预报
          x-tooltip: 设为 true 获取逐小时预报
        - name: minutely
          in: query
          required: false
          description: 返回分钟级降水预报（仅国内城市），每5分钟一个数据点，共24个。
          schema:
            type: boolean
            enum:
              - false
              - true
            x-enumLabels:
              "false": 不返回分钟级降水（默认）
              "true": 返回分钟级降水预报
          x-tooltip: 仅国内城市可用，设为 true 获取分钟级降水
        - name: indices
          in: query
          required: false
          description: 返回18项生活指数（穿衣、紫外线、洗车、晾晒、空调、感冒、运动、舒适度、出行、钓鱼、过敏、防晒、心情、啤酒、雨伞、交通、空气净化器、花粉）。
          schema:
            type: boolean
            enum:
              - false
              - true
            x-enumLabels:
              "false": 不返回生活指数（默认）
              "true": 返回18项生活指数
          x-tooltip: 设为 true 获取18项生活建议指数
        - name: lang
          in: query
          required: false
          description: 返回语言。`zh` 返回中文（默认），`en` 返回英文。城市名翻译覆盖 7000+ 城市。生活指数（`indices`）目前仅支持中文。
          schema:
            type: string
            enum:
              - zh
              - en
            default: zh
            x-enumLabels:
              zh: 中文（默认）
              en: English
          x-tooltip: 国际化场景建议传 en。
      responses:
        "200":
          description: 查询成功！返回该地区的实时天气信息。
          content:
            application/json:
              schema:
                type: object
                properties:
                  province:
                    type: string
                    description: 省份
                    example: 北京市
                  city:
                    type: string
                    description: 城市名
                    example: 北京
                  adcode:
                    type: string
                    description: 行政区划代码（部分数据源可能为空）
                    example: ""
                  weather:
                    type: string
                    description: 天气状况描述。默认返回中文，传 `lang=en` 时返回英文。非固定枚举。
                    example: 晴
                  temperature:
                    type: number
                    description: 当前温度 °C
                    example: 18.3
                  wind_direction:
                    type: string
                    description: 风向
                    example: 西南风
                  wind_power:
                    type: string
                    description: 风力等级
                    example: 微风
                  humidity:
                    type: number
                    description: 相对湿度 %
                    example: 20
                  report_time:
                    type: string
                    description: 数据更新时间
                    example: 2026-02-19 15:25:58
                  feels_like:
                    type: number
                    description: 体感温度 °C（extended=true 时返回）
                    example: 6
                  visibility:
                    type: number
                    description: 能见度 km（extended=true 时返回）
                    example: 11.3
                  pressure:
                    type: number
                    description: 气压 hPa（extended=true 时返回）
                    example: 1017.5
                  uv:
                    type: number
                    description: 紫外线指数（extended=true 时返回）
                    example: 2.9
                  precipitation:
                    type: number
                    description: 当前降水量 mm（extended=true 时返回）
                    example: 0
                  cloud:
                    type: number
                    description: 云量 %（extended=true 时返回）
                    example: 75
                  aqi:
                    type: number
                    description: 空气质量指数 0-500（extended=true 时返回）
                    example: 56
                  aqi_level:
                    type: number
                    description: AQI 等级 1-6（extended=true 时返回）
                    example: 2
                  aqi_category:
                    type: string
                    description: AQI 等级描述（优/良/轻度污染/中度污染/重度污染/严重污染）（extended=true 时返回）
                    example: 良
                  aqi_primary:
                    type: string
                    description: 主要污染物（如 PM2.5、PM10、O3 等）（extended=true 时返回）
                    example: PM10
                  air_pollutants:
                    type: object
                    description: 空气污染物分项数据（extended=true 时返回，部分数据源可能不返回）
                    properties:
                      pm25:
                        type: number
                        description: PM2.5 μg/m³
                        example: 33
                      pm10:
                        type: number
                        description: PM10 μg/m³
                        example: 69
                      o3:
                        type: number
                        description: 臭氧 μg/m³
                        example: 91
                      no2:
                        type: number
                        description: 二氧化氮 μg/m³
                        example: 13
                      so2:
                        type: number
                        description: 二氧化硫 μg/m³
                        example: 7
                      co:
                        type: number
                        description: 一氧化碳 mg/m³
                        example: 0.4
                  temp_max:
                    type: number
                    description: 当天最高温 °C（forecast=true 时返回）
                    example: 14
                  temp_min:
                    type: number
                    description: 当天最低温 °C（forecast=true 时返回）
                    example: -1
                  forecast:
                    type: array
                    description: 多天天气预报，最多7天（forecast=true 时返回）
                    items:
                      type: object
                      properties:
                        date:
                          type: string
                          description: 日期 YYYY-MM-DD
                          example: 2026-02-19
                        week:
                          type: string
                          description: 星期几（`lang=en` 时返回英文星期）
                          example: 星期四
                        temp_max:
                          type: number
                          description: 最高温度 °C
                          example: 14
                        temp_min:
                          type: number
                          description: 最低温度 °C
                          example: -1
                        weather_day:
                          type: string
                          description: 白天天气（`lang=en` 时返回英文）
                          example: 晴
                        weather_night:
                          type: string
                          description: 夜间天气（`lang=en` 时返回英文）
                          example: 晴
                        wind_dir_day:
                          type: string
                          description: 白天风向（可选，`lang=en` 时返回英文）
                          example: 西南风
                        wind_dir_night:
                          type: string
                          description: 夜间风向（可选，`lang=en` 时返回英文）
                          example: 北风
                        wind_scale_day:
                          type: string
                          description: 白天风力（可选，`lang=en` 时返回英文）
                          example: 微风
                        wind_scale_night:
                          type: string
                          description: 夜间风力（可选，`lang=en` 时返回英文）
                          example: 微风
                        wind_speed_day:
                          type: number
                          description: 白天风速 km/h（可选）
                          example: 17
                        humidity:
                          type: number
                          description: 湿度 %（可选）
                          example: 40
                        precip:
                          type: number
                          description: 降水量 mm（可选）
                          example: 0
                        visibility:
                          type: number
                          description: 能见度 km（可选）
                          example: 25
                        uv_index:
                          type: number
                          description: 紫外线指数（可选）
                          example: 5
                        sunrise:
                          type: string
                          description: 日出时间 HH:MM（可选）
                          example: 06:52
                        sunset:
                          type: string
                          description: 日落时间 HH:MM（可选）
                          example: 17:56
                  hourly_forecast:
                    type: array
                    description: 逐小时预报，最多24小时（hourly=true 时返回）
                    items:
                      type: object
                      properties:
                        time:
                          type: string
                          description: 预报时间（ISO8601 或 YYYY-MM-DD HH:MM）
                          example: 2026-02-19T17:00:00+0900
                        temperature:
                          type: number
                          description: 温度 °C
                          example: 8
                        weather:
                          type: string
                          description: 天气状况
                          example: 晴
                        wind_direction:
                          type: string
                          description: 风向（可选）
                          example: 北北西
                        wind_speed:
                          type: number
                          description: 风速 km/h（可选）
                          example: 17
                        wind_scale:
                          type: string
                          description: 风力等级（可选）
                          example: 3级
                        humidity:
                          type: number
                          description: 湿度 %（可选）
                          example: 25
                        precip:
                          type: number
                          description: 降水量 mm（可选）
                          example: 0
                        pressure:
                          type: number
                          description: 气压 hPa（可选）
                          example: 1018.7
                        cloud:
                          type: number
                          description: 云量 %（可选）
                          example: 6
                        feels_like:
                          type: number
                          description: 体感温度 °C（可选）
                          example: 6
                        dew_point:
                          type: number
                          description: 露点温度 °C（可选）
                          example: -11
                        visibility:
                          type: number
                          description: 能见度 km（可选）
                          example: 14
                        pop:
                          type: number
                          description: 降水概率 %（可选）
                          example: 0
                        uv_index:
                          type: number
                          description: 紫外线指数（可选）
                          example: 0
                  minutely_precip:
                    type: object
                    description: 分钟级降水预报（minutely=true 时返回，仅国内城市可用）
                    properties:
                      summary:
                        type: string
                        description: 降水描述
                        example: 未来2小时无降水
                      update_time:
                        type: string
                        description: 更新时间
                        example: 2026-02-19T15:30:00+08:00
                      data:
                        type: array
                        description: 每5分钟一个数据点，共24个
                        items:
                          type: object
                          properties:
                            time:
                              type: string
                              description: 预报时间 ISO8601
                              example: 2026-02-19T15:30:00+08:00
                            precip:
                              type: number
                              description: 5分钟累计降水量 mm
                              example: 0
                            type:
                              type: string
                              description: 降水类型：rain / snow
                              example: rain
                  life_indices:
                    type: object
                    description: 18项生活指数（indices=true 时返回），每项包含 level（等级名称）、brief（简短描述）、advice（详细建议）
                    properties:
                      clothing:
                        type: object
                        description: 穿衣指数
                        properties:
                          level:
                            type: string
                            example: 较舒适
                          brief:
                            type: string
                            example: 微凉
                          advice:
                            type: string
                            example: 建议穿薄外套、卫衣或长袖衬衫
                      uv:
                        type: object
                        description: 紫外线指数
                        properties:
                          level:
                            type: string
                            example: 高
                          brief:
                            type: string
                            example: 较强
                          advice:
                            type: string
                            example: 紫外线较强，减少10-14点户外活动，涂抹SPF30+防晒霜，戴帽子和墨镜
                      car_wash:
                        type: object
                        description: 洗车指数
                        properties:
                          level:
                            type: string
                            example: 非常适宜
                          brief:
                            type: string
                            example: 极佳
                          advice:
                            type: string
                            example: 天气晴好，非常适合洗车
                      drying:
                        type: object
                        description: 晾晒指数
                        properties:
                          level:
                            type: string
                            example: 适宜
                          brief:
                            type: string
                            example: 较好
                          advice:
                            type: string
                            example: 天气较好，适合晾晒
                      air_conditioner:
                        type: object
                        description: 空调开启指数
                        properties:
                          level:
                            type: string
                            example: 建议制热
                          brief:
                            type: string
                            example: 寒冷
                          advice:
                            type: string
                            example: 建议开启空调制热
                      cold_risk:
                        type: object
                        description: 感冒指数
                        properties:
                          level:
                            type: string
                            example: 较低
                          brief:
                            type: string
                            example: 较少发
                          advice:
                            type: string
                            example: 感冒风险较低
                      exercise:
                        type: object
                        description: 运动指数
                        properties:
                          level:
                            type: string
                            example: 适宜
                          brief:
                            type: string
                            example: 较好
                          advice:
                            type: string
                            example: 天气适合运动
                      comfort:
                        type: object
                        description: 舒适度指数
                        properties:
                          level:
                            type: string
                            example: 冷
                          brief:
                            type: string
                            example: 偏冷
                          advice:
                            type: string
                            example: 体感偏冷，适当添加衣物
                      travel:
                        type: object
                        description: 出行指数
                        properties:
                          level:
                            type: string
                            example: 适宜
                          brief:
                            type: string
                            example: 较好
                          advice:
                            type: string
                            example: 天气较好，适合出行
                      fishing:
                        type: object
                        description: 钓鱼指数
                        properties:
                          level:
                            type: string
                            example: 适宜
                          brief:
                            type: string
                            example: 较好
                          advice:
                            type: string
                            example: 天气适合钓鱼
                      allergy:
                        type: object
                        description: 过敏指数
                        properties:
                          level:
                            type: string
                            example: 较低
                          brief:
                            type: string
                            example: 不易发
                          advice:
                            type: string
                            example: 过敏风险较低
                      sunscreen:
                        type: object
                        description: 防晒指数
                        properties:
                          level:
                            type: string
                            example: 中等
                          brief:
                            type: string
                            example: 需防晒
                          advice:
                            type: string
                            example: 建议涂抹防晒霜
                      mood:
                        type: object
                        description: 心情指数
                        properties:
                          level:
                            type: string
                            example: 较好
                          brief:
                            type: string
                            example: 愉悦
                          advice:
                            type: string
                            example: 天气不错，心情愉悦
                      beer:
                        type: object
                        description: 啤酒指数
                        properties:
                          level:
                            type: string
                            example: 适宜
                          brief:
                            type: string
                            example: 较好
                          advice:
                            type: string
                            example: 适合来一杯冰啤酒
                      umbrella:
                        type: object
                        description: 雨伞指数
                        properties:
                          level:
                            type: string
                            example: 不需要
                          brief:
                            type: string
                            example: 无需
                          advice:
                            type: string
                            example: 天气晴好，无需带伞
                      traffic:
                        type: object
                        description: 交通指数
                        properties:
                          level:
                            type: string
                            example: 良好
                          brief:
                            type: string
                            example: 较好
                          advice:
                            type: string
                            example: 天气对交通无明显影响
                      air_purifier:
                        type: object
                        description: 空气净化器指数
                        properties:
                          level:
                            type: string
                            example: 建议开启
                          brief:
                            type: string
                            example: 一般
                          advice:
                            type: string
                            example: 空气质量一般，建议开启空气净化器
                      pollen:
                        type: object
                        description: 花粉扩散指数
                        properties:
                          level:
                            type: string
                            example: 较低
                          brief:
                            type: string
                            example: 不易发
                          advice:
                            type: string
                            example: 花粉浓度较低
        "400":
          description: 参数无效。常见原因：`adcode` 格式非法、`lang` 非法（仅支持 zh/en）、参数值类型错误或参数组合无效。
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: INVALID_PARAMETER
                  message:
                    type: string
                    example: 参数无效
        "404":
          description: 城市未找到。
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: NOT_FOUND
                  message:
                    type: string
                    example: 未找到该城市的天气数据
        "500":
          description: 服务器内部错误。
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: INTERNAL_SERVER_ERROR
                  message:
                    type: string
                    example: 服务器内部错误
        "503":
          description: 天气服务暂时不可用。
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: SERVICE_UNAVAILABLE
                  message:
                    type: string
                    example: 天气服务暂时不可用
      x-search-words:
        - 天气
        - 预报
        - 气温
        - 湿度
        - 风力
        - weather
        - forecast
        - temperature
        - adcode
        - hourly
        - 逐小时
        - 分钟级
        - 降水
        - 生活指数
        - 空气质量
      x-seo-optimized-text: 完全免费的天气查询API接口，无需注册即可调用！支持国内和国际城市，实时获取天气预报数据，支持按城市名称（中英文）或Adcode查询，未传参数时自动IP定位。返回温度、湿度、风向、风力等完整气象信息，可选扩展字段（体感温度、能见度、气压、紫外线、空气质量及污染物分项）、18项生活指数、最多7天天气预报、逐小时预报（24小时）和分钟级降水预报。JSON格式响应，毫秒级响应速度。适用于天气应用、出行规划、智能家居、农业监测等场景。
      x-seo-keywords:
        - 免费天气API
        - 天气查询接口
        - 实时天气API
        - 城市天气预报
        - 气象数据API
        - 天气预报接口
        - 城市编码API
        - 温度查询API
        - 无需注册天气API
        - 公共天气接口
        - 天气API免费调用
        - 体感温度API
        - 空气质量指数
        - 生活指数API
        - 紫外线指数
        - 多天天气预报
        - 7天预报API
        - 逐小时预报API
        - 分钟级降水API
        - 国际城市天气
        - 空气污染物API
      x-seo-title: 【完全免费】天气查询API接口 - 无需注册 | 国内国际城市实时天气
      x-seo-usage-scenarios: 适用于天气预报应用、出行规划工具、智能家居系统、农业气象监测、物流配送调度、户外活动提醒、旅游APP、小程序天气功能等场景
      x-seo-related-apis:
        - 世界时间查询
        - IP地址查询
        - 城市信息
      x-faq:
        - question: 这个天气API是免费的吗？
          answer: 是的，这个API完全免费，无需注册或API密钥，可以直接调用。适合个人和商业项目使用。
        - question: 支持查询哪些城市的天气？
          answer: 支持国内和国际城市。国内覆盖3000+城市（省、市、区县级别），国际城市也广泛支持。可以通过中文或英文城市名称、Adcode查询。
        - question: 不传 city 或 adcode 可以吗？
          answer: 可以。不传参数时会自动根据客户端 IP 定位后查询天气。如果自动定位失败，建议手动传 city 或 adcode。
        - question: 如何获取城市的Adcode？
          answer: Adcode是城市行政区划代码，例如北京市是110000。你可以直接使用城市名称查询，或者搜索'中国行政区划代码'获取Adcode。
        - question: 天气数据多久更新一次？
          answer: 天气数据实时获取，每次调用都会返回最新的气象信息，数据来源于权威气象服务。
        - question: 返回的数据包含哪些信息？
          answer: 基础数据包括：天气现象、温度、湿度、风向、风力、更新时间。通过 extended=true
            可获取体感温度、能见度、气压、紫外线、空气质量及污染物分项数据。通过 forecast=true
            可获取最多7天天气预报（含日出日落等详细数据）。通过 hourly=true 可获取逐小时预报（24小时）。通过
            minutely=true 可获取分钟级降水预报（仅国内）。通过 indices=true 可获取18项生活指数。
        - question: 逐小时预报和分钟级降水有什么区别？
          answer: 逐小时预报（hourly）返回未来24小时每小时的温度、天气、风向等完整气象数据。分钟级降水（minutely）返回未来2小时每5分钟的降水量和降水类型，适合精确判断短期内是否会下雨。分钟级降水仅国内城市可用。
        - question: 生活指数包含哪些内容？
          answer: 共18项：穿衣、紫外线、洗车、晾晒、空调开启、感冒、运动、舒适度、出行、钓鱼、过敏、防晒、心情、啤酒、雨伞、交通、空气净化器、花粉扩散。每项包含等级、简短描述和详细建议。所有城市均可用，基于当前气象数据实时计算。
        - question: lang=en 时哪些字段会翻译？
          answer: 城市名、省份、天气描述、风向、风力、星期等文本字段都会自动翻译为英文，城市名翻译覆盖7000+城市。生活指数（indices）目前仅支持中文。
        - question: 为什么有些字段没有返回？
          answer: 部分可选字段取决于数据源覆盖情况。国际城市通常字段更完整，国内城市部分字段可能缺失。extended=false（默认）时不返回任何扩展字段。
      x-jsonld:
        "@context": https://schema.org
        "@type": TechnicalArticle
        headline: 免费天气查询API - 国内国际城市实时天气数据
        description: 完全免费的天气查询API接口，无需注册即可调用。支持国内和国际城市，实时获取天气预报数据，支持逐小时预报、分钟级降水、18项生活指数。
        author:
          "@type": Organization
          name: UAPI
          url: https://uapis.cn
        publisher:
          "@type": Organization
          name: UAPI
          url: https://uapis.cn
        datePublished: 2024-01-01
        dateModified: 2026-02-19
        mainEntity:
          "@type": SoftwareApplication
          name: 天气查询API
          applicationCategory: WebAPI
          operatingSystem: All
          url: https://uapis.cn/api/v1/misc/weather
          offers:
            "@type": Offer
            price: "0"
            priceCurrency: CNY
  /misc/worldtime:
    get:
      tags:
        - Misc
      summary: 查询世界时间
      description: >-
        需要和国外的朋友开会，想知道他那边现在几点？用这个接口一查便知。


        ## 功能概述

        根据标准的时区名称（例如 'Asia/Shanghai' 或
        'Europe/London'），获取该时区的当前准确时间、UTC偏移量、星期等信息。
      operationId: get-misc-worldtime
      parameters:
        - name: city
          in: query
          required: true
          description: 你需要查询的城市或地区，请使用标准的 IANA 时区数据库名称，例如 'Shanghai', 'Asia/Tokyo',
            'America/New_York'。
          schema:
            type: string
            example: Asia/Shanghai
          x-tooltip: 支持城市名或 '洲/城市' 格式。
      responses:
        "200":
          description: 查询成功！返回指定时区的详细时间信息。
          content:
            application/json:
              schema:
                type: object
                properties:
                  datetime:
                    type: string
                    example: 2023-10-27T15:30:00.123456+08:00
                  offset_seconds:
                    type: integer
                    example: 28800
                  offset_string:
                    type: string
                    example: +08:00
                  query:
                    type: string
                    example: Shanghai
                  timestamp_unix:
                    type: integer
                    example: 1698391800
                  timezone:
                    type: string
                    example: Asia/Shanghai
                  weekday:
                    type: string
                    example: Friday
        "400":
          description: 请求参数错误。请检查你是否提供了 `city` 参数。
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: INVALID_ARGUMENT
                  details:
                    type: object
                  message:
                    type: string
                    example: Missing 'city' parameter.
        "404":
          description: 时区未找到。根据你提供的名称，未能找到对应的时区。请检查拼写或使用标准的 '洲/城市' 格式。
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: NOT_FOUND
                  details:
                    type: object
                  message:
                    type: string
                    example: The specified timezone was not found.
      x-search-words:
        - 世界时间
        - 时区
        - 全球时间
        - timezone
        - world clock
        - gmt
        - utc
        - iana
      x-seo-optimized-text: 🌍
        免费世界时间查询API接口，支持全球500+城市时区查询。获取任意时区的当前时间、UTC偏移量、星期等信息。无需注册，毫秒级响应。适用于跨时区应用、国际会议安排、全球化业务等场景。
      x-seo-keywords:
        - 免费世界时间API
        - 时区查询接口
        - 全球时间API
        - UTC时间转换
        - 时区转换API
        - 国际时间查询
        - 城市时间API
        - timezone API
        - 世界时钟接口
        - 跨时区时间
      x-seo-title: 🌐【免费】世界时间查询API - 500+城市时区实时查询
      x-seo-usage-scenarios: 适用于跨时区应用开发、国际会议时间安排、全球化电商平台、航班信息系统、远程办公工具、世界时钟应用、金融交易系统等场景
      x-seo-related-apis:
        - 天气查询
        - IP地址查询
        - 日期计算
        - 时间戳转换
  /misc/lunartime:
    get:
      tags:
        - Misc
      summary: 查询农历时间
      description: >-
        需要在指定时区下查看某个时间点的农历信息？这个接口可以直接返回完整结果。


        ## 功能概述

        支持传入 Unix 时间戳（秒或毫秒）和 IANA 时区名，返回公历时间、星期、农历年月日、干支、生肖、节气与节日信息。不传 `ts`
        时默认使用当前时间，不传 `timezone` 时默认 `Asia/Shanghai`。


        ## 时区说明

        - 支持标准 IANA 时区，例如 `Asia/Shanghai`、`Asia/Tokyo`

        - 也支持别名：`Shanghai`、`Beijing`

        - 时区非法时返回 400 并提示 `invalid timezone: xxx`
      operationId: get-misc-lunartime
      parameters:
        - name: ts
          in: query
          required: false
          description: Unix 时间戳，支持 10 位秒级或 13 位毫秒级。不传则默认当前时间。
          schema:
            type: string
            example: "1707537600"
          x-tooltip: 支持秒和毫秒时间戳。
        - name: timezone
          in: query
          required: false
          description: 时区名称。支持 IANA 时区（如 Asia/Shanghai）和别名（Shanghai、Beijing）。默认
            Asia/Shanghai。
          schema:
            type: string
            example: Asia/Shanghai
          x-tooltip: 推荐使用 IANA 时区名。
      responses:
        "200":
          description: 查询成功，返回指定时间和时区下的农历信息。
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    description: 业务状态码，200 表示成功。
                    example: 200
                  message:
                    type: string
                    description: 状态描述。
                    example: success
                  data:
                    type: object
                    description: 万年历查询结果。
                    properties:
                      query_timestamp:
                        type: string
                        description: 原始 ts 入参。
                        example: "1707537600"
                      query_timezone:
                        type: string
                        description: 原始 timezone 入参。
                        example: Asia/Shanghai
                      timezone:
                        type: string
                        description: 解析后的时区。
                        example: Asia/Shanghai
                      datetime:
                        type: string
                        description: 本地化时间，格式 YYYY-MM-DD HH:mm:ss。
                        example: 2024-02-10 12:00:00
                      datetime_rfc3339:
                        type: string
                        description: RFC3339 时间格式。
                        example: 2024-02-10T12:00:00+08:00
                      timestamp_unix:
                        type: integer
                        description: 秒级 Unix 时间戳。
                        example: 1707537600
                      weekday:
                        type: string
                        description: 星期英文。
                        example: Saturday
                      weekday_cn:
                        type: string
                        description: 星期中文。
                        example: 星期六
                      lunar_year:
                        type: integer
                        description: 农历年份（数字）。
                        example: 2024
                      lunar_month:
                        type: integer
                        description: 农历月份（数字）。
                        example: 1
                      lunar_day:
                        type: integer
                        description: 农历日期（数字）。
                        example: 1
                      is_leap_month:
                        type: boolean
                        description: 是否闰月。
                        example: false
                      lunar_year_cn:
                        type: string
                        description: 农历年份中文表示。
                        example: 二零二四
                      lunar_month_cn:
                        type: string
                        description: 农历月份中文表示。
                        example: 正月
                      lunar_day_cn:
                        type: string
                        description: 农历日期中文表示。
                        example: 初一
                      ganzhi_year:
                        type: string
                        description: 干支年。
                        example: 甲辰
                      ganzhi_month:
                        type: string
                        description: 干支月。
                        example: 丙寅
                      ganzhi_day:
                        type: string
                        description: 干支日。
                        example: 甲辰
                      zodiac:
                        type: string
                        description: 生肖。
                        example: 龙
                      solar_term:
                        type: string
                        description: 节气，无则为空字符串。
                        example: ""
                      lunar_festivals:
                        type: array
                        description: 农历节日数组。
                        items:
                          type: string
                          example: 春节
                      solar_festivals:
                        type: array
                        description: 公历节日数组。
                        items:
                          type: string
                          example: 元旦
        "400":
          description: "请求参数错误。`timezone` 非法时返回 `invalid timezone: xxx`，`ts` 非法时返回
            `invalid timestamp: xxx`。"
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    example: 400
                  message:
                    type: string
                    example: "invalid timezone: xxx"
      x-search-words:
        - 农历
        - 阴历
        - 节气
        - 生肖
        - 干支
        - lunar
        - lunartime
        - timezone
        - timestamp
        - 春节
  /misc/holiday-calendar:
    get:
      tags:
        - Misc
      summary: 查询节假日与万年历
      description: >-
        查询指定日期、月份或年份的万年历与节假日信息。


        ## 功能概述

        这个接口支持三种查询方式：按天（`date`）、按月（`month`）和按年（`year`）。调用时三者选一个传入即可。


        如果你只关心某一类事件，可以通过 `holiday_type` 进行筛选，例如只看法定休假/调休、公历节日、农历节日或节气。


        在 `date` 模式下，传 `include_nearby=true` 可以额外返回该日期前后最近的节日；返回数量由
        `nearby_limit` 控制，默认 7，最大 30。
      operationId: get-misc-holiday-calendar
      parameters:
        - name: date
          in: query
          required: false
          description: 按天查询时填写这个参数，例如查某一天。格式：`YYYY-MM-DD`。和 `month`、`year` 三选一。
          schema:
            type: string
            pattern: ^\d{4}-\d{2}-\d{2}$
            example: '2025-10-01'
          x-tooltip: 三选一：按天查询时填写 YYYY-MM-DD。
        - name: month
          in: query
          required: false
          description: 按月查询时填写这个参数，例如查某个月。格式：`YYYY-MM`。和 `date`、`year` 三选一。
          schema:
            type: string
            pattern: ^\d{4}-\d{2}$
          x-tooltip: 三选一：按月查询时填写 YYYY-MM。
        - name: year
          in: query
          required: false
          description: 按年查询时填写这个参数，例如查某一年。格式：`YYYY`。和 `date`、`month` 三选一。
          schema:
            type: string
            pattern: ^\d{4}$
          x-tooltip: 三选一：按年查询时填写 YYYY。
        - name: timezone
          in: query
          required: false
          description: 时区名称，默认 Asia/Shanghai。
          schema:
            type: string
            default: Asia/Shanghai
            example: Asia/Shanghai
          x-tooltip: 推荐传 IANA 时区名。
        - name: holiday_type
          in: query
          required: false
          description: 节日筛选类型，默认 all。
          schema:
            type: string
            default: all
            enum:
              - all
              - legal
              - legal_rest
              - legal_workday
              - solar
              - lunar
              - term
            example: legal
            x-enumLabels:
              all: 全部节日类型
              legal: 法定相关（休假 + 调休上班）
              legal_rest: 仅法定休假日
              legal_workday: 仅法定调休上班日
              solar: 仅公历节日
              lunar: 仅农历节日
              term: 仅节气
          x-tooltip: 不传就是 all；新手可先不传。
        - name: include_nearby
          in: query
          required: false
          description: 是否返回前后最近节日，仅 date 模式生效，默认 false。month/year 模式会忽略此参数。
          schema:
            type: boolean
            enum:
              - false
              - true
            default: false
            example: true
            x-enumLabels:
              "false": 不返回前后节日（默认）
              "true": 返回前后最近节日
          x-tooltip: 想看前后节日时设为 true（仅 date 模式）。
        - name: nearby_limit
          in: query
          required: false
          description: 返回最近节日数量限制，默认 7，最大 30。仅 date 模式 + include_nearby=true 生效。
          schema:
            type: integer
            default: 7
            maximum: 30
            example: 7
          x-tooltip: 只在 date 模式有用。
      responses:
        "200":
          description: 查询成功，返回指定范围的万年历与节假日信息。
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    example: 200
                  message:
                    type: string
                    example: success
                  data:
                    type: object
                    properties:
                      mode:
                        type: string
                        description: 查询模式：day、month、year。
                        example: day
                      query:
                        type: object
                        description: 请求参数回显。
                        properties:
                          date:
                            type: string
                            description: 日视图查询参数（YYYY-MM-DD）。非日视图时可能为空。
                            example: 2025-10-01
                          month:
                            type: string
                            description: 月视图查询参数（YYYY-MM）。非月视图时可能为空。
                            example: 2025-10
                          year:
                            type: string
                            description: 年视图查询参数（YYYY）。非年视图时可能为空。
                            example: "2026"
                          timezone:
                            type: string
                            description: 实际生效的时区。
                            example: Asia/Shanghai
                          holiday_type:
                            type: string
                            description: 节日筛选类型。
                            example: all
                          include_nearby:
                            type: boolean
                            description: 是否开启前后最近节日查询。
                            example: true
                          nearby_limit:
                            type: integer
                            description: 前后最近节日返回数量上限。
                            example: 7
                      summary:
                        type: object
                        description: 统计摘要。
                        properties:
                          total_days:
                            type: integer
                            description: 查询范围内总天数。
                            example: 31
                          weekend_days:
                            type: integer
                            description: 查询范围内周末天数。
                            example: 8
                          workdays:
                            type: integer
                            description: 查询范围内工作日天数（含法定调休上班）。
                            example: 23
                          rest_days:
                            type: integer
                            description: 查询范围内休息日天数（含周末和法定休假）。
                            example: 10
                          holiday_events:
                            type: integer
                            description: 按 holiday_type 过滤后的节日事件总数。
                            example: 5
                          legal_rest_days:
                            type: integer
                            description: 法定休假日天数。
                            example: 3
                          legal_workdays:
                            type: integer
                            description: 法定调休上班天数。
                            example: 1
                      days:
                        type: array
                        description: 日期明细列表。
                        items:
                          type: object
                          properties:
                            date:
                              type: string
                              description: 公历日期（YYYY-MM-DD）。
                              example: 2025-10-01
                            year:
                              type: integer
                              description: 公历年份。
                              example: 2025
                            month:
                              type: integer
                              description: 公历月份。
                              example: 10
                            day:
                              type: integer
                              description: 公历日期（天）。
                              example: 1
                            weekday_cn:
                              type: string
                              description: 中文星期，如星期三。
                              example: 星期三
                            is_weekend:
                              type: boolean
                              description: 是否为周末。
                              example: false
                            is_workday:
                              type: boolean
                              description: 是否为工作日（含法定调休上班日）。
                              example: false
                            is_rest_day:
                              type: boolean
                              description: 是否为休息日。
                              example: true
                            is_holiday:
                              type: boolean
                              description: 当天是否存在节日/节气/法定事件。
                              example: true
                            legal_holiday_name:
                              type: string
                              description: 法定节假日名称，无则为空。
                              example: 国庆节
                            legal_holiday_type:
                              type: string
                              description: 法定假日类型：rest 或 workday_adjust。
                              example: rest
                            solar_festival:
                              type: string
                              description: 公历节日名称，无则为空。
                              example: 国庆节
                            lunar_festival:
                              type: string
                              description: 农历节日名称，无则为空。
                              example: 中秋节
                            solar_term:
                              type: string
                              description: 节气名称，无则为空。
                              example: ""
                            lunar_year:
                              type: integer
                              description: 农历年份（数字）。
                              example: 2025
                            lunar_month:
                              type: integer
                              description: 农历月份（数字）。
                              example: 8
                            lunar_day:
                              type: integer
                              description: 农历日期（数字）。
                              example: 15
                            lunar_month_name:
                              type: string
                              description: 农历月份中文名称。
                              example: 八月
                            lunar_day_name:
                              type: string
                              description: 农历日期中文名称。
                              example: 十五
                            ganzhi_year:
                              type: string
                              description: 干支年。
                              example: 乙巳
                            ganzhi_month:
                              type: string
                              description: 干支月。
                              example: 乙酉
                            ganzhi_day:
                              type: string
                              description: 干支日。
                              example: 甲子
                      holidays:
                        type: array
                        description: 节日事件列表。
                        items:
                          type: object
                          properties:
                            date:
                              type: string
                              description: 事件日期（YYYY-MM-DD）。
                              example: 2025-10-01
                            name:
                              type: string
                              description: 事件名称。
                              example: 国庆节
                            type:
                              type: string
                              description: 事件类型。
                              enum:
                                - legal_rest
                                - legal_workday_adjust
                                - solar_festival
                                - lunar_festival
                                - solar_term
                              example: legal_rest
                            is_workday:
                              type: boolean
                              description: 仅 legal_workday_adjust 场景有意义。
                              example: false
                      nearby:
                        type: object
                        description: 前后最近节日，仅 include_nearby=true 且 date 模式返回。
                        properties:
                          previous:
                            type: array
                            description: 当前查询日期之前最近的节日列表（按时间倒序）。
                            items:
                              type: object
                              properties:
                                date:
                                  type: string
                                  description: 事件日期。
                                  example: 2025-09-17
                                name:
                                  type: string
                                  description: 事件名称。
                                  example: 中秋节
                                type:
                                  type: string
                                  description: 事件类型。
                                  example: lunar_festival
                          next:
                            type: array
                            description: 当前查询日期之后最近的节日列表（按时间正序）。
                            items:
                              type: object
                              properties:
                                date:
                                  type: string
                                  description: 事件日期。
                                  example: 2025-10-01
                                name:
                                  type: string
                                  description: 事件名称。
                                  example: 国庆节
                                type:
                                  type: string
                                  description: 事件类型。
                                  example: legal_rest
        "400":
          description: >-
            请求参数错误。常见原因：

            - `date`、`month`、`year` 未传或同时传入多个

            - 日期格式错误：`date` 必须为 `YYYY-MM-DD`、`month` 必须为 `YYYY-MM`、`year` 必须为
            `YYYY`

            - `holiday_type` 非法

            - `timezone` 非法
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    description: 业务状态码，400 表示请求参数错误。
                    example: 400
                  message:
                    type: string
                    description: 具体错误原因提示。
                    example: date/month/year 只能传一个
      x-search-words:
        - 节假日
        - 万年历
        - 法定假日
        - 调休
        - 节气
        - holiday
        - calendar
        - lunar
        - solar festival
        - workday
  /history/programmer/today:
    get:
      tags:
        - Misc
      summary: 程序员历史上的今天
      description: |-
        想知道程序员历史上的今天发生了什么大事吗？这个接口告诉你答案！

        ## 功能概述
        我们使用AI智能筛选从海量历史事件中挑选出与程序员、计算机科学相关的重要事件。每个事件都经过重要性评分和相关性评分，确保内容质量。
      operationId: get-history-programmer-today
      parameters: []
      responses:
        "200":
          description: 获取成功！返回今天的程序员历史事件列表。
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: 获取成功
                  date:
                    type: string
                    example: 04-04
                  events:
                    type: array
                    items:
                      type: object
                      properties:
                        year:
                          type: integer
                          example: 1975
                        title:
                          type: string
                          example: Microsoft 公司成立
                        description:
                          type: string
                          example: 比尔·盖茨和保罗·艾伦在美国新墨西哥州阿尔伯克基创立微软公司
                        category:
                          type: string
                          example: 公司创立
                        importance:
                          type: integer
                          example: 9
                        relevance_score:
                          type: number
                          example: 0.95
                        url:
                          type: string
                          example: https://zh.wikipedia.org/wiki/微软
        "500":
          description: 服务器内部错误。
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: INTERNAL_SERVER_ERROR
                  message:
                    type: string
                    example: Failed to fetch programmer history events.
      x-search-words:
        - 程序员
        - 历史
        - 今天
        - 编程
        - 计算机
        - 科学
        - 事件
        - programmer
        - history
        - today
        - computing
        - technology
  /history/programmer:
    get:
      tags:
        - Misc
      summary: 程序员历史事件
      description: |-
        想查看程序员历史上某个特定日期发生的大事件？指定月份和日期，我们就能告诉你！

        ## 功能概述
        通过指定月份和日期，获取该日发生的程序员相关历史事件。同样使用AI智能筛选，确保事件的相关性和重要性。
      operationId: get-history-programmer
      parameters:
        - name: month
          in: query
          required: true
          description: 月份，1-12之间的整数。
          schema:
            type: integer
            minimum: 1
            maximum: 12
            example: 4
          x-tooltip: 输入1-12之间的数字
        - name: day
          in: query
          required: true
          description: 日期，1-31之间的整数。
          schema:
            type: integer
            minimum: 1
            maximum: 31
            example: 4
          x-tooltip: 输入1-31之间的数字
      responses:
        "200":
          description: 获取成功！返回指定日期的程序员历史事件列表。
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: 获取成功
                  date:
                    type: string
                    example: 04-04
                  events:
                    type: array
                    items:
                      type: object
                      properties:
                        year:
                          type: integer
                          example: 1968
                        title:
                          type: string
                          example: ASCII 标准发布
                        description:
                          type: string
                          example: 美国信息交换标准代码正式发布，成为计算机文本编码的基础
                        category:
                          type: string
                          example: 技术标准
                        importance:
                          type: integer
                          example: 8
                        relevance_score:
                          type: number
                          example: 0.92
                        url:
                          type: string
                          example: https://zh.wikipedia.org/wiki/ASCII
        "400":
          description: 请求参数错误。请检查月份和日期参数是否正确。
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: INVALID_ARGUMENT
                  message:
                    type: string
                    example: Invalid month or day parameter.
        "500":
          description: 服务器内部错误。
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: INTERNAL_SERVER_ERROR
                  message:
                    type: string
                    example: Failed to fetch programmer history events.
      x-search-words:
        - 程序员
        - 历史
        - 指定日期
        - 编程
        - 计算机
        - 科学
        - 事件
        - programmer
        - history
        - date
        - computing
        - technology
  /misc/tracking/query:
    get:
      tags:
        - Misc
      summary: 查询快递物流信息
      description: |-
        买了东西想知道快递到哪儿了？这个接口帮你实时追踪物流状态。

        > [!VIP]
        > 本API目前处于**限时免费**阶段，我们鼓励开发者集成和测试。未来，它将转为付费API，为用户提供更稳定和强大的服务。

        ## 功能概述
        提供一个快递单号，系统会自动识别快递公司并返回完整的物流轨迹信息。支持中通、圆通、韵达、申通、极兔、顺丰、京东、EMS、德邦等60+国内外主流快递公司。

        ## 使用须知
        - **自动识别**：不知道是哪家快递？系统会根据单号规则自动识别快递公司（推荐使用）
        - **手动指定**：如果已知快递公司，可以传递 `carrier_code` 参数，查询速度会更快
        - **手机尾号验证**：部分快递公司需要验证收件人手机尾号才能查询详细物流，如果返回「暂无物流信息」，建议尝试传入 `phone` 参数
        - **查询时效**：物流信息实时查询，响应时间通常在1-2秒内
      operationId: get-misc-tracking-query
      parameters:
        - name: tracking_number
          in: query
          required: true
          description: 快递单号，通常是一串10-20位的数字或字母数字组合。
          schema:
            type: string
          x-tooltip: 输入完整的快递单号
        - name: carrier_code
          in: query
          required: false
          description: 快递公司编码（可选）。不填写时系统会自动识别，填写后可加快查询速度。
          schema:
            type: string
          x-tooltip: 例如：zhongtong、shunfeng、yuantong 等
        - name: phone
          in: query
          required: false
          description: 收件人手机尾号，4位数字（可选）。部分快递公司需要验证手机尾号才能查询详细物流信息。
          schema:
            type: string
            pattern: ^\d{4}$
          x-tooltip: 收件人手机号后4位，如 2312
      responses:
        "200":
          description: 查询成功！返回快递的完整物流轨迹。
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: SUCCESS
                  message:
                    type: string
                    example: 操作成功
                  data:
                    type: object
                    properties:
                      tracking_number:
                        type: string
                        description: 快递单号
                        example: YT1234567890123
                      carrier_code:
                        type: string
                        description: 快递公司编码
                        example: yuantong
                      carrier_name:
                        type: string
                        description: 快递公司名称
                        example: 圆通速递
                      track_count:
                        type: integer
                        description: 物流轨迹数量
                        example: 3
                      tracks:
                        type: array
                        description: 物流轨迹列表，按时间倒序排列
                        items:
                          type: object
                          properties:
                            time:
                              type: string
                              description: 物流更新时间
                              example: 2025-10-27 15:30:00
                            context:
                              type: string
                              description: 物流状态描述
                              example: 快件已签收，感谢使用圆通速递
        "400":
          description: 参数错误，请检查快递单号是否正确。
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: INVALID_ARGUMENT
                  message:
                    type: string
                    example: 缺少快递单号参数
        "404":
          description: 当前没有查询到物流轨迹时会返回 404，并附带错误码和提示信息。如果返回此错误，建议尝试传入 `phone`
            参数（收件人手机尾号）再次查询。
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: NO_TRACKING_DATA
                  message:
                    type: string
                    example: 暂无物流信息
      x-search-words:
        - 快递
        - 物流
        - 查询
        - 快递查询
        - 物流查询
        - 快递单号
        - tracking
        - express
        - 中通
        - 圆通
        - 韵达
        - 顺丰
        - 京东
        - EMS
        - 快递追踪
      x-seo-optimized-text: 免费快递物流查询API接口，支持顺丰、中通、圆通、韵达、京东、EMS等60+快递公司。自动识别快递公司，实时追踪物流轨迹。无需注册，一个接口查询所有快递。适用于电商平台、物流系统、快递查询应用等场景。
      x-seo-keywords:
        - 免费快递查询API
        - 物流查询接口
        - 快递单号查询
        - 顺丰快递API
        - 中通快递查询
        - 圆通物流API
        - 快递追踪接口
        - 物流轨迹API
        - 快递公司识别
        - 包裹追踪API
        - express tracking API
      x-seo-title: 【限时免费】快递物流查询API - 60+快递公司一键查询
      x-seo-usage-scenarios: 适用于电商平台物流追踪、快递查询小程序、物流管理系统、订单跟踪功能、客服系统集成、仓储管理、供应链系统等场景
      x-seo-related-apis:
        - 热榜查询
        - 天气查询
        - 手机归属地
        - IP查询
  /misc/tracking/detect:
    get:
      tags:
        - Misc
      summary: 识别快递公司
      description: >-
        不确定手里的快递单号属于哪家快递公司？这个接口专门做识别，不查物流。


        > [!VIP]

        > 本API目前处于**限时免费**阶段，我们鼓励开发者集成和测试。未来，它将转为付费API，为用户提供更稳定和强大的服务。


        ## 功能概述

        输入快递单号，系统会根据单号规则快速识别出最可能的快递公司。如果存在多个可能的匹配结果，还会在 `alternatives`
        字段中返回备选项，供你参考选择。


        ## 使用须知

        - **识别速度快**：只做规则匹配，不查询物流信息，响应速度通常在100ms内

        - **准确率高**：基于各快递公司的单号规则进行智能识别，准确率超过95%

        - **备选方案**：当单号规则可能匹配多家快递公司时，会提供所有可能的选项
      operationId: get-misc-tracking-detect
      parameters:
        - name: tracking_number
          in: query
          required: true
          description: 需要识别的快递单号。
          schema:
            type: string
          x-tooltip: 输入完整的快递单号
      responses:
        "200":
          description: 识别成功！返回识别结果和可能的备选项。
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: SUCCESS
                  message:
                    type: string
                    example: 操作成功
                  data:
                    type: object
                    properties:
                      tracking_number:
                        type: string
                        description: 查询的快递单号
                        example: SF1234567890123
                      carrier_code:
                        type: string
                        description: 最可能的快递公司编码
                        example: shunfeng
                      carrier_name:
                        type: string
                        description: 最可能的快递公司名称
                        example: 顺丰速运
                      alternatives:
                        type: array
                        description: 其他可能的快递公司列表（如果存在）
                        items:
                          type: object
                          properties:
                            code:
                              type: string
                              description: 快递公司编码
                              example: ems
                            name:
                              type: string
                              description: 快递公司名称
                              example: EMS
        "404":
          description: 无法识别该快递单号。
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: NO_MATCH
                  message:
                    type: string
                    example: 无法识别该快递单号
      x-search-words:
        - 快递识别
        - 识别快递
        - 快递公司
        - 快递单号识别
        - detect
        - carrier
        - 快递判断
  /misc/tracking/carriers:
    get:
      tags:
        - Misc
      summary: 获取支持的快递公司列表
      description: |-
        不确定系统支持哪些快递公司？这个接口返回完整的支持列表。

        > [!VIP]
        > 本API目前处于**限时免费**阶段，我们鼓励开发者集成和测试。未来，它将转为付费API，为用户提供更稳定和强大的服务。

        ## 功能概述
        获取系统当前支持的所有快递公司列表，包括每家公司的标准编码（code）和中文名称（name）。

        ## 使用建议
        - **推荐缓存**：这个列表基本不会频繁变动，建议在应用启动时调用一次并缓存到本地
        - **应用场景**：适合用于构建快递公司选择器、下拉菜单等UI组件
        - **缓存时长**：建议缓存24小时或更久
      operationId: get-misc-tracking-carriers
      parameters: []
      responses:
        "200":
          description: 获取成功！返回所有支持的快递公司列表。
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: SUCCESS
                  message:
                    type: string
                    example: 操作成功
                  data:
                    type: object
                    properties:
                      total:
                        type: integer
                        description: 支持的快递公司总数
                        example: 60
                      carriers:
                        type: array
                        description: 快递公司列表
                        items:
                          type: object
                          properties:
                            code:
                              type: string
                              description: 快递公司编码，用于API调用时的carrier_code参数
                              example: zhongtong
                            name:
                              type: string
                              description: 快递公司中文名称，用于界面显示
                              example: 中通快递
      x-search-words:
        - 快递公司列表
        - 支持的快递
        - 快递公司
        - carriers
        - 快递列表
  /misc/date-diff:
    post:
      tags:
        - Misc
      summary: 计算两个日期之间的时间差值
      description: >-
        想知道两个日期之间相差多久？这个接口帮你精确计算时间差值。


        ## 功能概述

        输入开始日期和结束日期，返回它们之间的时间差，包括总天数、总小时数、总分钟数、总秒数、总周数，以及人性化显示格式（如"1年2月3天"）。


        ## 日期格式

        接口支持自动识别常见日期格式，包括：YYYY-MM-DD、YYYY/MM/DD、DD-MM-YYYY、ISO
        8601（带时区）等。也可以通过`format`参数显式指定格式（如DD-MM-YYYY）。


        > [!NOTE]

        > 当结束日期早于开始日期时，返回的数值为负数。
      operationId: post-misc-date-diff
      parameters: []
      responses:
        "200":
          description: 计算成功，返回多种单位的时间差值
          content:
            application/json:
              schema:
                type: object
                properties:
                  days:
                    type: integer
                    description: 总天数
                    example: 364
                  hours:
                    type: integer
                    description: 总小时数
                    example: 8736
                  minutes:
                    type: integer
                    description: 总分钟数
                    example: 524160
                  seconds:
                    type: integer
                    description: 总秒数
                    example: 31449600
                  weeks:
                    type: integer
                    description: 总周数
                    example: 52
                  human_readable:
                    type: string
                    description: 人性化显示格式
                    example: 52周 0天
        "400":
          description: 日期解析失败或参数错误
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_code:
                    type: string
                    example: DATE_PARSE_ERROR
                  error_message:
                    type: string
                    example: "解析开始日期失败: 无法识别日期格式: invalid-date"
                  error_details:
                    type: string
                    example: ""
      requestBody:
        description: 包含日期信息的JSON对象
        required: true
        content:
          application/json:
            schema:
              required:
                - start_date
                - end_date
              type: object
              properties:
                start_date:
                  type: string
                  description: 开始日期，支持多种格式自动识别
                  example: 2025-01-01
                end_date:
                  type: string
                  description: 结束日期，支持多种格式自动识别
                  example: 2025-12-31
                format:
                  type: string
                  description: 日期格式（可选），如DD-MM-YYYY。不指定则自动识别
                  example: YYYY-MM-DD
      x-search-words:
        - 日期
        - 时间差
        - 日期计算
        - 倒计时
        - date
        - diff
        - difference
        - 时间间隔
        - 工期
        - 年龄
        - 天数
        - duration
        - 计算器
  /misc/district:
    get:
      tags:
        - Misc
      summary: Adcode 国内外行政区域查询
      description: >-
        一个接口，覆盖全球 243
        个国家、中国省/市/区/街道四级行政区划，支持关键词搜索、行政编码查询、坐标反查三种查询模式（必须至少传入一种查询参数）。


        ## 功能概述

        根据用户输入的搜索条件快速查找行政区域信息。例如：中国 > 山东省 > 济南市 > 历下区 > 舜华路街道。


        无需注册、无需密钥，直接调用即可获取结构化的行政区域数据。支持三种查询方式：

        - 传 `adcode`，按行政编码精确查询，同时返回下级区划列表

        - 传 `lat` + `lng`，坐标反查附近地点

        - 传 `keywords`，按关键词搜索，支持中英文


        ## 中国与国际数据差异

        中国数据包含 `adcode`、`citycode` 等字段，支持省/市/区/街道四级逐级查询；国际城市数据不含这些字段，但额外提供
        `population`（人口）和 `timezone`（时区）。


        > [!NOTE]

        > 部分城市（如东莞、文昌）没有区县层级，市级下方直接显示街道。街道级别的 `adcode` 返回的是所属区县的 `adcode`。
      operationId: get-misc-district
      parameters:
        - name: keywords
          in: query
          required: false
          description: 关键词搜索（城市名、区县名，支持中英文）。
          schema:
            type: string
            example: 上海
          x-tooltip: 支持中英文城市名搜索，如「上海」「London」。
        - name: adcode
          in: query
          required: false
          description: 中国行政区划代码精确查询（如 `110000`），同时返回下级行政区。
          schema:
            type: string
            example: "110000"
          x-tooltip: 传入 adcode 时优先级最高，返回该区划及下级列表。
        - name: lat
          in: query
          required: false
          description: 纬度，与 `lng` 配合使用，坐标反查附近地点。
          schema:
            type: number
            example: 39.9
          x-tooltip: 必须与 lng 同时传入。
        - name: lng
          in: query
          required: false
          description: 经度，与 `lat` 配合使用。
          schema:
            type: number
            example: 116.4
          x-tooltip: 必须与 lat 同时传入。
        - name: level
          in: query
          required: false
          description: 过滤行政级别。
          schema:
            type: string
            enum:
              - province
              - city
              - district
              - street
            x-enumLabels:
              province: 省/直辖市/自治区
              city: 市/地级
              district: 区/县
              street: 街道/乡镇
          x-tooltip: 可选值：province / city / district / street。
        - name: country
          in: query
          required: false
          description: 过滤国家代码（ISO 3166-1 alpha-2），如 `CN`、`JP`、`US`、`GB`。
          schema:
            type: string
            example: CN
          x-tooltip: ISO 3166-1 alpha-2 国家代码。
        - name: limit
          in: query
          required: false
          description: 返回数量上限，默认 `20`，最大 `100`。
          schema:
            type: integer
            default: 20
            maximum: 100
            example: 20
          x-tooltip: 默认 20，最大 100。
      responses:
        "200":
          description: 查询成功！返回匹配的行政区域列表。
          content:
            application/json:
              schema:
                type: object
                properties:
                  total:
                    type: integer
                    description: 结果总数。
                    example: 2
                  results:
                    type: array
                    description: 结果列表。
                    items:
                      type: object
                      properties:
                        name:
                          type: string
                          description: 地区名称。
                          example: 北京市
                        level:
                          type: string
                          description: 行政级别：province / city / district / street。
                          example: province
                        country:
                          type: string
                          description: 国家名称。
                          example: 中国
                        country_code:
                          type: string
                          description: ISO 3166-1 alpha-2 国家代码。
                          example: CN
                        province:
                          type: string
                          description: 省/州（中国数据）或一级行政区（国际数据）。
                          example: 北京市
                        city:
                          type: string
                          description: 市（仅中国数据）。
                          example: 北京市
                        district:
                          type: string
                          description: 区/县（仅中国数据）。
                          example: 朝阳区
                        street:
                          type: string
                          description: 街道/乡镇（仅中国数据）。
                          example: 三里屯街道
                        adcode:
                          type: string
                          description: 行政区划代码（仅中国数据）。
                          example: "110000"
                        citycode:
                          type: string
                          description: 城市区号（仅中国数据）。
                          example: "010"
                        center:
                          type: object
                          description: 中心点坐标。
                          properties:
                            lat:
                              type: number
                              example: 39.904987
                            lng:
                              type: number
                              example: 116.405289
                        population:
                          type: integer
                          description: 人口（仅国际城市数据）。
                          example: 8336599
                        timezone:
                          type: string
                          description: 时区（仅国际城市数据），如 Asia/Tokyo。
                          example: Asia/Tokyo
        "400":
          description: 请求参数错误。
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: INVALID_PARAMETER
                  message:
                    type: string
                    example: "invalid 'level' parameter, must be one of: province, city, district,
                      street"
      x-search-words:
        - 行政区划
        - 省市区
        - 城市查询
        - district
        - adcode
        - 坐标反查
        - 经纬度
        - 地理编码
        - 逆地理编码
        - 国家
        - 省份
        - 城市
        - 区县
        - 街道
        - 乡镇
        - 行政编码
        - 地址
        - 四级联动
        - 地址选择器
        - citycode
        - ISO
        - 国家代码
        - LBS
        - geocoding
      x-seo-optimized-text: 免费行政区域查询API接口，无需注册密钥即可调用。覆盖中国省/市/区县/街道四级行政区划（共43,151条）及全球243个国家31,251个城市数据。支持三种查询模式：通过Adcode行政编码精确查询并获取下级区划列表（如中国>山东省>济南市>历下区>舜华路街道）、通过经纬度坐标反查附近行政区域、通过关键词搜索城市和区县（支持中英文），必须至少传入一种查询参数。返回完整的行政级别、中心点坐标、国家代码（ISO
        3166-1）等结构化数据，中国数据包含adcode行政编码和citycode城市区号，国际城市额外提供人口和时区信息。JSON格式响应，适用于省市区街道四级联动地址选择器、电商收货地址、物流配送系统、地图应用开发、LBS位置服务、房产平台城市筛选、旅游应用目的地搜索、数据可视化地理分析等场景。接口根据传入参数自动识别查询意图，无需手动指定模式，响应默认缓存6小时。
      x-seo-keywords:
        - 行政区域查询API
        - 免费行政区划接口
        - adcode查询API
        - 中国行政区划代码查询
        - 省市区街道四级联动API
        - 行政编码查询接口
        - 坐标反查行政区
        - 经纬度查询城市API
        - 逆地理编码API
        - 地理编码接口
        - 全球城市查询API
        - 国际城市数据接口
        - 地址选择器API
        - 省市区三级联动接口
        - LBS位置服务API
        - 城市搜索接口
        - 区县查询API
        - 街道乡镇查询
        - 中国行政区域数据
        - 行政区划下级查询
        - 免费地理信息API
        - 城市adcode对照表
        - 无需注册地理API
        - ISO国家代码查询
        - 城市坐标查询API
      x-seo-title: 【免费】Adcode 国内外行政区域查询API - 中国四级区划/全球243国城市数据
      x-seo-usage-scenarios: 适用于省市区街道四级联动地址选择器、电商平台收货地址组件、物流配送区域划分系统、地图应用行政区域展示、LBS位置服务与附近地点查询、房产平台城市区域筛选、旅游应用目的地搜索、政务系统行政区划管理、数据可视化地理热力图、外卖配送范围划定、快递网点覆盖分析、人口统计与城市规划分析等场景
      x-seo-related-apis:
        - 天气查询
        - IP地址查询
        - 世界时间
        - 手机归属地查询
      x-faq:
        - question: 行政区域查询API支持哪些国家和地区？
          answer: 支持全球 243 个国家的城市数据（共 31,251 个城市），中国数据精确到省/市/区县/街道四级行政区划，共计 43,151
            条记录。中国数据包含 adcode 行政编码、citycode 城市区号等字段，国际城市额外提供人口和时区数据。
        - question: 三种查询模式有什么区别？怎么选择？
          answer: 接口根据传入参数自动选择模式，无需手动指定：传 adcode 走精确查询并返回下级区划（如传省级 adcode 返回所有市）；传 lat+lng
            走坐标反查返回附近地点；传 keywords 走关键词搜索支持中英文。必须至少传入一种查询参数。
        - question: 如何用这个API实现省市区街道四级联动？
          answer: 先不传参数获取省级列表，用户选择省后传该省 adcode 获取市列表，选择市后传市 adcode 获取区县列表，选择区县后传区县 adcode
            获取街道列表。每次传入上级 adcode 即可获取下级行政区划。
        - question: 坐标反查需要注意什么？
          answer: lat（纬度）和 lng（经度）必须同时传入，否则返回 400 错误。返回结果按距离排序，可通过 limit
            参数控制返回数量（默认20，最大100）。
        - question: 这个API需要注册或申请密钥吗？
          answer: 不需要。完全免费，无需注册、无需 API 密钥，直接发送 HTTP GET 请求即可调用。响应默认缓存 6 小时。
        - question: 中国数据和国际城市数据返回的字段有什么区别？
          answer: 中国数据包含 adcode（行政编码）、citycode（城市区号）、city、district、street
            等字段，支持四级行政区划逐级查询；国际城市数据包含 population（人口）和 timezone（时区，如
            Asia/Tokyo）字段，但没有 adcode 等中国特有字段。两者都包含
            name、level、country、country_code、province、center 坐标等通用字段。
        - question: 部分城市为什么没有区县层级？
          answer: 部分城市和省直辖县因为没有区县的概念，在市级下方直接显示街道。例如广东东莞、海南文昌市等。此外，街道级别返回的 adcode 是所属区县的
            adcode。
  /network/dns:
    get:
      tags:
        - Network
      summary: 执行DNS解析查询
      description: >-
        想知道一个域名指向了哪个IP？或者它的邮件服务器是谁？这个接口就像一个在线的 `dig` 或 `nslookup` 工具。


        ## 功能概述

        你可以查询指定域名的各种DNS记录，包括 `A` (IPv4), `AAAA` (IPv6), `CNAME` (别名), `MX`
        (邮件交换), `NS` (域名服务器) 和 `TXT` (文本记录)。
      operationId: get-network-dns
      parameters:
        - name: domain
          in: query
          required: true
          description: 你需要查询的域名，例如 'cn.bing.com'。
          schema:
            type: string
            example: cn.bing.com
          x-tooltip: "例如: cn.bing.com"
        - name: type
          in: query
          required: false
          description: 你想要查询的DNS记录类型。
          schema:
            type: string
            default: A
            enum:
              - A
              - AAAA
              - CNAME
              - MX
              - NS
              - TXT
            example: A
            x-enumLabels:
              A: IPv4地址
              AAAA: IPv6地址
              CNAME: 别名记录
              MX: 邮件服务器
              NS: 域名服务器
              TXT: 文本记录
          x-tooltip: 默认为 'A' 记录。
      responses:
        "200":
          description: 查询成功！返回解析到的DNS记录列表。
          content:
            application/json:
              schema:
                type: object
                properties:
                  domain:
                    type: string
                    example: cn.bing.com
                  error:
                    type: string
                    example: ""
                  records:
                    type: array
                    items:
                      type: object
                      properties:
                        content:
                          type: string
                          example: v=spf1 ...
                        flag:
                          type: integer
                          example: 0
                        port:
                          type: integer
                          example: 443
                        pri:
                          type: integer
                          example: 10
                        tag:
                          type: string
                          example: issue
                        target:
                          type: string
                          example: 1.2.3.4
                        weight:
                          type: integer
                          example: 5
                  type:
                    type: string
                    example: A
        "400":
          description: 请求参数无效。请检查 `domain` 参数是否提供且格式正确。
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: INVALID_ARGUMENT
                  details:
                    type: object
                  message:
                    type: string
                    example: Missing or invalid 'domain' parameter.
        "404":
          description: 未找到DNS记录。该域名可能不存在，或者不存在你所查询类型的记录（例如，一个没有配置MX记录的域名）。
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: NOT_FOUND
                  details:
                    type: object
                  message:
                    type: string
                    example: No DNS records found for the specified domain and type.
      x-search-words:
        - dns
        - 解析
        - 域名
        - ip
        - lookup
        - dig
        - nslookup
        - a记录
        - cname
        - mx
        - txt
      x-seo-optimized-text: 免费DNS解析查询API接口，在线DNS查询工具，支持A、AAAA、CNAME、MX、NS、TXT等记录类型查询。快速准确的域名解析服务，适用于网络诊断、域名管理、网络安全等场景。
      x-seo-keywords:
        - 免费DNS查询API
        - 域名解析接口
        - DNS记录查询
        - 网络诊断API
        - 域名查询服务
        - DNS工具API
        - 网络查询接口
      x-seo-title: 免费DNS解析查询API接口 - 在线域名解析工具
      x-seo-usage-scenarios: 适用于网络诊断、域名管理、网络安全监控、邮件服务器配置、CDN配置、网络故障排查、域名迁移等场景
      x-seo-related-apis:
        - IP查询
        - 网络工具
        - 域名工具
        - 网络诊断
  /network/icp:
    get:
      tags:
        - Network
      summary: 查询域名ICP备案信息
      description: >-
        想知道一个网站的背后运营主体是谁吗？如果它是在中国大陆运营的，ICP备案信息可以告诉你答案。


        ## 功能概述

        提供一个域名，查询其在中国工信部的ICP（Internet Content
        Provider）备案信息。这对于商业合作前的背景调查、验证网站合法性等场景很有帮助。


        > [!NOTE]

        > **查询范围**

        > 此查询仅对在中国大陆工信部进行过备案的域名有效。对于国外域名或未备案的域名，将查询不到结果。
      operationId: get-network-icp
      parameters:
        - name: domain
          in: query
          required: true
          description: 需要查询的域名或URL
          schema:
            type: string
            example: baidu.com
          x-tooltip: 可输入域名或包含域名的URL
      responses:
        "200":
          description: 查询成功！返回该域名的ICP备案详情。
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: "200"
                  domain:
                    type: string
                    example: baidu.com
                  msg:
                    type: string
                    example: 查询成功
                  natureName:
                    type: string
                    description: 主办单位的性质 (企业/个人)
                    example: 企业
                  serviceLicence:
                    type: string
                    description: ICP备案号
                    example: 京ICP证030173号
                  unitName:
                    type: string
                    description: 主办单位名称
                    example: 北京百度网讯科技有限公司
        "400":
          description: 请求参数无效。请检查 `domain` 参数是否提供且格式正确。
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: INVALID_ARGUMENT
                  details:
                    type: object
                  message:
                    type: string
                    example: Missing or invalid 'domain' parameter.
        "404":
          description: 未查询到备案信息。该域名可能没有在工信部备案，或者是我们查询的上游接口暂时没有收录。
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: NOT_FOUND
                  details:
                    type: object
                  message:
                    type: string
                    example: No ICP record found for this domain.
      x-search-words:
        - icp
        - 备案
        - 域名备案
        - 网站备案
        - 工信部
        - beian
        - 主体
      x-seo-optimized-text: 免费ICP备案查询API接口，在线域名备案信息查询工具。快速获取网站主办单位、备案号、备案性质等工信部备案信息。稳定可靠的备案查询服务，适用于网站合规检查、商业背调、域名交易等场景。
      x-seo-keywords:
        - 免费ICP备案查询API
        - 域名备案信息接口
        - 工信部备案查询
        - 网站备案号查询
        - 企业备案查询
        - 备案主体查询
        - 域名合规检查API
      x-seo-title: 免费ICP备案查询API接口 - 在线域名备案信息查询工具
      x-seo-usage-scenarios: 适用于网站合规性检查、商业合作背景调查、域名交易验证、竞品分析、网络安全审计、企业信息核实等场景
      x-seo-related-apis:
        - DNS查询
        - IP查询
        - Whois查询
        - 网络诊断工具
  /network/ipinfo:
    get:
      tags:
        - Network
      summary: 查询 IP
      description: |-
        想知道一个IP地址或域名来自地球的哪个角落？这个接口可以帮你定位它。你可以使用默认数据源，也可以指定 `source=commercial` 参数来查询更详细的商业级IP归属信息。

        ## 功能概述
        提供一个公网IPv4、IPv6地址或域名，我们会查询并返回它的地理位置（国家、省份、城市）、经纬度、以及所属的运营商（ISP）和自治系统（ASN）信息。这在网络安全分析、访问来源统计等领域非常有用。

        当使用 `source=commercial` 参数时，接口将调用高性能商业API，提供更精确的市、区、运营商、时区、海拔等信息。请注意，商业查询的响应时间可能会稍长。
      operationId: get-network-ipinfo
      parameters:
        - name: ip
          in: query
          required: true
          description: 你需要查询的公网IP地址或域名（支持IPv4和IPv6）。
          schema:
            type: string
            example: cn.bing.com
          x-tooltip: "例如: 8.8.8.8 或 cn.bing.com"
        - name: source
          in: query
          required: false
          description: 查询的数据源。如果留空，将使用默认的数据库。如果设置为
            `commercial`，将调用商业级API，返回更详细的地理位置信息，但响应时间可能会稍长。
          schema:
            type: string
            enum:
              - commercial
            x-enumLabels:
              commercial: 商业数据源
          x-tooltip: "例如: commercial"
      responses:
        "200":
          description: 查询成功！返回该IP地址的详细地理和网络信息。
          content:
            application/json:
              schema:
                type: object
                properties:
                  ip:
                    type: string
                    description: 查询的IP地址
                    example: 8.8.8.8
                  region:
                    type: string
                    description: 地理位置，格式：国家 省份 城市
                    example: 美国
                  isp:
                    type: string
                    description: 运营商名称
                    example: GOOGLE
                  llc:
                    type: string
                    description: 归属机构
                    example: GOOGLE
                  asn:
                    type: string
                    description: 自治系统编号
                    example: AS15169
                  latitude:
                    type: number
                    description: 纬度
                    example: 37.751
                  longitude:
                    type: number
                    description: 经度
                    example: -97.822
                  beginip:
                    type: string
                    description: IP段起始地址（标准查询）
                    example: 8.8.8.0
                  endip:
                    type: string
                    description: IP段结束地址（标准查询）
                    example: 8.8.8.255
                  district:
                    type: string
                    description: 行政区（商业查询）
                    example: 龙岗区
        "400":
          description: IP地址参数无效。请检查 `ip` 参数是否提供，以及它是否是一个合法的公网IP地址。
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: INVALID_ARGUMENT
                  details:
                    type: object
                  message:
                    type: string
                    example: Invalid IP address provided.
        "404":
          description: 信息未找到。这通常意味着你查询的是一个内网IP地址（如 192.168.x.x）或一个未分配的公网IP地址，我们的数据库中没有它的信息。
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: NOT_FOUND
                  details:
                    type: object
                  message:
                    type: string
                    example: Information for the given IP was not found in the database.
        "500":
          description: 服务器内部错误。IP查询服务可能遇到了问题。
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: INTERNAL_SERVER_ERROR
                  details:
                    type: object
                  message:
                    type: string
                    example: An internal error occurred while querying IP information.
      x-search-words:
        - ip
        - ip地址
        - 归属地
        - 地理位置
        - isp
        - asn
        - 定位
        - 查询
        - lookup
        - 域名
      x-seo-optimized-text: 免费IP地址查询API接口，在线IP归属地定位工具。支持IPv4、IPv6和域名查询，获取地理位置、运营商ISP、ASN等详细信息。提供标准版和商业级高精度数据源，适用于网络安全分析、访问统计、风控系统等场景。
      x-seo-keywords:
        - 免费IP查询API
        - IP归属地接口
        - IP定位API
        - IP地理位置查询
        - 运营商查询
        - ASN查询
        - IP定位服务
        - 网络安全API
      x-seo-title: 免费IP地址查询API接口 - 在线IP归属地定位工具
      x-seo-usage-scenarios: 适用于网络安全分析、访问来源统计、用户画像、风控系统、广告定向投放、内容分发优化、反欺诈检测等场景
      x-seo-related-apis:
        - DNS查询
        - Ping测试
        - 端口扫描
        - 我的IP查询
  /network/myip:
    get:
      tags:
        - Network
      summary: 查询我的 IP
      description: >-
        想知道你自己的出口公网IP是多少吗？这个接口就是你的“网络身份证”。你可以使用默认数据源，也可以指定 `source=commercial`
        参数来查询更详细的商业级IP归属信息。


        ## 功能概述

        调用此接口，它会返回你（即发起请求的客户端）的公网IP地址，并附带与 `/network/ipinfo`
        接口相同的地理位置和网络归属信息。非常适合用于在网页上向用户展示他们自己的IP和地理位置。


        当使用 `source=commercial`
        参数时，接口将调用高性能商业API，提供更精确的市、区、运营商、时区、海拔等信息。请注意，商业查询的响应时间可能会稍长。
      operationId: get-network-myip
      parameters:
        - name: source
          in: query
          required: false
          description: 查询的数据源。如果留空，将使用默认的数据库。如果设置为
            `commercial`，将调用商业级API，返回更详细的地理位置信息，但响应时间可能会稍长。
          schema:
            type: string
            enum:
              - commercial
            x-enumLabels:
              commercial: 商业数据源
          x-tooltip: "例如: commercial"
      responses:
        "200":
          description: 查询成功！返回你的客户端IP的详细信息。
          content:
            application/json:
              schema:
                type: object
                properties:
                  ip:
                    type: string
                    description: 你的公网IP地址
                    example: 117.182.103.101
                  region:
                    type: string
                    description: 地理位置，格式：国家 省份 城市
                    example: 中国 广西 南宁市
                  isp:
                    type: string
                    description: 运营商名称
                    example: China Mobile Communications Group Co., Ltd.
                  llc:
                    type: string
                    description: 归属机构
                    example: 移动
                  asn:
                    type: string
                    description: 自治系统编号
                    example: AS9808
                  latitude:
                    type: number
                    description: 纬度
                    example: 22.8111
                  longitude:
                    type: number
                    description: 经度
                    example: 108.3168
                  beginip:
                    type: string
                    description: IP段起始地址（标准查询）
                    example: 117.182.64.0
                  endip:
                    type: string
                    description: IP段结束地址（标准查询）
                    example: 117.182.127.255
                  district:
                    type: string
                    description: 行政区（商业查询）
                    example: 青秀区
        "400":
          description: 无法获取有效的客户端IP。这在一些特殊的网络环境下可能发生，例如通过了复杂的代理。
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: INVALID_STATE
                  details:
                    type: object
                  message:
                    type: string
                    example: Could not determine client IP address.
        "500":
          description: 服务器内部错误。在查询IP归属地信息时发生错误。
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: INTERNAL_SERVER_ERROR
                  details:
                    type: object
                  message:
                    type: string
                    example: An internal error occurred while processing IP information.
      x-search-words:
        - 我的ip
        - 本机ip
        - 公网ip
        - what is my ip
        - ip
        - ip地址
        - 客户端ip
        - 我的ip地址是什么
      x-seo-optimized-text: 免费查询我的IP地址API接口，在线获取本机公网IP工具。自动检测客户端出口IP并返回详细归属地信息，支持标准版和商业级高精度数据。适用于网页IP展示、网络诊断、代理检测等场景。
      x-seo-keywords:
        - 查询我的IP
        - 本机IP查询API
        - 公网IP获取
        - What is my IP
        - 客户端IP检测
        - 出口IP查询
        - 免费IP接口
      x-seo-title: 免费查询我的IP地址API接口 - 在线获取本机公网IP
      x-seo-usage-scenarios: 适用于网页IP展示、网络诊断工具、代理检测、VPN测试、网络配置验证、用户地理位置展示等场景
      x-seo-related-apis:
        - IP查询
        - Ping测试
        - 网络诊断
        - DNS查询
  /network/ping:
    get:
      tags:
        - Network
      summary: Ping 主机
      description: >-
        想知道从我们的服务器到你的服务器网络延迟高不高？这个工具可以帮你测试网络连通性。


        ## 功能概述

        这个接口会从我们的服务器节点对你指定的主机（域名或IP地址）执行 ICMP Ping
        操作。它会返回最小、最大、平均延迟以及丢包率等关键指标，是诊断网络问题的得力助手。
      operationId: get-network-ping
      parameters:
        - name: host
          in: query
          required: true
          description: 你需要 Ping 的目标主机，可以是域名或IP地址。
          schema:
            type: string
            example: cn.bing.com
          x-tooltip: "例如: cn.bing.com 或 8.8.8.8"
      responses:
        "200":
          description: Ping 操作成功！返回延迟统计数据。
          content:
            application/json:
              schema:
                type: object
                properties:
                  avg:
                    type: number
                    description: 平均延迟(ms)
                    example: 1.25
                  host:
                    type: string
                    example: cn.bing.com
                  ip:
                    type: string
                    example: 142.250.191.78
                  location:
                    type: string
                    example: 美国
                  max:
                    type: number
                    description: 最大延迟(ms)
                    example: 2.1
                  min:
                    type: number
                    description: 最小延迟(ms)
                    example: 0.89
        "400":
          description: |-
            请求失败，参数无效或目标不可达。前端可直接展示 `message` 字段。

            **可能原因**:
            - **无法解析主机**: `host` 参数是一个无效的域名或IP地址。
              ```json
              {
                  "code": "INVALID_PARAMETER",
                  "message": "无法解析主机 '无效的主机名'，请检查输入是否正确。"
              }
              ```
            - **Ping 超时**: 目标主机无法访问或被防火墙拦截。
              ```json
              {
                  "code": "INVALID_PARAMETER",
                  "message": "对主机 '目标主机' 的 Ping 请求超时，目标可能不可达或防火墙已拦截。"
              }
              ```
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: INVALID_PARAMETER
                  message:
                    type: string
                    example: 无法解析主机 '无效的主机名'，请检查输入是否正确。
        "429":
          description: |-
            服务繁忙。当服务器 Ping 请求过多时，会触发限流。前端可直接展示 `message` 字段。

            ```json
            {
                "code": "SERVICE_BUSY",
                "message": "Ping 服务正忙，请稍后再试。"
            }
            ```
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: SERVICE_BUSY
                  message:
                    type: string
                    example: Ping 服务正忙，请稍后再试。
      x-search-words:
        - ping
        - 延迟
        - 测速
        - 网络测试
        - 连通性
        - icmp
        - latency
        - 丢包
      x-seo-optimized-text: 免费在线Ping测试API接口，网络延迟检测工具。支持域名和IP地址Ping测试，返回最小、最大、平均延迟及丢包率等关键指标。稳定可靠的网络诊断服务，适用于服务器监控、网络故障排查等场景。
      x-seo-keywords:
        - 免费Ping测试API
        - 在线Ping工具
        - 网络延迟检测
        - ICMP测试接口
        - 服务器连通性检查
        - 网络诊断API
        - 丢包率测试
      x-seo-title: 免费在线Ping测试API接口 - 网络延迟检测工具
      x-seo-usage-scenarios: 适用于服务器监控、网络故障排查、CDN节点测试、游戏延迟检测、网络质量评估、运维自动化等场景
      x-seo-related-apis:
        - 端口扫描
        - IP查询
        - DNS查询
        - 网络诊断
  /network/pingmyip:
    get:
      tags:
        - Network
      summary: Ping 我的 IP
      description: |-
        这是一个非常方便的快捷接口，想知道你的网络到我们服务器的回程延迟吗？点一下就行！

        ## 功能概述
        这个接口是 `/network/myip` 和 `/network/ping` 的结合体。它会自动获取你客户端的公网IP，然后从我们的服务器Ping这个IP，并返回延迟数据。这对于快速判断你本地网络到服务器的连接质量非常有用。
      operationId: get-network-pingmyip
      parameters: []
      responses:
        "200":
          description: Ping 操作成功！返回到你客户端IP的延迟统计数据。
          content:
            application/json:
              schema:
                type: object
                properties:
                  avg:
                    type: number
                    description: 平均延迟(ms)
                    example: 35.4
                  host:
                    type: string
                    example: 123.123.123.123
                  ip:
                    type: string
                    example: 123.123.123.123
                  location:
                    type: string
                    example: 中国 北京
                  max:
                    type: number
                    description: 最大延迟(ms)
                    example: 40.1
                  min:
                    type: number
                    description: 最小延迟(ms)
                    example: 32.8
        "400":
          description: 无法获取客户端IP。
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: INVALID_STATE
                  details:
                    type: object
                  message:
                    type: string
                    example: Could not determine client IP address.
        "404":
          description: Ping操作失败。这很可能是因为你的路由器或防火墙禁止了外部ICMP Ping请求。
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: PING_FAILED
                  details:
                    type: object
                  message:
                    type: string
                    example: Ping operation failed. The host may not be reachable or is blocking
                      ICMP requests.
      x-search-words:
        - ping我
        - ping my ip
        - 回程延迟
        - 网络测试
        - ping
        - 我的ip
      x-seo-optimized-text: 免费Ping我的IP
        API接口，一键测试回程网络延迟。自动获取客户端IP并从服务器发起Ping测试，快速评估网络连接质量。便捷的网络诊断工具，适用于网络质量检测、连接测试等场景。
      x-seo-keywords:
        - Ping我的IP
        - 回程延迟测试
        - 网络质量检测API
        - 一键Ping测试
        - 网络连接测试
        - 免费网络诊断
      x-seo-title: 免费Ping我的IP API接口 - 一键测试回程网络延迟
      x-seo-usage-scenarios: 适用于快速网络质量检测、服务器到客户端延迟测试、网络连接诊断、用户网络状态展示等场景
      x-seo-related-apis:
        - Ping测试
        - 我的IP查询
        - 网络诊断
        - 端口扫描
  /network/portscan:
    get:
      tags:
        - Network
      summary: 端口扫描
      description: |-
        想检查一下你的服务器上某个端口（比如SSH的22端口或者Web的80端口）是否对外开放？这个工具可以帮你快速确认。

        ## 功能概述
        你可以指定一个主机和端口号，我们的服务器会尝试连接该端口，并告诉你它是开放的（open）、关闭的（closed）还是超时了（timeout）。这对于网络服务配置检查和基本的安全扫描很有用。
      operationId: get-network-portscan
      parameters:
        - name: host
          in: query
          required: true
          description: 需要扫描的目标主机，可以是域名或IP地址。
          schema:
            type: string
            example: cn.bing.com
          x-tooltip: "例如: cn.bing.com 或 1.2.3.4"
        - name: port
          in: query
          required: true
          description: 需要扫描的端口号，范围是 1 到 65535。
          schema:
            type: integer
            example: 80
          x-tooltip: "例如: 80, 443, 22"
        - name: protocol
          in: query
          required: false
          description: 扫描使用的协议，可以是 'tcp' 或 'udp'。
          schema:
            type: string
            default: tcp
            enum:
              - tcp
              - udp
            example: tcp
          x-tooltip: 默认为'tcp'，通常更常用。
      responses:
        "200":
          description: 扫描完成！返回端口的状态。
          content:
            application/json:
              schema:
                type: object
                properties:
                  ip:
                    type: string
                    example: 1.2.3.4
                  port:
                    type: integer
                    example: 80
                  port_status:
                    type: string
                    description: '"open", "closed", 或 "timeout"'
                    example: open
                  protocol:
                    type: string
                    example: tcp
        "400":
          description: 请求参数无效。请检查 `host`, `port` 等参数是否提供且格式正确。
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: INVALID_ARGUMENT
                  details:
                    type: object
                  message:
                    type: string
                    example: Invalid parameters provided (e.g., port out of range).
        "500":
          description: 扫描失败。服务器在执行扫描时发生内部错误。
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: SCAN_FAILED
                  details:
                    type: object
                  message:
                    type: string
                    example: The port scan operation failed.
      x-search-words:
        - 端口扫描
        - 端口检查
        - 开放端口
        - nmap
        - telnet
        - port scan
        - tcp
        - udp
        - 防火墙
      x-seo-optimized-text: 免费在线端口扫描API接口，TCP/UDP端口检测工具。快速检查服务器端口开放状态，支持常用端口如SSH(22)、HTTP(80)、HTTPS(443)等。安全可靠的端口扫描服务，适用于服务器配置检查、安全审计等场景。
      x-seo-keywords:
        - 免费端口扫描API
        - 在线端口检测
        - TCP端口扫描
        - UDP端口检查
        - 服务器端口测试
        - 防火墙检测
        - 端口开放查询
      x-seo-title: 免费在线端口扫描API接口 - TCP/UDP端口检测工具
      x-seo-usage-scenarios: 适用于服务器配置检查、网络安全审计、防火墙规则验证、服务可用性监控、渗透测试准备、运维自动化等场景
      x-seo-related-apis:
        - Ping测试
        - IP查询
        - DNS查询
        - 网络诊断
  /network/urlstatus:
    get:
      tags:
        - Network
      summary: 检查URL的可访问性状态
      description: |-
        你的网站或API还好吗？用这个接口给它做个快速“体检”吧。

        ## 功能概述
        提供一个URL，我们会向它发起一个请求，并返回其HTTP响应状态码。这是一种简单而有效的服务可用性监控方法。
      operationId: get-network-urlstatus
      parameters:
        - name: url
          in: query
          required: true
          description: 你需要检查其可访问性状态的完整URL。
          schema:
            type: string
            format: url
            example: https://cn.bing.com
          x-tooltip: 必须是完整的URL，如 https://cn.bing.com
      responses:
        "200":
          description: 检查完成！根据目标URL的可达性返回不同结果。
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    title: 可达响应
                    properties:
                      status:
                        type: integer
                        description: 目标URL实际返回的HTTP状态码。
                        example: 200
                      url:
                        type: string
                        example: https://www.google.com
                    description: 当目标 URL 可访问时，`status` 为目标返回的 HTTP 状态码（如 `200`）。
                  - type: object
                    title: 不可达响应
                    properties:
                      status:
                        type: integer
                        description: 目标不可达或请求失败时固定为 0。
                        example: 0
                      url:
                        type: string
                        example: https://example.invalid
                    description: 当目标 URL 不可达或请求失败（如 DNS 失败、超时、连接失败）时，`status` 为 `0`。
        "400":
          description: 请求参数无效。请检查 `url` 参数是否提供且格式正确。
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: INVALID_ARGUMENT
                  details:
                    type: object
                  message:
                    type: string
                    example: Missing or invalid 'url' parameter.
        "502":
          description: 请求URL失败（例如，DNS解析失败、连接超时）
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: REQUEST_FAILED
                  details:
                    type: object
                  message:
                    type: string
                    example: Failed to request the URL. It might be down or unreachable.
      x-search-words:
        - url
        - 链接检测
        - 网站状态
        - 可用性
        - 监控
        - http状态码
        - head请求
        - 存活
        - is it down
  /network/whois:
    get:
      tags:
        - Network
      summary: 查询域名的WHOIS注册信息
      description: |-
        想知道一个域名是什么时候注册的、注册商是谁、什么时候到期？WHOIS信息可以告诉你这一切。

        ## 功能概述
        这是一个在线的WHOIS查询工具。你可以通过如下两种方式获取WHOIS信息：

        - **默认行为**（不带参数）：`GET /api/v1/network/whois?domain=google.com`
          - 返回一个JSON对象，`whois` 字段为原始、未处理的WHOIS文本字符串。
        - **JSON格式化**：`GET /api/v1/network/whois?domain=google.com&format=json`
          - 返回一个JSON对象，`whois` 字段为解析后的JSON对象，包含WHOIS信息中的键值对。

        这样你既可以获得最全的原始信息，也可以方便地处理结构化数据。
      operationId: get-network-whois
      parameters:
        - name: domain
          in: query
          required: true
          description: 你需要查询WHOIS信息的域名。
          schema:
            type: string
            example: google.com
          x-tooltip: "例如: google.com"
        - name: format
          in: query
          required: false
          description: 返回格式。留空或为 'text' 时返回原始WHOIS文本，设为 'json' 时返回结构化JSON。
          schema:
            type: string
            enum:
              - text
              - json
            default: text
            example: json
          x-tooltip: 可选，'json' 返回结构化数据，默认返回原始文本
      responses:
        "200":
          description: 查询成功！根据 format 参数返回原始WHOIS文本或结构化JSON。
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    properties:
                      whois:
                        type: string
                        description: |-
                          **WHOIS原始文本**

                          返回未经处理的原始WHOIS查询结果文本。
                        example: |-
                          Domain Name: GOOGLE.COM
                          Registry Domain ID: 2138514_DOMAIN_COM-VRSN
                          Registrar WHOIS Server: whois.markmonitor.com
                          ...
                    description: >-
                      ### 文本格式响应

                      当 `format=text` 或未指定时，`whois`
                      字段包含原始的WHOIS查询文本。这保留了最完整的信息，适合需要自行解析或展示原始数据的场景。
                  - type: object
                    properties:
                      whois:
                        type: object
                        description: |-
                          ### 结构化WHOIS信息

                          返回经过解析的JSON对象，包含以下主要部分：

                          - **域名信息**: 包含域名ID、注册状态、DNS服务器等
                          - **注册商信息**: 注册服务商的详细信息
                          - **注册人信息**: 域名所有者的相关信息（可能因隐私保护而部分隐藏）
                          - **重要日期**: 包括注册日期、更新日期和到期日期
                        example:
                          domain:
                            id: 12345678901234
                            domain: exa***.com
                            punycode: exa***.com
                            name: exa***
                            extension: com
                            whois_server: whois.***.com
                            status:
                              - ok
                            name_servers:
                              - ns1.***.com
                              - ns2.***.com
                            created_date: 2022-01-01T00:00:00Z
                            updated_date: 2024-01-01T00:00:00Z
                            expiration_date: 2026-01-01T00:00:00Z
                          registrar:
                            id: 9999
                            name: "*** Registrar LLC"
                            phone: +86.1*********
                            email: redacted@***.com
                          registrant:
                            id: Not Available From Registry
                            name: REDACTED FOR PRIVACY
                            organization: REDACTED FOR PRIVACY
                            country: CN
                    description: >-
                      ### JSON格式响应

                      当 `format=json` 时，`whois` 字段返回结构化的JSON对象。


                      > [!NOTE]

                      > **注意**：返回的具体字段可能因域名注册局和隐私保护设置而异。某些敏感信息可能会被部分隐藏或标记为
                      `REDACTED FOR PRIVACY`。
        "400":
          description: 请求参数无效。请检查 `domain` 参数是否提供且格式正确。
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: INVALID_ARGUMENT
                  details:
                    type: object
                  message:
                    type: string
                    example: Missing or invalid 'domain' parameter.
        "404":
          description: 查询失败或域名不存在。
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: NOT_FOUND
                  details:
                    type: object
                  message:
                    type: string
                    example: WHOIS information not found for the domain.
      x-search-words:
        - whois
        - 域名信息
        - 注册信息
        - 所有者
        - 到期时间
        - registrar
        - domain info
        - 过期
        - 注册商
  /network/wxdomain:
    get:
      tags:
        - Network
      summary: 检查域名在微信中的访问状态
      description: |-
        准备在微信里推广你的网站？最好先检查一下域名是否被“拉黑”了。

        ## 功能概述
        这个接口可以帮你查询一个域名在微信内置浏览器中的访问状态，即是否被微信封禁。这对于做微信生态推广和营销的开发者来说至关重要。
      operationId: get-network-wxdomain
      parameters:
        - name: domain
          in: query
          required: true
          description: 需要查询的域名。
          schema:
            type: string
            example: qq.com
          x-tooltip: "例如: qq.com"
      responses:
        "200":
          description: 查询成功！返回该域名在微信中的状态。
          content:
            application/json:
              schema:
                type: object
                properties:
                  domain:
                    type: string
                    example: qq.com
                  title:
                    type: string
                    description: 状态标题
                    example: 该网站可以正常访问
                  type:
                    type: string
                    description: 状态类型
                    example: "1"
        "400":
          description: 请求参数无效。
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: INVALID_ARGUMENT
                  details:
                    type: object
                  message:
                    type: string
                    example: Missing or invalid 'domain' parameter.
        "502":
          description: 查询上游接口失败。
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: UPSTREAM_ERROR
                  details:
                    type: object
                  message:
                    type: string
                    example: Failed to query upstream service for WeChat domain status.
      x-search-words:
        - 微信
        - wechat
        - 域名检测
        - 封禁
        - 拦截
        - 红名
        - wx
        - 黑名单
        - 屏蔽
  /saying:
    get:
      tags:
        - Poem
      summary: 一言
      description: |-
        想在你的应用里每天展示一句不一样的话，给用户一点小小的惊喜吗？这个“一言”接口就是为此而生。

        ## 功能概述
        每次调用，它都会从我们精心收集的、包含数千条诗词、动漫台词、名人名言的语料库中，随机返回一条。你可以用它来做网站首页的Slogan、应用的启动语，或者任何需要灵感点缀的地方。
      operationId: get-saying
      parameters: []
      responses:
        "200":
          description: 请求成功！返回一条随机的语录。
          content:
            application/json:
              schema:
                type: object
                properties:
                  text:
                    type: string
                    description: 随机获取到的名言或诗词内容。
                    example: 无论多么微小的邂逅，都必定有着某种意义。
        "500":
          description: 当语料库为空或无法读取时。
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: INTERNAL_SERVER_ERROR
                  details:
                    type: object
                  message:
                    type: string
                    example: Could not retrieve a saying from the corpus.
      x-search-words:
        - 一言
        - hitokoto
        - 名言
        - 语录
        - 诗词
        - 句子
        - 文案
        - 随机一句话
        - 鸡汤
        - 毒鸡汤
  /random/image:
    get:
      tags:
        - Random
      summary: 随机图片
      description: >
        需要一张随机图片作为占位符或者背景吗？这个接口是你的不二之选。


        ## 功能概述

        这是一个非常简单的接口，它会从我们庞大的图库和精选外部图床中随机挑选一张图片，然后通过 302
        重定向让你直接访问到它。这使得它可以非常方便地直接用在 HTML 的 `<img>` 标签中。


        你可以通过 `/api/v1/random/image?category=acg&type=4k`
        这样的请求获取由UapiPro服务器提供的图片，也可以通过 `/api/v1/random/image?category=ai_drawing`
        获取由外部图床精选的图片。


        如果你不提供任何 category
        参数，程序会从所有图片（包括本地的和URL的）中随机抽取一张（**全局随机图片不包含ikun和AI绘画**）。


        > [!TIP]

        > 如果你需要更精确地控制图片类型，请使用 `/image/random/{category}/{type}` 接口。


        ### 支持的主类别与子类别

        - **acg**（二次元动漫）
            - pc
            - mb
        - **外部图床精选/混合动漫**
          - **landscape**: 风景图。
          - **anime**: 混合了UapiPro服务器的acg和外部图床的general_anime分类下的图片。
          - **pc_wallpaper**: 电脑壁纸。
          - **mobile_wallpaper**: 手机壁纸。
          - **general_anime**: 动漫图。
          - **ai_drawing**: AI绘画。
        - **其他分类**
          - **bq**（表情包/趣图）
            - eciyuan
            - ikun
            - xiongmao
            - waiguoren
            - maomao
          - **furry**（福瑞）
            - z4k
            - szs8k
            - s4k
            - 4k

        > [!NOTE]

        > 默认全局随机（未指定category参数）时，不会包含ikun和AI绘画（ai_drawing）类别的图片。
      operationId: get-random-image
      parameters:
        - name: category
          in: query
          required: false
          description: |
            （可选）指定图片主类别。

            **支持的主类别：**
            - `acg`（二次元动漫，UapiPro服务器）
            - `landscape`（风景图，外部图床）
            - `anime`（混合动漫）
            - `pc_wallpaper`（电脑壁纸，外部图床）
            - `mobile_wallpaper`（手机壁纸，外部图床）
            - `general_anime`（动漫图，外部图床）
            - `ai_drawing`（AI绘画，外部图床）
            - `bq`（表情包/趣图，UapiPro服务器）
            - `furry`（福瑞，UapiPro服务器）

            > [!TIP]
            > 如果不指定，将从所有图片中随机抽取（不包含 `ikun` 和 `ai_drawing`）。
          schema:
            type: string
            enum:
              - acg
              - landscape
              - anime
              - pc_wallpaper
              - mobile_wallpaper
              - general_anime
              - ai_drawing
              - bq
              - furry
            example: acg
            x-enumLabels:
              acg: 二次元
              landscape: 风景图
              anime: 混合动漫
              pc_wallpaper: 电脑壁纸
              mobile_wallpaper: 手机壁纸
              general_anime: 动漫图
              ai_drawing: AI绘画
              bq: 表情包
              furry: 福瑞
          x-tooltip: 可选，如 `furry`、`ai_drawing` 或 `anime`，可筛选图片主类别。
        - name: type
          in: query
          required: false
          description: |
            （可选，仅UapiPro服务器图片支持）指定图片子类别。

            - **bq**: `xiongmao`, `waiguoren`, `maomao`, `ikun`, `eciyuan`
            - **acg**: `pc`, `mb`
            - **furry**: `z4k`, `szs8k`, `s4k`, `4k`

            > [!TIP]
            > 外部图床类别和 `anime` 混合类别不支持 `type` 参数。
          schema:
            type: string
            enum:
              - pc
              - mb
              - eciyuan
              - ikun
              - 4k
              - s4k
              - z4k
              - szs8k
              - xiongmao
              - maomao
              - waiguoren
            example: pc
            x-enumLabels:
              pc: 电脑
              mb: 手机
              eciyuan: 二次元
              ikun: iKun
              4k: 4K
              s4k: 横屏4K
              z4k: 竖屏4K
              szs8k: 竖屏8K
              xiongmao: 熊猫
              maomao: 猫猫
              waiguoren: 外国人
          x-tooltip: 可选，如 `z4k`，进一步筛选UapiPro服务器图片子类别。
      responses:
        "200":
          description: 成功！将随机图片以图片二进制 (image/jpeg) 直接返回给客户端，可直接在 <img> 标签中使用。
          content:
            image/jpeg:
              schema:
                type: string
                format: binary
        "404":
          description: 未找到指定类别的图片。
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: NOT_FOUND
                  message:
                    type: string
                    example: 未找到指定类别的图片。
        "500":
          description: 服务器内部错误。
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: INTERNAL_SERVER_ERROR
                  message:
                    type: string
                    example: 选择随机图片时发生错误。
      x-search-words:
        - 随机二次元图片api
        - 随机图片api
        - 二次元图片
        - 随机动漫图片
        - acg图片
        - 动漫壁纸
        - 二次元壁纸
        - 随机壁纸
        - 免费图片api
        - 图片接口
        - 随机图
        - 动漫api
        - 二次元api
        - 壁纸api
        - 风景图片
        - ai绘画
        - furry
        - 福瑞
        - 表情包
        - 网站背景
        - 机器人图片
        - 直接出图
        - 302重定向
        - 高清壁纸
        - 免费接口
      x-seo-optimized-text: 完全免费的随机二次元图片API！无需注册，直接调用即可获取高清动漫壁纸。支持二次元ACG、风景壁纸、AI绘画、表情包等10+分类，302直接重定向到图片URL。每日更新图库，已收录10万+高质量图片。适用于网站背景、QQ机器人、小程序、APP开发等场景。
      x-seo-keywords:
        - 随机二次元图片api
        - 免费随机图片API
        - 二次元图片API接口
        - 随机动漫壁纸api
        - ACG图片API
        - 随机背景图API
        - 免费图片接口
        - 动漫图片api
        - 随机壁纸服务
        - 图片素材API
        - 二次元随机图
        - 随机图片生成器
        - 无需注册图片API
        - 高清壁纸API
      x-seo-title: 【免费】随机二次元图片API - 10万+高清动漫壁纸 | 无需注册
      x-seo-usage-scenarios: 适用于网站随机背景、QQ机器人调用、应用启动页、博客配图、聊天机器人、社交分享、UI原型、游戏素材、测试图片、开发调试、个人网站装饰、微信小程序背景等场景
      x-seo-related-apis:
        - 必应壁纸
        - 图片处理
        - 图片上传
        - 素材服务
      x-faq:
        - question: 如何获取随机二次元图片？
          answer: 直接访问 https://uapis.cn/api/v1/random/image?category=acg
            即可获取随机二次元图片。接口通过302重定向直接返回图片URL。
        - question: 支持哪些图片分类？
          answer: 支持二次元动漫(acg)、风景图(landscape)、AI绘画(ai_drawing)、表情包(bq)、福瑞(furry)等多种分类。
        - question: 如何在网页中使用？
          answer: 可以直接在 <img> 标签的 src 属性中使用API地址，例如：<img
            src='https://uapis.cn/api/v1/random/image?category=acg' />
        - question: 这个服务是否免费？
          answer: 是的，这个API完全免费，无使用限制，适合个人和商业项目使用。
        - question: 图片是否会重复？
          answer: 图片是从庞大的图库中随机选择，重复的概率很低。不同分类有不同的图片数量。
      x-jsonld:
        "@context": https://schema.org
        "@type": TechnicalArticle
        headline: 随机二次元图片API接口 - 免费高清动漫壁纸服务
        description: 免费随机二次元图片API接口，提供高质量随机图片服务。支持二次元动漫、风景壁纸、AI绘画、表情包等多种分类。快速稳定的随机图片API，适用于网站背景、机器人调用、应用开发等场景。
        author:
          "@type": Organization
          name: UAPI
          url: https://uapis.cn
        publisher:
          "@type": Organization
          name: UAPI
          url: https://uapis.cn
        datePublished: 2024-01-01
        dateModified: 2024-12-01
        mainEntity:
          "@type": SoftwareApplication
          name: 随机二次元图片API
          applicationCategory: WebAPI
          operatingSystem: All
          url: https://uapis.cn/api/v1/random/image
          offers:
            "@type": Offer
            price: "0"
            priceCurrency: CNY
        about:
          - "@type": Thing
            name: API端点
            description: 主要API端点：https://uapis.cn/api/v1/random/image
          - "@type": Thing
            name: 支持参数
            description: "category:
              指定图片分类（furry、bq、acg、ai_drawing、general_anime、landscape等）; type:
              指定子类别（4k、pc、mb等）"
          - "@type": Thing
            name: 响应格式
            description: 通过302重定向直接返回图片URL，可直接在<img>标签中使用
          - "@type": Thing
            name: 使用示例
            description: 获取4K二次元图片：https://uapis.cn/api/v1/random/image?category=acg&type=4k
          - "@type": Thing
            name: 支持分类
            description: 二次元动漫(acg)、风景图(landscape)、AI绘画(ai_drawing)、表情包(bq)、福瑞(furry)、手机壁纸(mobile_wallpaper)、电脑壁纸(pc_wallpaper)
          - "@type": Thing
            name: 实际应用
            description: 网站随机背景、QQ机器人调用、应用启动页、博客配图、聊天机器人、个人网站装饰、微信小程序背景
        mentions:
          - "@type": WebAPI
            name: 随机二次元图片API
            url: https://uapis.cn/api/v1/random/image
  /random/string:
    get:
      tags:
        - Random
      summary: 随机字符串
      description: |-
        无论是需要生成一个安全的随机密码、一个唯一的Token，还是一个简单的随机ID，这个接口都能满足你。

        ## 功能概述
        你可以精确地控制生成字符串的长度和字符集类型，非常灵活。

        ## 使用须知

        > [!TIP]
        > **字符集类型 `type` 详解**
        > 你可以通过 `type` 参数精确控制生成的字符集：
        > - **`numeric`**: 纯数字 (0-9)
        > - **`lower`**: 纯小写字母 (a-z)
        > - **`upper`**: 纯大写字母 (A-Z)
        > - **`alpha`**: 大小写字母 (a-zA-Z)
        > - **`alphanumeric`** (默认): 数字和大小写字母 (0-9a-zA-Z)
        > - **`hex`**: 十六进制字符 (0-9a-f)
      operationId: get-random-string
      parameters:
        - name: length
          in: query
          required: false
          description: 你希望生成的字符串的长度。有效范围是 1 到 1024。
          schema:
            type: integer
            default: 16
            example: 32
          x-tooltip: 默认为16，最大1024。
        - name: type
          in: query
          required: false
          description: 指定构成字符串的字符类型。
          schema:
            type: string
            default: alphanumeric
            enum:
              - numeric
              - lower
              - upper
              - alpha
              - alphanumeric
              - hex
            example: alphanumeric
            x-enumLabels:
              numeric: 纯数字
              lower: 小写字母
              upper: 大写字母
              alpha: 大小写字母
              alphanumeric: 字母+数字
              hex: 十六进制
          x-tooltip: 默认为'alphanumeric' (数字+字母)。
      responses:
        "200":
          description: 生成成功！
          content:
            application/json:
              schema:
                type: object
                properties:
                  text:
                    type: string
                    example: aK3fP7bQ9zRjT1vN
        "400":
          description: 无效的请求参数。
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: INVALID_ARGUMENT
                  details:
                    type: object
                  message:
                    type: string
                    example: Invalid parameter, e.g., length out of range [1, 1024].
        "500":
          description: 服务器内部错误。
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: INTERNAL_SERVER_ERROR
                  details:
                    type: object
                  message:
                    type: string
                    example: Failed to generate random string.
      x-search-words:
        - 随机字符串
        - 密码生成
        - token
        - 随机id
        - random string
        - password
        - generator
        - key
        - 密钥
  /answerbook/ask:
    get:
      tags:
        - Random
      summary: 答案之书
      description: |-
        想要获得人生问题的神秘答案吗？答案之书API提供了一个神奇8球风格的问答服务，你可以提问并获得随机的神秘答案。

        ## 功能概述
        通过向答案之书提问，你将获得一个充满智慧（或许）的随机答案。这个API支持通过查询参数或POST请求体两种方式提问。

        ## 使用须知

        > [!TIP]
        > **提问技巧**
        > - 提出明确的问题会获得更好的体验
        > - 问题不能为空
        > - 支持中文问题
        > - 答案具有随机性，仅供娱乐参考
      operationId: get-answerbook-ask
      parameters:
        - name: question
          in: query
          required: true
          description: 你想要提问的问题。问题不能为空。
          schema:
            type: string
            example: 我今天会有好运吗？
          x-tooltip: 必填，如："我今天会有好运吗？"、"我应该接受这份工作吗？"
      responses:
        "200":
          description: 成功获取答案。
          content:
            application/json:
              schema:
                type: object
                properties:
                  question:
                    type: string
                    example: 我今天会有好运吗？
                  answer:
                    type: string
                    example: 一切都会好起来
        "400":
          description: 请求参数无效。
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    example: 400
                  message:
                    type: string
                    example: 问题不能为空
        "500":
          description: 服务器内部错误。
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    example: 500
                  message:
                    type: string
                    example: Internal Server Error
      x-search-words:
        - 答案之书
        - 神奇8球
        - 占卜
        - 预测
        - 问答
        - 神秘答案
        - fortune
        - magic 8 ball
        - oracle
        - divination
    post:
      tags:
        - Random
      summary: 答案之书 (POST)
      description: |-
        通过POST请求向答案之书提问并获得神秘答案。

        ## 功能概述
        与GET方式相同，但通过JSON请求体发送问题，适合在需要发送较长问题或希望避免URL编码问题的场景中使用。

        ## 请求体格式
        请求体必须是有效的JSON格式，包含question字段。
      operationId: post-answerbook-ask
      parameters: []
      responses:
        "200":
          description: 成功获取答案。
          content:
            application/json:
              schema:
                type: object
                properties:
                  question:
                    type: string
                    example: 我应该接受这份工作吗？
                  answer:
                    type: string
                    example: 专注当下
        "400":
          description: 请求参数无效。
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    example: 400
                  message:
                    type: string
                    example: 问题不能为空
        "500":
          description: 服务器内部错误。
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    example: 500
                  message:
                    type: string
                    example: Internal Server Error
      requestBody:
        description: 包含问题的JSON对象
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                question:
                  type: string
                  description: 你想要提问的问题
                  example: 我应该接受这份工作吗？
              required:
                - question
      x-search-words:
        - 答案之书
        - 神奇8球
        - 占卜
        - 预测
        - 问答
        - 神秘答案
        - fortune
        - magic 8 ball
        - oracle
        - divination
        - post请求
  /social/bilibili/userinfo:
    get:
      tags:
        - Social
      summary: 查询 B站用户
      description: |-
        想在你的应用里集成B站用户资料展示？这个接口可以轻松获取用户的公开信息。

        ## 功能概述
        通过一个用户的UID（那一串纯数字ID），你可以查询到该用户的昵称、性别、头像、等级、签名等一系列公开的基本信息。
      operationId: get-social-bilibili-userinfo
      parameters:
        - name: uid
          in: query
          required: true
          description: Bilibili用户的UID
          schema:
            type: string
            example: "483307278"
          x-tooltip: "例如: 483307278 (shuakami的UID)"
      responses:
        "200":
          description: 查询成功！返回用户的详细信息。请注意，我们直接透传了B站官方API的返回结构。
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    example: 0
                  data:
                    type: object
                    properties:
                      face:
                        type: string
                        example: http://i0.hdslb.com/bfs/face/....jpg
                      level:
                        type: integer
                        example: 6
                      mid:
                        type: integer
                        example: 2
                      name:
                        type: string
                        example: bishi
                      sex:
                        type: string
                        example: 保密
                      sign:
                        type: string
                        example: 嗶哩嗶哩 - ( ゜- ゜)つロ 乾杯~
                  message:
                    type: string
                    example: "0"
        "400":
          description: 缺少uid参数
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: INVALID_ARGUMENT
                  details:
                    type: object
                  message:
                    type: string
                    example: Missing 'uid' parameter.
        "404":
          description: Bilibili用户不存在
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: NOT_FOUND
                  details:
                    type: object
                  message:
                    type: string
                    example: Bilibili user not found.
        "502":
          description: 上游Bilibili API错误或风控
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: UPSTREAM_ERROR
                  details:
                    type: object
                  message:
                    type: string
                    example: Failed to fetch data from Bilibili API or request was blocked.
      x-search-words:
        - bilibili
        - b站
        - 哔哩哔哩
        - 用户信息
        - uid查询
        - up主信息
        - 头像
        - 等级
        - 签名
      x-seo-optimized-text: 免费Bilibili用户信息查询API，通过UID获取B站UP主完整资料。支持头像、昵称、等级、签名、粉丝数等数据查询。无需登录，即调即用，稳定可靠。适用于数据分析、用户展示、粉丝统计等场景。
      x-seo-keywords:
        - 免费Bilibili API
        - B站用户信息查询
        - UP主资料API
        - B站数据接口
        - 哔哩哔哩API
        - B站UID查询
        - B站粉丝数据
        - 免费B站API
        - UP主信息获取
      x-seo-title: 【免费】B站用户信息查询API - UP主资料一键获取
      x-seo-usage-scenarios: 适用于数据分析平台、UP主管理工具、粉丝统计系统、视频推荐算法、用户画像分析、社交媒体监控、内容创作工具等场景
      x-seo-related-apis:
        - Bilibili视频信息
        - Bilibili评论获取
        - 直播间信息查询
        - 视频数据API
  /social/qq/userinfo:
    get:
      tags:
        - Social
      summary: 查询 QQ 信息
      description: |-
        这是一个功能丰富的QQ用户信息查询接口，能够获取QQ用户的详细公开信息。

        > [!VIP]
        > 我们在近日优化了此接口，速度应该会更加快了。 

        ## 功能概述
        通过QQ号查询用户的详细信息，包括基础资料、等级信息、VIP状态等。返回的信息丰富全面，适合用于用户画像分析、社交应用集成等场景。

        ## 数据字段说明
        - **基础信息**: 昵称、个性签名、头像、年龄、性别
        - **联系信息**: QQ邮箱、个性域名(QID)
        - **等级信息**: QQ等级、VIP状态和等级
        - **时间信息**: 注册时间、最后更新时间
      operationId: get-social-qq-userinfo
      parameters:
        - name: qq
          in: query
          required: true
          description: 需要查询的QQ号
          schema:
            type: string
            example: "10001"
          x-tooltip: 纯数字的QQ号。
      responses:
        "200":
          description: 成功响应，返回QQ用户的详细信息
          content:
            application/json:
              schema:
                type: object
                properties:
                  qq:
                    type: string
                    description: QQ号
                    example: "12519212"
                  nickname:
                    type: string
                    description: 用户昵称
                    example: 小明
                  long_nick:
                    type: string
                    description: 个性签名
                    example: 今天天气真不错
                  avatar_url:
                    type: string
                    description: 头像URL
                    example: http://q.qlogo.cn/g?b=qq&nk=12519212&s=640
                  age:
                    type: integer
                    description: 年龄
                    example: 25
                  sex:
                    type: string
                    description: 性别
                    example: 男
                  qid:
                    type: string
                    description: QQ个性域名
                    example: xiaoming2024
                  qq_level:
                    type: integer
                    description: QQ等级
                    example: 64
                  location:
                    type: string
                    description: 地理位置（省市）
                    example: 广东 深圳
                  email:
                    type: string
                    description: QQ邮箱
                    example: 12519212@qq.com
                  is_vip:
                    type: boolean
                    description: 是否为VIP用户
                    example: true
                  vip_level:
                    type: integer
                    description: VIP等级
                    example: 7
                  reg_time:
                    type: string
                    description: 注册时间（ISO 8601格式）
                    example: 2008-03-15T10:30:00Z
                  last_updated:
                    type: string
                    description: 最后更新时间（ISO 8601格式）
                    example: 2024-08-14T15:45:30Z
        "400":
          description: 缺少或无效的qq参数
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: INVALID_ARGUMENT
                  details:
                    type: object
                  message:
                    type: string
                    example: Missing or invalid 'qq' parameter.
        "404":
          description: 获取QQ用户信息失败或用户不存在
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: NOT_FOUND
                  details:
                    type: object
                  message:
                    type: string
                    example: Failed to retrieve QQ user info, user may not exist.
      x-search-words:
        - qq
        - 查询
        - 用户信息
        - 昵称
        - 头像
        - QQ头像
        - tencent
        - 腾讯
        - qlogo
        - 年龄
        - 性别
        - 等级
        - vip
        - 注册时间
      x-seo-optimized-text: 独家稳定可用的免费QQ头像API接口，快速获取QQ号用户头像、昵称、等级、VIP状态等完整信息。支持高清头像获取，无需登录即可调用。适用于社交应用、用户系统、头像展示等场景。
      x-seo-keywords:
        - 免费QQ头像API
        - QQ昵称查询接口
        - QQ用户信息API
        - 高清QQ头像获取
        - QQ等级查询
        - QQ号查询服务
        - 免费API接口
        - QQ资料API
        - 腾讯QQ接口
      x-seo-title: QQ用户信息查询API - 头像/昵称/等级一键获取
      x-seo-usage-scenarios: 适用于社交应用用户展示、网站用户系统、聊天应用头像显示、用户资料页面、论坛用户信息、博客评论系统、会员管理系统等场景
      x-seo-related-apis:
        - Bilibili用户信息查询
        - QQ群信息查询
        - 用户资料API
        - 社交平台接口
  /social/bilibili/archives:
    get:
      tags:
        - Social
      summary: 查询 B站投稿
      description: >-
        想要获取UP主的所有投稿视频？或者想在你的应用里展示创作者的作品集？这个接口能帮你轻松实现。


        ## 功能概述

        通过用户的
        `mid`（用户ID），你可以获取该UP主的投稿视频列表。接口支持关键词搜索、分页加载和多种排序方式，让你能够灵活地展示和分析创作者的内容。


        ## 参数说明

        - **`mid` (用户ID)**: B站用户的mid，必填参数。

        - **`keywords` (搜索关键词)**: 可选，用于在该UP主的投稿中搜索特定关键词。

        - **`orderby` (排序方式)**: 
          - `pubdate`: 按最新发布排序（默认）
          - `views`: 按最多播放排序
        - **`ps` (每页条数)**: 默认20条。

        - **`pn` (页码)**: 默认1，用于分页。


        ## 响应体字段说明

        - **`total` (总稿件数)**: UP主的投稿总数。

        - **`page` (当前页码)**: 当前返回的页码。

        - **`size` (每页数量)**: 每页返回的视频数量。

        - **`videos` (视频列表)**: 包含当前页的所有视频信息：
          - `aid`: 视频的AV号
          - `bvid`: 视频的BV号
          - `title`: 视频标题
          - `cover`: 封面URL
          - `duration`: 时长（秒）
          - `play_count`: 播放量
          - `publish_time`: 发布时间戳
          - `create_time`: 创建时间戳
          - `state`: 视频状态
          - `is_ugc_pay`: 是否付费视频（0=免费，1=付费）
          - `is_interactive`: 是否为互动视频
      operationId: get-social-bilibili-archives
      parameters:
        - name: mid
          in: query
          required: true
          description: B站用户的mid（用户ID）
          schema:
            type: string
            example: "483307278"
          x-tooltip: "例如: 483307278 (shuakami的UID)"
        - name: keywords
          in: query
          required: false
          description: 搜索关键词，可为空
          schema:
            type: string
        - name: orderby
          in: query
          required: false
          description: 排序方式。`pubdate`=最新发布，`views`=最多播放
          schema:
            type: string
            example: pubdate
        - name: ps
          in: query
          required: false
          description: 每页条数，默认20
          schema:
            type: string
            example: "20"
        - name: pn
          in: query
          required: false
          description: 页码，默认1
          schema:
            type: string
            example: "1"
      responses:
        "200":
          description: 成功！返回用户的投稿视频列表。
          content:
            application/json:
              schema:
                type: object
                properties:
                  total:
                    type: integer
                    description: 总稿件数
                    example: 26
                  page:
                    type: integer
                    description: 当前页码
                    example: 1
                  size:
                    type: integer
                    description: 每页数量
                    example: 20
                  videos:
                    type: array
                    description: 视频列表
                    items:
                      type: object
                      properties:
                        aid:
                          type: integer
                          description: 视频AID
                          example: 115212162177124
                        bvid:
                          type: string
                          description: BV号
                          example: BV1JSpkzbEm6
                        title:
                          type: string
                          description: 标题
                          example: THE FINALS - 2025-09-16 12-41-39
                        cover:
                          type: string
                          description: 封面URL
                          example: http://i0.hdslb.com/bfs/archive/0c8098c4736ce8ab4572fbe54b8d89b09f9e24e2.jpg
                        duration:
                          type: integer
                          description: 时长(秒)
                          example: 468
                        play_count:
                          type: integer
                          description: 播放量
                          example: 210
                        publish_time:
                          type: integer
                          description: 发布时间戳
                          example: 1757999542
                        create_time:
                          type: integer
                          description: 创建时间戳
                          example: 1757999542
                        state:
                          type: integer
                          description: 视频状态
                          example: 0
                        is_ugc_pay:
                          type: integer
                          description: 是否付费视频。0=免费，1=付费
                          example: 0
                        is_interactive:
                          type: boolean
                          description: 是否为互动视频
                          example: false
        "400":
          description: 参数错误
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: INVALID_ARGUMENT
                  details:
                    type: object
                  message:
                    type: string
                    example: Missing 'mid' parameter.
        "404":
          description: 用户不存在
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: NOT_FOUND
                  details:
                    type: object
                  message:
                    type: string
                    example: User not found.
        "500":
          description: 服务器错误
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: INTERNAL_SERVER_ERROR
                  details:
                    type: object
                  message:
                    type: string
                    example: Server error.
      x-search-words:
        - bilibili
        - b站
        - 哔哩哔哩
        - 投稿
        - 视频列表
        - archives
        - up主作品
        - 稿件
        - 作品集
        - 视频数据
      x-seo-optimized-text: 免费Bilibili用户投稿查询API，B站UP主视频列表获取接口。支持关键词搜索、分页加载、多种排序方式，获取视频标题、封面、播放量等完整信息。高效稳定的B站投稿数据API服务，适用于UP主作品集展示、视频数据分析、内容推荐等场景。
      x-seo-keywords:
        - 免费Bilibili API
        - B站投稿查询
        - UP主视频列表
        - B站作品集API
        - 视频数据接口
        - 创作者内容API
        - B站数据分析
        - 免费API服务
      x-seo-title: 免费Bilibili用户投稿查询API - B站UP主视频列表获取接口
      x-seo-usage-scenarios: 适用于UP主作品集展示、视频数据分析工具、内容推荐系统、创作者管理平台、粉丝应援站、视频聚合网站、数据统计仪表板等场景
      x-seo-related-apis:
        - Bilibili用户信息查询
        - Bilibili视频详情
        - 直播间信息查询
        - 视频评论获取
  /social/bilibili/videoinfo:
    get:
      tags:
        - Social
      summary: 查询 B站视频
      description: |-
        想在你的应用里展示B站视频的详细信息吗？无论是封面、标题，还是播放量、UP主信息，这个接口都能一网打尽。

        ## 功能概述
        通过提供视频的 `aid` 或 `bvid`，你可以获取到该视频的完整元数据，包括多P信息、UP主资料、数据统计等。

        ## 响应体字段说明
        - **`copyright` (视频类型)**: `1` 代表原创，`2` 代表转载。
        - **`owner` (UP主信息)**: 包含 `mid`, `name`, `face` 等UP主的基本资料。
        - **`stat` (数据统计)**: 包含了播放、弹幕、评论、点赞、投币、收藏、分享等核心数据。
        - **`pages` (分P列表)**: 这是一个数组，包含了视频的每一个分P的信息，即使是单P视频也会有一个元素。
      operationId: get-social-bilibili-videoinfo
      parameters:
        - name: aid
          in: query
          required: false
          description: 视频的AV号 (aid)，纯数字格式。`aid`和`bvid`任选其一即可。
          schema:
            type: string
            example: "75836761"
        - name: bvid
          in: query
          required: false
          description: 视频的BV号 (bvid)，例如 `BV117411r7R1`。`aid`和`bvid`任选其一即可。
          schema:
            type: string
            example: BV17x411w79F
          x-tooltip: "一个经典的例子: BV17x411w79F (Rick Astley - Never Gonna Give You Up)"
      responses:
        "200":
          description: 成功！返回Bilibili视频的详细信息。
          content:
            application/json:
              schema:
                type: object
                properties:
                  bvid:
                    type: string
                    description: 稿件的BV号。
                    example: BV17x411w79F
                  aid:
                    type: number
                    description: 稿件的AV号。
                    example: 75836761
                  videos:
                    type: number
                    description: 稿件分P总数。如果是单P视频，则为1。
                    example: 1
                  tname:
                    type: string
                    description: 视频所属的子分区名称。
                    example: Vocaloid·UTAU
                  copyright:
                    type: number
                    description: 视频类型。1代表原创，2代表转载。
                    example: 2
                  pic:
                    type: string
                    description: 稿件封面图片的URL。这是一个可以直接在网页上展示的链接。
                    example: http://i2.hdslb.com/bfs/archive/f769f330138980456159345c6139c8e9b265c2f5.jpg
                  title:
                    type: string
                    description: 稿件的标题。
                    example: 【官方MV】Rick Astley - Never Gonna Give You Up
                  pubdate:
                    type: number
                    description: 稿件发布时间的Unix时间戳（秒）。
                    example: 1573884313
                  ctime:
                    type: number
                    description: 用户投稿时间的Unix时间戳（秒）。
                    example: 1573884313
                  desc:
                    type: string
                    description: 视频简介。可能会包含HTML换行符。
                    example: 你被骗了
                  duration:
                    type: number
                    description: 稿件总时长（所有分P累加），单位为秒。
                    example: 213
                  owner:
                    type: object
                    description: 视频UP主信息。
                    properties:
                      mid:
                        type: number
                        description: UP主的UID。
                        example: 2
                      name:
                        type: string
                        description: UP主昵称。
                        example: bishi
                      face:
                        type: string
                        description: UP主头像的URL。
                        example: http://i2.hdslb.com/bfs/face/b0b721e6cb13e31af88cc45c432d6728c3065a6e.jpg
                  stat:
                    type: object
                    description: 视频的核心数据统计。
                    properties:
                      view:
                        type: number
                        description: 播放数。
                        example: 14227982
                      danmaku:
                        type: number
                        description: 弹幕数。
                        example: 269829
                      reply:
                        type: number
                        description: 评论数。
                        example: 81682
                      favorite:
                        type: number
                        description: 收藏数。
                        example: 498308
                      coin:
                        type: number
                        description: 投币数。
                        example: 787228
                      share:
                        type: number
                        description: 分享数。
                        example: 98661
                      like:
                        type: number
                        description: 获赞数。
                        example: 989718
                  pages:
                    type: array
                    description: 视频分P列表。即使是单P视频，该数组也包含一个元素。
                    items:
                      type: object
                      properties:
                        cid:
                          type: number
                          description: 分P的唯一标识CID，用于获取弹幕等。
                          example: 130283995
                        page:
                          type: number
                          description: 分P的序号，从1开始。
                          example: 1
                        part:
                          type: string
                          description: 分P的标题。对于单P视频，通常是视频主标题。
                          example: 【官方MV】Rick Astley - Never Gonna Give You Up
                        duration:
                          type: number
                          description: 该分P的持续时间，单位为秒。
                          example: 213
      x-search-words:
        - bilibili
        - b站
        - 视频信息
        - av号
        - bv号
        - videoinfo
        - 封面
        - up主
        - 播放量
      x-seo-optimized-text: 免费Bilibili视频信息查询API，B站视频详情获取接口。支持AV号、BV号查询，获取视频封面、标题、播放量、UP主信息等。高效稳定的B站视频数据API服务。
      x-seo-keywords:
        - 免费Bilibili视频API
        - B站视频信息查询
        - AV号BV号转换
        - 视频封面获取
        - 播放量查询
        - UP主信息API
        - B站数据接口
      x-seo-title: 免费Bilibili视频信息查询API - B站视频详情获取接口
      x-seo-usage-scenarios: 适用于视频数据分析、内容聚合平台、视频推荐系统、数据统计工具、创作者分析、视频信息展示等场景
      x-seo-related-apis:
        - Bilibili用户信息
        - Bilibili评论获取
        - Bilibili投稿查询
        - 视频数据API
  /social/bilibili/replies:
    get:
      tags:
        - Social
      summary: 查询 B站评论
      description: |-
        想要分析B站视频的评论区？这个接口可以帮你轻松获取评论数据，包括热门评论和最新评论，还支持分页加载。

        ## 功能概述
        通过视频的 `oid`（通常就是视频的`aid`），你可以分页获取该视频的评论区内容。你可以指定排序方式和分页参数，来精确地获取你需要的数据。

        ## 参数说明
        - **`sort` (排序方式)**
          - `0` 或 `time`：按时间排序
          - `1` 或 `like`：按点赞排序
          - `2` 或 `reply`：按回复数排序
          - `3` 或 `hot`（也支持 `hottest`、`最热`）：按最热排序

        ## 响应体字段说明
        - **`hots` (热门评论)**: 仅在请求第一页时，可能会返回热门评论列表。其结构与 `replies` 中的对象一致。
        - **`replies` (评论列表)**: 这是一个数组，包含了当前页的评论。其中：
          - `root`: 指向根评论的ID。如果评论本身就是根评论，则为 `0`。
          - `parent`: 指向该条回复所回复的上一级评论ID。如果评论是根评论，则为 `0`。
      operationId: get-social-bilibili-replies
      parameters:
        - name: oid
          in: query
          required: true
          description: 目标评论区的ID。对于视频，这通常就是它的 `aid`。
          schema:
            type: string
            example: "1706416465"
        - name: sort
          in: query
          required: false
          description: 排序方式。支持
            `0/time`（按时间）、`1/like`（按点赞）、`2/reply`（按回复数）、`3/hot/hottest/最热`（按最热）。默认为
            `0/time`。
          schema:
            type: string
            enum:
              - "0"
              - time
              - "1"
              - like
              - "2"
              - reply
              - "3"
              - hot
              - hottest
              - 最热
            example: hot
            x-enumLabels:
              "0": 按时间
              "1": 按点赞
              "2": 按回复数
              "3": 按最热
              time: 按时间
              like: 按点赞
              reply: 按回复数
              hot: 按最热
              hottest: 按最热
              最热: 按最热
          x-tooltip: 推荐使用 hot 查看最热评论。
        - name: ps
          in: query
          required: false
          description: 每页获取的评论数量，范围是1到20。默认为 `20`。
          schema:
            type: string
            example: "5"
        - name: pn
          in: query
          required: false
          description: 要获取的页码，从1开始。默认为 `1`。
          schema:
            type: string
            example: "1"
      responses:
        "200":
          description: 成功！返回指定分页和排序的评论列表。
          content:
            application/json:
              schema:
                type: object
                properties:
                  page:
                    type: object
                    description: 分页信息概览。
                    properties:
                      num:
                        type: number
                        description: 当前所在的页码。
                        example: 1
                      size:
                        type: number
                        description: 每页的项数。
                        example: 5
                      count:
                        type: number
                        description: 根评论（即直接评论视频的评论）的总数。
                        example: 81682
                      acount:
                        type: number
                        description: 评论区总评论数，包含了所有的楼中楼回复。
                        example: 123456
                  hots:
                    type: array
                    description: 热门评论列表。结构与 `replies` 中的对象一致。如果当前页是第一页，且有热门评论，则此数组非空。
                    items:
                      type: object
                    nullable: true
                  replies:
                    type: array
                    description: 当前页的评论列表。
                    items:
                      type: object
                      properties:
                        rpid:
                          type: number
                          description: 评论的唯一ID (Reply ID)。
                          example: 4189337397
                        oid:
                          type: number
                          description: 评论区对象ID，即视频的aid。
                          example: 1706416465
                        mid:
                          type: number
                          description: 发表评论的用户的mid。
                          example: 12345678
                        root:
                          type: number
                          description: 根评论的rpid。如果为0，表示这条评论是根评论。
                          example: 4189337300
                        parent:
                          type: number
                          description: 回复的父级评论的rpid。如果为0，表示是根评论。
                          example: 4189337300
                        count:
                          type: number
                          description: 这条评论下的回复（楼中楼）数量。
                          example: 520
                        ctime:
                          type: number
                          description: 评论发送时间的Unix时间戳（秒）。
                          example: 1579532400
                        like:
                          type: number
                          description: 该评论获得的点赞数。
                          example: 1314
                        member:
                          type: object
                          description: 发表评论的用户信息。
                          properties:
                            uname:
                              type: string
                              description: 用户昵称。
                              example: 评论区大神
                            sex:
                              type: string
                              description: 用户性别。
                              example: 男
                            avatar:
                              type: string
                              description: 用户头像的URL。
                              example: http://i0.hdslb.com/bfs/face/....jpg
                            level_info:
                              type: object
                              properties:
                                current_level:
                                  type: number
                                  description: 用户的B站等级。
                                  example: 6
                        content:
                          type: object
                          description: 评论内容。
                          properties:
                            message:
                              type: string
                              description: 评论的文本内容。
                              example: 十年B站无人问，一朝发现宝藏歌。
                        replies:
                          type: array
                          description: 楼中楼回复列表。结构与顶层评论对象一致，但通常此数组为空，需要单独请求。
                          items:
                            type: object
      x-search-words:
        - bilibili
        - b站
        - 评论
        - 回复
        - replies
        - oid
        - 热门评论
      x-seo-optimized-text: 免费B站评论查询API！无需登录即可获取任意视频的评论数据。支持热门评论、最新评论分页获取，返回评论内容、用户信息、点赞数、回复数等完整数据。适用于舆情分析、数据挖掘、内容审核、UP主运营工具等场景。稳定高效，每日百万级调用。
      x-seo-keywords:
        - 免费Bilibili评论API
        - B站评论获取
        - 视频评论查询
        - 热门评论接口
        - 评论数据分析
        - B站互动数据
        - 评论区API
        - B站评论查询
        - bilibili评论接口
        - 视频评论抓取
      x-seo-title: 【免费】B站评论查询API - 无需登录获取视频评论数据
      x-seo-usage-scenarios: 适用于舆情分析、评论数据挖掘、用户互动分析、内容审核、情感分析、社区运营工具、UP主数据分析等场景
      x-seo-related-apis:
        - Bilibili视频信息
        - Bilibili用户信息
        - Bilibili投稿查询
        - 社交数据API
  /social/bilibili/liveroom:
    get:
      tags:
        - Social
      summary: 查询 B站直播间
      description: >-
        想知道你喜欢的主播开播了吗？或者想在你的应用里集成B站直播间状态？这个接口能满足你。


        ## 功能概述

        这是一个智能接口，你可以用主播的 `mid` (用户ID) 或者直播间的 `room_id`
        (长号或短号)来查询。它会返回直播间的详细信息，包括是否在直播、标题、封面、人气、分区等。


        ## 响应体字段说明

        - **`live_status` (直播状态)**: `0` 代表未开播，`1` 代表直播中，`2` 代表轮播中。
      operationId: get-social-bilibili-liveroom
      parameters:
        - name: mid
          in: query
          required: false
          description: 主播的用户ID (`mid`)。与 `room_id` 任选其一。
          schema:
            type: string
            example: "672328094"
        - name: room_id
          in: query
          required: false
          description: 直播间ID，可以是长号（真实ID）或短号（靓号）。与 `mid` 任选其一。
          schema:
            type: string
            example: "22637261"
          x-tooltip: "例如: 22637261 (嘉然今天吃什么)"
      responses:
        "200":
          description: 成功！返回直播间的详细信息。
          content:
            application/json:
              schema:
                type: object
                properties:
                  uid:
                    type: number
                    description: 主播的用户ID (mid)。
                    example: 672328094
                  room_id:
                    type: number
                    description: 直播间的真实房间号（长号）。
                    example: 22637261
                  short_id:
                    type: number
                    description: 直播间的短号（靓号）。如果没有设置，则为0。
                    example: 22625027
                  attention:
                    type: number
                    description: 主播的粉丝数（关注数量）。
                    example: 1789089
                  online:
                    type: number
                    description: 直播间当前的人气值。注意这不是真实在线人数。
                    example: 3662242
                  live_status:
                    type: number
                    description: 直播状态。0:未开播, 1:直播中, 2:轮播中。
                    example: 1
                  area_id:
                    type: number
                    description: 分区ID。
                    example: 372
                  parent_area_name:
                    type: string
                    description: 父分区名称。
                    example: 虚拟主播
                  area_name:
                    type: string
                    description: 子分区名称。
                    example: 虚拟偶像
                  background:
                    type: string
                    description: 直播间背景图的URL。
                    example: http://i0.hdslb.com/bfs/live/room_bg/672328094.jpg
                  title:
                    type: string
                    description: 当前直播间的标题。
                    example: 【B限】杂谈~来聊聊天吧~
                  user_cover:
                    type: string
                    description: 用户设置的直播间封面URL。
                    example: http://i0.hdslb.com/bfs/live/user_cover/672328094.jpg
                  description:
                    type: string
                    description: 直播间公告或描述，支持换行符。
                    example: 这里是嘉然的直播间，欢迎回家！
                  live_time:
                    type: string
                    description: 本次直播开始的时间，格式为 `YYYY-MM-DD HH:mm:ss`。如果未开播，则为空字符串。
                    example: 2023-10-27 20:00:00
                  tags:
                    type: string
                    description: 直播间设置的标签，以逗号分隔。
                    example: VUP,虚拟偶像,A-SOUL,嘉然
                  hot_words:
                    type: array
                    description: 直播间热词列表，通常用于弹幕互动。
                    items:
                      type: string
                      example: 嘉门
                  new_pendants:
                    type: object
                    description: 主播佩戴的头像框、大航海等级等信息，结构可能比较复杂。
                    properties: {}
      x-search-words:
        - bilibili
        - b站
        - 直播
        - 直播间
        - liveroom
        - mid
        - room_id
        - 主播信息
        - 人气
      x-seo-optimized-text: 免费Bilibili直播间信息查询API，实时获取B站主播直播状态、人气值、直播间标题、封面等数据。支持mid和room_id两种查询方式，无需登录即可调用。适用于直播监控、开播提醒、数据分析等场景。
      x-seo-keywords:
        - B站直播API
        - Bilibili直播间查询
        - B站主播信息
        - 直播状态API
        - B站人气查询
        - 直播间监控
        - 开播提醒API
        - B站直播数据
      x-seo-title: 【免费】B站直播间查询API - 实时获取直播状态和人气
      x-seo-usage-scenarios: 适用于直播监控工具、开播提醒机器人、B站数据分析、主播管理后台、直播聚合平台、粉丝社区等场景
      x-seo-related-apis:
        - B站用户信息
        - B站视频信息
        - B站评论查询
        - QQ用户信息
  /social/qq/groupinfo:
    get:
      tags:
        - Social
      summary: 查询 QQ 群信息
      description: |-
        想在你的应用里展示QQ群信息？这个接口让你轻松获取群名称、群头像、群简介、成员数量等详细公开信息。它能帮你快速构建社群导航站、群聊推荐系统，或是为你的数据分析工具提供可靠的数据源。

        > [!VIP]
        > 本API目前处于**限时免费**阶段，我们鼓励开发者集成和测试。未来，它将转为付费API，为用户提供更稳定和强大的服务。

        ## 功能概述
        你只需要提供一个QQ群号（5-12位纯数字），接口就会返回该群的完整公开信息。我们会先验证群号的有效性，确保返回的数据准确可靠。接口响应速度快，数据结构清晰，非常适合集成到各类应用场景中。

        ## 返回数据说明
        接口会返回以下QQ群的关键信息：

        ### 基础字段（所有群都有）
        - **群基础信息**: 包括群号、群名称，让你能够准确识别和展示群聊
        - **视觉素材**: 提供群头像URL（支持多种尺寸），可直接用于在你的界面中展示群聊图标
        - **群介绍资料**: 包含群描述/简介和群标签，帮助用户了解群聊的主题和特色
        - **便捷入口**: 返回加群链接（二维码URL），方便用户一键加入感兴趣的群聊
        - **成员统计**: 当前成员数和最大成员数，直观了解群规模
        - **数据时效**: 提供最后更新时间戳，让你了解数据的新鲜度

        ### 扩展字段（部分群有）
        - **活跃度**: 活跃成员数量（可选）
        - **群主信息**: 群主QQ号和UID（可选）
        - **时间信息**: 建群时间戳和格式化时间（可选）
        - **群等级**: 群等级数值（可选）
        - **群公告**: 群公告/简介内容（可选）
        - **认证信息**: 官方认证类型和说明（可选）

        所有返回的数据都遵循标准的JSON格式，字段命名清晰，便于解析和使用。扩展字段仅在数据可用时返回，保持响应体精简。
      operationId: get-social-qq-groupinfo
      parameters:
        - name: group_id
          in: query
          required: true
          description: QQ群号，长度5-12位
          schema:
            type: string
            example: "526357265"
          x-tooltip: "纯数字的QQ群号，例如: 526357265"
      responses:
        "200":
          description: 成功响应，返回QQ群的详细信息
          content:
            application/json:
              schema:
                type: object
                properties:
                  group_id:
                    type: string
                    description: 群号
                    example: "526357265"
                  group_name:
                    type: string
                    description: 群名称
                    example: 罗小黑桌宠二群
                  avatar_url:
                    type: string
                    description: 群头像URL（标准尺寸100x100）
                    example: https://p.qlogo.cn/gh/526357265/526357265_1/100
                  description:
                    type: string
                    description: 群描述/简介
                    example: 在这里，发现更多~
                  tag:
                    type: string
                    description: 群标签
                    example: 推荐群聊
                  join_url:
                    type: string
                    description: 加群链接（QR码URL）
                    example: http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=xxx&group_code=526357265
                  last_updated:
                    type: string
                    description: 最后更新时间（ISO 8601格式）
                    example: 2025-10-04T12:34:56Z
                  member_count:
                    type: integer
                    description: 当前成员数
                    example: 498
                  max_member_count:
                    type: integer
                    description: 最大成员数
                    example: 500
                  active_member_num:
                    type: integer
                    description: 活跃成员数（可选，部分群有此数据）
                    example: 856
                  owner_uin:
                    type: string
                    description: 群主QQ号（可选）
                    example: "1164779091"
                  owner_uid:
                    type: string
                    description: 群主UID（可选）
                    example: u_IuagWQ41A6XZhfJv4UpYqA
                  create_time:
                    type: integer
                    description: 建群时间戳（Unix时间戳，可选）
                    example: 1652321207
                  create_time_str:
                    type: string
                    description: 建群时间格式化字符串（可选）
                    example: 2022-05-12 10:06:47
                  group_grade:
                    type: integer
                    description: 群等级（可选）
                    example: 3
                  group_memo:
                    type: string
                    description: 群公告/简介（可选）
                    example: 欢迎加入本群
                  cert_type:
                    type: integer
                    description: 认证类型（0=未认证，可选）
                    example: 0
                  cert_text:
                    type: string
                    description: 认证说明文本（可选）
                    example: 官方认证群
        "400":
          description: 缺少或无效的group_id参数
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: INVALID_ARGUMENT
                  details:
                    type: object
                  message:
                    type: string
                    example: Missing or invalid 'group_id' parameter.
        "404":
          description: QQ群不存在或无法访问（经优化后，此接口遵循RESTful规范，群不存在时返回404而非500）
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: QQ群不存在或无法访问
      x-search-words:
        - qq群
        - 群聊
        - group
        - 群信息
        - 群号查询
        - 群头像
        - 群名称
        - 加群链接
        - 社群
        - 群组
      x-seo-optimized-text: 免费QQ群信息查询API接口，一键获取QQ群名称、群头像、群简介、成员数量等详细信息。支持群号验证，稳定可靠的QQ群聊数据查询服务。适用于社群管理工具、群聊导航、社交应用等场景。
      x-seo-keywords:
        - 免费QQ群API
        - QQ群信息查询
        - QQ群头像获取
        - 群聊数据接口
        - QQ群号查询
        - 社群管理API
        - 群聊信息API
        - 免费API接口
      x-seo-title: 免费QQ群信息查询API - 群聊数据获取接口
      x-seo-usage-scenarios: 适用于社群管理工具、QQ群导航网站、群聊推荐系统、社交应用集成、群数据分析、社区运营工具等场景
      x-seo-related-apis:
        - QQ用户信息查询
        - 群成员列表
        - 社交平台API
        - 用户资料接口
  /github/repo:
    get:
      tags:
        - Social
      summary: 查询 GitHub 仓库
      description: |-
        需要快速获取一个GitHub仓库的核心信息？这个接口为你聚合了最有价值的数据，避免了多次调用GitHub官方API的麻烦，并且内置了缓存优化，速度更快、更稳定。

        ### 聚合高价值数据
        一次请求，即可获得以下信息：
        - **核心指标**: `star`, `fork`, `open_issues` 等关键统计数据。
        - **项目详情**: 描述、主页、分支、语言、话题标签、开源协议。
        - **参与者信息**: 获取协作者(`collaborators`)和推断的维护者(`maintainers`)列表，包括他们的公开邮箱（如果可用）。

        > [!NOTE]
        > `collaborators` 字段在私有仓库或权限受限时可能为空。`maintainers` 是根据最新提交记录推断的，仅供参考。

        ### 性能与稳定性
        我们内置了多级缓存，有效避免触发GitHub的API速率限制。对于需要更高请求额度的用户，可以联系我们定制接口。
      operationId: get-github-repo
      parameters:
        - name: repo
          in: query
          required: true
          description: 目标仓库的标识，格式为 `owner/repo`。
          schema:
            type: string
            example: torvalds/linux
          x-tooltip: "例如: torvalds/linux"
      responses:
        "200":
          description: 成功获取仓库信息。
          content:
            application/json:
              schema:
                type: object
                properties:
                  full_name:
                    type: string
                    example: torvalds/linux
                  description:
                    type: string
                    example: Linux kernel source tree
                  homepage:
                    type: string
                    example: https://www.kernel.org
                  default_branch:
                    type: string
                    example: master
                  primary_branch:
                    type: string
                    example: master
                  default_branch_sha:
                    type: string
                    example: abc123...
                  visibility:
                    type: string
                    example: public
                  archived:
                    type: boolean
                    example: false
                  disabled:
                    type: boolean
                    example: false
                  fork:
                    type: boolean
                    example: false
                  language:
                    type: string
                    example: C
                  topics:
                    type: array
                    items:
                      type: string
                    example:
                      - kernel
                      - linux
                  license:
                    type: string
                    example: GPL-2.0
                  stargazers:
                    type: integer
                    example: 170000
                  forks:
                    type: integer
                    example: 85000
                  open_issues:
                    type: integer
                    example: 500
                  watchers:
                    type: integer
                    example: 3000
                  pushed_at:
                    type: string
                    format: date-time
                    example: 2025-09-24T12:34:56Z
                  created_at:
                    type: string
                    format: date-time
                    example: 2011-07-04T22:42:00Z
                  updated_at:
                    type: string
                    format: date-time
                    example: 2025-09-24T12:34:56Z
                  languages:
                    type: object
                    additionalProperties:
                      type: integer
                    example:
                      C: 123456789
                      Assembly: 2345678
                  collaborators:
                    type: array
                    items:
                      type: object
                      properties:
                        login:
                          type: string
                        name:
                          type: string
                        email:
                          type: string
                        url:
                          type: string
                    example:
                      - login: octocat
                        name: The Octocat
                        email: public@example.com
                        url: https://github.com/octocat
                    nullable: true
                  maintainers:
                    type: array
                    items:
                      type: object
                      properties:
                        login:
                          type: string
                        name:
                          type: string
                        email:
                          type: string
                        url:
                          type: string
                    example:
                      - login: devA
                        name: Dev A
                        email: devA@users.noreply.github.com
                        url: https://github.com/devA
                  latest_release:
                    type: object
                    description: 仓库最新发布版本信息，如果没有 Release 则为 null。可用于实现应用更新检查功能。
                    properties:
                      tag_name:
                        type: string
                        description: 版本标签
                        example: v1.2.3
                      name:
                        type: string
                        description: 发布名称
                        example: Release v1.2.3
                      published_at:
                        type: string
                        format: date-time
                        description: 发布时间
                        example: 2026-01-10T12:00:00Z
                      html_url:
                        type: string
                        description: Release 页面链接
                        example: https://github.com/owner/repo/releases/tag/v1.2.3
                      prerelease:
                        type: boolean
                        description: 是否为预发布版本
                        example: false
                      draft:
                        type: boolean
                        description: 是否为草稿
                        example: false
                    example:
                      tag_name: v1.2.3
                      name: Release v1.2.3
                      published_at: 2026-01-10T12:00:00Z
                      html_url: https://github.com/owner/repo/releases/tag/v1.2.3
                      prerelease: false
                      draft: false
                    nullable: true
        "400":
          description: 请求参数缺失或格式错误。请确保 `repo` 参数已提供且格式为 `owner/repo`。
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: INVALID_ARGUMENT
                  message:
                    type: string
                    example: Missing or invalid 'repo' parameter.
        "502":
          description: 上游 GitHub API 出错或不可用。响应中会包含来自上游的原始错误信息，便于排查问题。
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: UPSTREAM_ERROR
                  message:
                    type: string
                    example: Failed to fetch data from GitHub API.
      x-search-words:
        - github
        - repo
        - repository
        - 仓库
        - 项目
        - star
        - fork
        - issues
        - watchers
        - license
        - topics
      x-seo-optimized-text: 免费 GitHub 仓库信息查询 API，一键获取项目
        分支、star、fork、开源协议、主要语言等核心数据。支持协作者与维护者信息查询，内置缓存机制，稳定高效，避免 GitHub API
        限流。适用于开发者工具、项目展示、代码分析等场景。
      x-seo-keywords:
        - GitHub API
        - 仓库信息查询
        - 开源项目数据
        - GitHub项目分析
        - 开发者API
        - 代码仓库接口
        - star数查询
        - 开源协议查询
      x-seo-title: 免费GitHub仓库信息查询API - 项目数据一键获取
      x-seo-usage-scenarios: 适用于开发项目仪表盘、开源软件导航、开发者作品集展示、代码统计与分析工具、软件依赖项跟踪等场景。
      x-seo-related-apis:
        - GitLab仓库信息
        - 代码提交历史
        - 开源项目趋势
        - 开发者信息查询
  /status/ratelimit:
    get:
      tags:
        - Status
      summary: 限流状态
      description: |-
        想了解我们API的当前负载情况吗？这个接口为你提供了服务的“心电图”。

        ## 功能概述
        此接口返回我们后端自适应限流器的实时状态。你可以看到当前并发请求数、并发上限、系统负载、请求接受/拒绝数等核心指标。这对于监控API健康状况和性能表现至关重要。

        > [!IMPORTANT]
        > 此接口为管理接口，需要提供有效的管理员级别API密钥才能访问。

        ### 认证方式
        请在请求头中添加 `Authorization: Bearer <你的API密钥>`。
      operationId: get-status-ratelimit
      parameters:
        - name: Authorization
          in: header
          required: true
          description: Bearer类型的API密钥认证头。例如：`Bearer sk-xxx`
          schema:
            type: string
            example: Bearer sk-xxx
      responses:
        "200":
          description: 查询成功，返回限流器的详细状态数据。
          content:
            application/json:
              schema:
                type: object
                properties:
                  accepts:
                    type: integer
                    description: Total number of accepted requests
                    example: 10000
                  in_flight:
                    type: integer
                    description: Number of current in-flight requests
                    example: 10
                  last_update:
                    type: string
                    description: Last update time of the status
                    example: 2023-10-27T10:00:00Z
                  limit:
                    type: integer
                    description: Current concurrency limit
                    example: 100
                  load:
                    type: number
                    description: Calculated system load (in_flight / limit)
                    example: 0.1
                  min_rtt:
                    type: number
                    description: Minimum observed RTT in milliseconds
                    example: 20.1
                  rejects:
                    type: integer
                    description: Total number of rejected requests
                    example: 50
                  rtt:
                    type: number
                    description: Smoothed RTT in milliseconds
                    example: 50.5
                  throttled:
                    type: integer
                    description: Total number of throttled requests
                    example: 120
        "401":
          description: 未授权
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: UNAUTHENTICATED
                  details:
                    type: object
                  message:
                    type: string
                    example: Authentication is required for this endpoint.
      x-search-words:
        - 状态
        - 监控
        - 限流
        - 速率
        - 负载
        - status
        - monitor
        - rate limit
        - qps
        - 并发
        - rtt
      x-seo-optimized-text: 免费API限流状态查询接口，实时监控API服务器负载和性能指标。获取并发请求数、系统负载、限流状态等核心数据。适用于系统监控、性能分析、服务健康检查等场景。
      x-seo-keywords:
        - 免费API监控
        - 限流状态查询
        - 服务器负载API
        - API性能监控
        - 系统状态接口
        - 实时监控API
        - 负载均衡查询
      x-seo-title: 免费API限流状态查询接口 - 实时服务监控
      x-seo-usage-scenarios: 适用于API服务监控、系统负载分析、性能优化、服务健康检查、运维监控、自动化运维、负载均衡配置等场景
      x-seo-related-apis:
        - 系统监控
        - 性能分析
        - 运维工具
        - 状态查询
  /status/usage:
    get:
      tags:
        - Status
      summary: 获取API端点使用统计
      description: >-
        想知道哪个API接口最受欢迎吗？这个接口提供了详细的“账单”。


        ## 功能概述

        此接口用于获取每个API端点（Endpoint）的使用情况统计。你可以查询所有端点的列表，也可以通过 `path`
        参数指定查询某一个特定端点。返回信息包括调用次数和平均处理时长
      operationId: get-status-usage
      parameters:
        - name: path
          in: query
          required: false
          description: （可选）如果你想查询某个特定的端点，请提供它的路径，例如 '/api/v1/image/motou'。如果留空，则返回所有端点的统计列表。
          schema:
            type: string
            example: /api/v1/image/motou
          x-tooltip: 留空则返回所有端点统计。
      responses:
        "200":
          description: 查询某条路径时
          content:
            application/json:
              schema:
                anyOf:
                  - title: 端点聚合统计
                    description: 查询所有端点时返回的聚合统计数据
                    type: object
                    properties:
                      endpoints:
                        type: array
                        items:
                          type: object
                          properties:
                            path:
                              type: string
                              example: /api/v1/text/profanitycheck
                            count:
                              type: integer
                              example: 2580791
                      unaggregated:
                        type: object
                        properties:
                          count:
                            type: integer
                            example: 356
                          oldest_log:
                            type: string
                            example: 2025-11-09T23:52:38.929+08:00
                  - title: 单个端点统计
                    description: 查询指定path参数时返回的单个端点统计数据
                    type: object
                    properties:
                      path:
                        type: string
                        example: /api/v1/image/motou
                      count:
                        type: integer
                        example: 22310
        "404":
          description: 未找到
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: NOT_FOUND
                  message:
                    type: string
                    example: 未找到指定的端点统计数据
      x-search-words:
        - 使用量
        - 统计
        - 调用次数
        - 排行榜
        - usage
        - statistics
        - analytics
        - 端点
        - api
  /text/aes/decrypt:
    post:
      tags:
        - Text
      summary: AES 解密
      description: >-
        收到了用AES加密的密文？把它、密钥和随机数（nonce）交给我们，就能还原出原始内容。


        ## 功能概述

        这是一个标准的AES解密接口。你需要提供经过Base64编码的密文、加密时使用的密钥和nonce（随机数，通常为16字节字符串）。


        > [!IMPORTANT]

        > **关于密钥 `key`**

        > 我们支持 AES-128, AES-192, 和 AES-256。请确保你提供的密钥 `key` 的长度（字节数）正好是
        **16**、**24** 或 **32**，以分别对应这三种加密强度。

        > 

        > **关于随机数 `nonce`**

        > 通常为16字节字符串，需与加密时一致。
      operationId: post-text-aes-decrypt
      parameters: []
      responses:
        "200":
          description: 成功响应
          content:
            application/json:
              schema:
                type: object
                properties:
                  plaintext:
                    type: string
                    example: top secret message
        "400":
          description: 无效的请求参数
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: INVALID_ARGUMENT
                  details:
                    type: object
                  message:
                    type: string
                    example: Invalid key length, invalid Base64 text, or missing nonce.
        "500":
          description: 解密失败
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: DECRYPTION_FAILED
                  details:
                    type: object
                  message:
                    type: string
                    example: Decryption failed, likely due to an incorrect key, nonce, or corrupted
                      ciphertext.
      requestBody:
        description: 包含待解密文本 'text'、密钥 'key' 和随机数 'nonce' 的JSON对象
        required: true
        content:
          application/json:
            schema:
              required:
                - key
                - text
                - nonce
              type: object
              properties:
                key:
                  type: string
                  description: 密钥，长度必须为16、24或32字节，对应AES-128/192/256。
                  example: a-secret-key-123
                text:
                  type: string
                  description: Base64编码的密文。
                  example: uyzVKczxZi3HdoGfeuaAt4F2/20WSmwFzIhJWMmDIaxeu97nLqbsX3wdp+NnRw==
                nonce:
                  type: string
                  description: 16字节的IV/Nonce，必须为16个字符
                  example: 1234567890abcdef
      x-search-words:
        - aes
        - 解密
        - decrypt
        - 密码学
        - 加密
        - cipher
        - key
        - nonce
      x-seo-optimized-text: 免费AES解密API接口，支持AES-128/192/256解密算法。安全可靠的文本解密服务，适用于密码学、数据安全、文件解密等场景。专业的加密解密API工具。
      x-seo-keywords:
        - 免费AES解密API
        - AES算法解密
        - 文本解密接口
        - 密码学API
        - 数据解密服务
        - AES-256解密
        - 加密解密工具
        - 安全API接口
      x-seo-title: 免费AES算法解密API接口 - 支持AES-128/192/256
      x-seo-usage-scenarios: 适用于密码管理系统、文件加密软件、数据库加密、通信加密、API安全传输、用户隐私保护、企业数据安全等场景
      x-seo-related-apis:
        - AES加密
        - Base64解码
        - MD5哈希
        - 文本分析
  /text/aes/encrypt:
    post:
      tags:
        - Text
      summary: AES 加密
      description: >-
        需要安全地传输或存储一些文本信息？AES加密是一个可靠的选择。


        ## 功能概述

        这是一个标准的AES加密接口。你提供需要加密的明文和密钥，我们返回经过Base64编码的密文。


        > [!IMPORTANT]

        > **关于密钥 `key`**

        > 我们支持 AES-128, AES-192, 和 AES-256。请确保你提供的密钥 `key` 的长度（字节数）正好是
        **16**、**24** 或 **32**，以分别对应这三种加密强度。
      operationId: post-text-aes-encrypt
      parameters: []
      responses:
        "200":
          description: 成功响应
          content:
            application/json:
              schema:
                type: object
                properties:
                  ciphertext:
                    type: string
                    example: u2oh39N1R5gC3YGjA8Xm7w==
        "400":
          description: 无效的请求参数
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: INVALID_ARGUMENT
                  details:
                    type: object
                  message:
                    type: string
                    example: Invalid key length.
        "500":
          description: 加密失败
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: ENCRYPTION_FAILED
                  details:
                    type: object
                  message:
                    type: string
                    example: Encryption failed due to an internal error.
      requestBody:
        description: 包含待加密文本 'text' 和密钥 'key' 的JSON对象
        required: true
        content:
          application/json:
            schema:
              required:
                - key
                - text
              type: object
              properties:
                key:
                  type: string
                  description: Key must be 16, 24, or 32 bytes long to select AES-128, AES-192, or
                    AES-256.
                  example: a-secret-key-123
                text:
                  type: string
                  example: top secret message
      x-search-words:
        - aes
        - 加密
        - encrypt
        - 密码学
        - 解密
        - plaintext
        - key
        - nonce
      x-seo-optimized-text: 免费AES加密API接口，支持AES-128/192/256加密算法。高效安全的文本加密服务，提供标准AES加密功能。适用于数据保护、密码加密、文件安全等场景。
      x-seo-keywords:
        - 免费AES加密API
        - AES算法加密
        - 文本加密接口
        - 密码学API
        - 数据加密服务
        - AES-256加密
        - 安全加密工具
        - 免费加密API
      x-seo-title: 免费AES算法加密API接口 - 高安全性文本加密
      x-seo-usage-scenarios: 适用于用户密码加密、敏感数据保护、API安全传输、文件加密存储、数据库字段加密、通信安全、隐私保护等场景
      x-seo-related-apis:
        - AES解密
        - Base64编码
        - MD5哈希
        - 文本处理
  /text/analyze:
    post:
      tags:
        - Text
      summary: 文本分析
      description: |-
        想知道一篇文章有多少字、多少个词、或者多少行？这个接口可以帮你快速统计。

        ## 功能概述
        你提供一段文本，我们会从多个维度进行分析，并返回其字符数、词数、句子数、段落数和行数。这对于文本编辑、内容管理等场景非常有用。
      operationId: post-text-analyze
      parameters: []
      responses:
        "200":
          description: 成功响应
          content:
            application/json:
              schema:
                type: object
                properties:
                  characters:
                    type: integer
                    example: 74
                  lines:
                    type: integer
                    example: 2
                  paragraphs:
                    type: integer
                    example: 1
                  sentences:
                    type: integer
                    example: 3
                  words:
                    type: integer
                    example: 13
        "400":
          description: 请求体无效或文本为空
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: INVALID_ARGUMENT
                  details:
                    type: object
                  message:
                    type: string
                    example: Request body is invalid or text is empty.
      requestBody:
        description: 包含待分析文本 'text' 的JSON对象
        required: true
        content:
          application/json:
            schema:
              required:
                - text
              type: object
              properties:
                text:
                  type: string
                  example: |-
                    Hello world.
                    This is a sample sentence. It has multiple lines and words.
      x-search-words:
        - 文本分析
        - 字数统计
        - 字符数
        - 词数
        - 行数
        - analyze
        - word count
        - 统计
  /text/base64/decode:
    post:
      tags:
        - Text
      summary: Base64 解码
      description: |-
        这是一个简单实用的 Base64 解码工具。

        ## 功能概述
        你提供一个 Base64 编码的字符串，我们帮你解码成原始的 UTF-8 文本。
      operationId: post-text-base64-decode
      parameters: []
      responses:
        "200":
          description: 成功响应
          content:
            application/json:
              schema:
                type: object
                properties:
                  decoded:
                    type: string
                    example: hello world
        "400":
          description: 无效的请求参数或解码失败
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: DECODING_FAILED
                  details:
                    type: object
                  message:
                    type: string
                    example: Invalid Base64 input.
      requestBody:
        description: 包含待解码文本 'text' 的JSON对象
        required: true
        content:
          application/json:
            schema:
              required:
                - text
              type: object
              properties:
                text:
                  type: string
                  example: aGVsbG8gd29ybGQ=
      x-search-words:
        - base64
        - 解码
        - 解密
        - decode
        - encoding
  /text/base64/encode:
    post:
      tags:
        - Text
      summary: Base64 编码
      description: |-
        这是一个简单实用的 Base64 编码工具。

        ## 功能概述
        你提供一段原始文本，我们帮你转换成 Base64 编码的字符串。
      operationId: post-text-base64-encode
      parameters: []
      responses:
        "200":
          description: 成功响应
          content:
            application/json:
              schema:
                type: object
                properties:
                  encoded:
                    type: string
                    example: aGVsbG8gd29ybGQ=
        "400":
          description: 无效的请求参数
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: INVALID_ARGUMENT
                  details:
                    type: object
                  message:
                    type: string
                    example: Missing 'text' field.
      requestBody:
        description: 包含待编码文本 'text' 的JSON对象
        required: true
        content:
          application/json:
            schema:
              required:
                - text
              type: object
              properties:
                text:
                  type: string
                  example: hello world
      x-search-words:
        - base64
        - 编码
        - 加密
        - encode
        - decoding
      x-seo-optimized-text: 免费Base64编码API接口，快速将文本转换为Base64格式。标准的Base64编码服务，支持UTF-8编码，适用于数据传输、图片编码、文件编码等场景。
      x-seo-keywords:
        - 免费Base64编码API
        - Base64转换接口
        - 文本编码服务
        - 数据编码API
        - Base64编码工具
        - 编码解码API
        - 免费编码接口
      x-seo-title: 免费Base64编码API接口 - 文本Base64转换服务
      x-seo-usage-scenarios: 适用于邮件附件编码、图片Base64转换、数据传输编码、JSON数据编码、API数据格式化、文件上传编码等场景
      x-seo-related-apis:
        - Base64解码
        - AES加密
        - MD5哈希
        - 文本分析
  /text/md5:
    get:
      tags:
        - Text
      summary: MD5 哈希
      description: |-
        一个快速计算文本 MD5 哈希值的工具，适用于短文本且不关心参数暴露的场景。

        ## 功能概述
        通过GET请求的查询参数传入文本，返回其32位小写的MD5哈希值。

        > [!NOTE]
        > 对于较长或敏感的文本，我们推荐使用本接口的 POST 版本，以避免URL长度限制和参数暴露问题。
      operationId: get-text-md5
      parameters:
        - name: text
          in: query
          required: true
          description: 需要计算哈希值的文本
          schema:
            type: string
            example: hello world
      responses:
        "200":
          description: 成功响应
          content:
            application/json:
              schema:
                type: object
                properties:
                  md5:
                    type: string
                    example: 5d41402abc4b2a76b9719d911017c592
        "400":
          description: 缺少text参数
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: INVALID_ARGUMENT
                  details:
                    type: object
                  message:
                    type: string
                    example: Missing 'text' parameter.
      x-search-words:
        - md5
        - hash
        - 哈希
        - 摘要
        - 加密
        - 校验
        - checksum
        - get
    post:
      tags:
        - Text
      summary: MD5 哈希 (POST)
      description: |-
        一个用于计算文本 MD5 哈希值的标准工具，推荐使用此版本。

        ## 功能概述
        通过POST请求的表单体传入文本，返回其32位小写的MD5哈希值。相比GET版本，此方法更适合处理较长或包含敏感信息的文本。
      operationId: post-text-md5
      parameters: []
      responses:
        "200":
          description: 成功响应
          content:
            application/json:
              schema:
                type: object
                properties:
                  md5:
                    type: string
                    example: 5d41402abc4b2a76b9719d911017c592
        "400":
          description: 缺少text参数
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: INVALID_ARGUMENT
                  details:
                    type: object
                  message:
                    type: string
                    example: Missing 'text' parameter in form data.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              required:
                - text
              type: object
              properties:
                text:
                  type: string
                  description: 需要计算哈希值的文本
                  example: hello world
      x-search-words:
        - md5
        - hash
        - 哈希
        - 摘要
        - 加密
        - 校验
        - checksum
        - post
  /text/md5/verify:
    post:
      tags:
        - Text
      summary: MD5 校验
      description: |-
        下载了一个文件，想确认它在传输过程中有没有损坏？校验MD5值是最常用的方法。

        ## 功能概述
        你提供原始文本和一个MD5哈希值，我们帮你计算文本的哈希，并与你提供的哈希进行比对，告诉你它们是否匹配。这在文件完整性校验等场景下非常有用。
      operationId: post-text-md5-verify
      parameters: []
      responses:
        "200":
          description: 成功响应
          content:
            application/json:
              schema:
                type: object
                properties:
                  match:
                    type: boolean
                    example: true
        "400":
          description: 无效的请求参数
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: INVALID_ARGUMENT
                  details:
                    type: object
                  message:
                    type: string
                    example: Missing 'text' or 'hash' field.
      requestBody:
        description: 包含待校验文本 'text' 和哈希值 'hash' 的JSON对象
        required: true
        content:
          application/json:
            schema:
              required:
                - hash
                - text
              type: object
              properties:
                hash:
                  type: string
                  example: 5d41402abc4b2a76b9719d911017c592
                text:
                  type: string
                  example: hello world
      x-search-words:
        - md5
        - 校验
        - 验证
        - verify
        - hash
        - 哈希
        - 文件完整性
        - 比对
        - match
  /text/aes/encrypt-advanced:
    post:
      tags:
        - Text
      summary: AES高级加密
      description: |-
        需要更灵活的AES加密方案？这个高级接口支持6种加密模式和3种填充方式，让你根据具体场景选择最合适的加密配置。

        > [!IMPORTANT]
        > **推荐使用GCM模式**
        > GCM模式提供认证加密(AEAD)，不仅能加密数据，还能验证数据完整性，防止密文被篡改。这是目前最推荐的加密模式。

        ## 功能概述
        这是一个功能全面的AES加密接口，支持多种加密模式和填充方式。你可以根据不同的安全需求和性能要求，灵活选择合适的加密配置。

        ### 支持的加密模式
        - **GCM模式**（推荐）：认证加密模式，提供完整性保护
        - **CBC模式**：经典块加密模式，需要IV和填充，适用于文件加密
        - **CTR模式**：流密码模式，无需填充，适用于实时数据加密
        - **OFB/CFB模式**：流密码模式，无需填充，适用于流数据加密
        - **ECB模式**（不推荐）：仅用于兼容性需求

        ### 支持的填充方式
        - **PKCS7填充**（推荐）：标准填充方式
        - **Zero填充**：使用0x00字节填充
        - **None填充**：无填充，用于流密码模式

        ### 输出格式支持
        - **base64**（默认）：标准Base64编码输出，适合传输和存储
        - **hex**：十六进制编码输出，方便与在线加密工具对比验证

        通过 `output_format` 参数可以直接获取HEX格式的密文，无需额外调用转换接口。

        ## 参数说明
        - **`text`**: 待加密的明文文本
        - **`key`**: 加密密钥（支持任意长度）
        - **`mode`**: 加密模式（可选，默认GCM）
        - **`padding`**: 填充方式（可选，默认PKCS7）
        - **`iv`**: 自定义IV（可选，Base64编码，16字节）
        - **`output_format`**: 输出格式（可选，默认base64）

        ## 使用示例

        **示例1：HEX格式输出**
        ```json
        {
          "text": "测试文本123",
          "key": "1234567890123456",
          "mode": "ECB",
          "padding": "PKCS7",
          "output_format": "hex"
        }
        ```
        返回示例：
        ```json
        {
          "ciphertext": "aaaca6027da10918bb5d23d81939552c",
          "mode": "ECB",
          "padding": "PKCS7"
        }
        ```

        **示例2：Base64格式输出（默认）**
        ```json
        {
          "text": "测试文本123",
          "key": "1234567890123456",
          "mode": "ECB",
          "padding": "PKCS7"
        }
        ```
        返回示例：
        ```json
        {
          "ciphertext": "qqymAn2hCRi7XSPYGTlVLA==",
          "mode": "ECB",
          "padding": "PKCS7"
        }
        ```

        ## 技术规格
        - **加密算法**: AES-256
        - **编码格式**: Base64/HEX（输入/输出）
        - **IV长度**: 16字节（128位）
        - **版本标注**: v3.4.8+

        > [!NOTE]
        > **关于IV（初始化向量）**
        > - GCM模式无需提供IV
        > - CBC/CTR/OFB/CFB模式可选提供IV
        > - ECB模式不使用IV
        > - 建议每次加密使用不同的IV以确保安全性

        > [!TIP]
        > **关于输出格式**
        > - 如需与在线加密工具（如 toolhelper.cn）对比结果，建议使用 `output_format: "hex"` 
        > - Base64格式更适合网络传输和API调用
        > - 两种格式可以相互转换，数据完全一致
      operationId: post-text-aes-encrypt-advanced
      parameters: []
      responses:
        "200":
          description: 加密成功，返回密文和加密配置
          content:
            application/json:
              schema:
                type: object
                properties:
                  ciphertext:
                    type: string
                    description: 加密后的密文（Base64编码）
                    example: kJB3X5YxNzA2MTA1NDQ3Mjc3ODg5...
                  mode:
                    type: string
                    description: 使用的加密模式
                    example: GCM
                  padding:
                    type: string
                    description: 使用的填充方式
                    example: NONE
                  iv:
                    type: string
                    description: 使用的IV（Base64编码）。GCM模式不返回此字段
                    example: cmFuZG9tSVZoZXJl
        "400":
          description: 无效的请求参数
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: "不支持的加密模式: INVALID"
      requestBody:
        description: 包含加密配置的JSON对象
        required: true
        content:
          application/json:
            schema:
              required:
                - text
                - key
              type: object
              properties:
                text:
                  type: string
                  description: 待加密的明文文本
                  example: Hello, World! 你好世界！
                key:
                  type: string
                  description: 加密密钥（支持任意长度）
                  example: my-super-secret-key
                mode:
                  type: string
                  description: 加密模式：GCM/CBC/ECB/CTR/OFB/CFB（可选，默认GCM）
                  example: GCM
                  enum:
                    - GCM
                    - CBC
                    - ECB
                    - CTR
                    - OFB
                    - CFB
                  x-enumLabels:
                    GCM: GCM模式（推荐）
                    CBC: CBC模式
                    ECB: ECB模式
                    CTR: CTR模式
                    OFB: OFB模式
                    CFB: CFB模式
                padding:
                  type: string
                  description: 填充方式：PKCS7/ZERO/NONE（可选，默认PKCS7）
                  example: PKCS7
                  enum:
                    - PKCS7
                    - ZERO
                    - NONE
                  x-enumLabels:
                    PKCS7: PKCS7填充
                    ZERO: 零填充
                    NONE: 无填充
                iv:
                  type: string
                  description: 自定义IV（可选，Base64编码，16字节）。GCM模式无需此参数
                  example: cmFuZG9tSVZoZXJl
                output_format:
                  type: string
                  description: 输出格式：base64（默认）或hex
                  example: hex
                  enum:
                    - base64
                    - hex
                  x-enumLabels:
                    base64: Base64编码
                    hex: 十六进制
      x-search-words:
        - aes
        - 高级加密
        - encrypt-advanced
        - gcm
        - cbc
        - ecb
        - ctr
        - ofb
        - cfb
        - 加密模式
        - 填充方式
        - pkcs7
        - 认证加密
        - aead
        - hex
        - 十六进制
        - output_format
        - 输出格式
        - base64转hex
      x-seo-optimized-text: 免费AES高级加密API接口，支持GCM/CBC/ECB/CTR/OFB/CFB六种加密模式和PKCS7/Zero/None三种填充方式。灵活配置的AES-256加密服务，提供认证加密和完整性保护。适用于数据安全传输、文件加密、API安全等场景。
      x-seo-keywords:
        - 免费AES加密API
        - GCM认证加密
        - 多模式AES加密
        - CBC加密接口
        - AES-256加密
        - 数据安全API
        - 高级加密工具
        - 加密模式选择
        - HEX输出
        - 十六进制加密
        - Base64转HEX
        - 输出格式选择
      x-seo-title: 免费AES高级加密API - 支持多种加密模式和填充方式
      x-seo-usage-scenarios: 适用于数据传输加密、API安全通信、文件加密存储、敏感数据保护、数据库字段加密、实时流加密、隐私保护等场景
      x-seo-related-apis:
        - AES高级解密
        - AES标准加密
        - Base64编码
        - MD5哈希
  /text/aes/decrypt-advanced:
    post:
      tags:
        - Text
      summary: AES高级解密
      description: |-
        需要解密通过高级加密接口加密的数据？这个接口提供与加密接口完全配对的解密功能，支持相同的6种加密模式和3种填充方式。

        > [!IMPORTANT]
        > **解密参数必须与加密时一致**
        > 解密时，必须提供与加密时相同的密钥、模式和填充方式。对于非GCM模式，还需要提供加密时返回的IV。

        ## 功能概述
        这是一个功能完整的AES解密接口，能够解密通过高级加密接口加密的所有密文。支持所有6种加密模式和3种填充方式，与加密接口完全配对。

        ### 解密流程
        1. 获取加密时返回的密文和配置参数
        2. 使用相同的密钥、模式、填充方式和IV（如需要）
        3. 调用本接口进行解密
        4. 获取原始明文

        ### 支持的解密模式
        - **GCM模式**（推荐）：自动验证数据完整性，如果密文被篡改会解密失败
        - **CBC模式**：经典块解密模式，需要提供加密时的IV
        - **CTR/OFB/CFB模式**：流密码解密，需要提供加密时的IV
        - **ECB模式**：不需要IV，但安全性较低

        ### 填充方式处理
        - **PKCS7填充**：解密后自动移除填充
        - **Zero填充**：解密后自动移除0x00填充
        - **None填充**：无填充处理

        ## 参数说明
        - **`text`**: 待解密的密文（Base64编码，来自加密接口返回的ciphertext字段）
        - **`key`**: 解密密钥（必须与加密时相同）
        - **`mode`**: 加密模式（必须与加密时相同）
        - **`padding`**: 填充方式（可选，默认PKCS7，必须与加密时相同）
        - **`iv`**: 初始化向量（非GCM模式必须提供，Base64编码）

        ## 常见错误处理
        如果解密失败，请检查以下几点：
        - 密钥是否与加密时完全相同
        - 模式和填充方式是否匹配
        - 非GCM模式下是否提供了正确的IV
        - 密文是否完整且未被修改
        - GCM模式下密文是否被篡改
      operationId: post-text-aes-decrypt-advanced
      parameters: []
      responses:
        "200":
          description: 解密成功，返回原始明文
          content:
            application/json:
              schema:
                type: object
                properties:
                  plaintext:
                    type: string
                    description: 解密后的明文文本
                    example: Hello, World! 你好世界！
        "400":
          description: 无效的请求参数或解密失败
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: 填充验证失败：密钥、模式或填充方式可能不正确
      requestBody:
        description: 包含解密配置的JSON对象
        required: true
        content:
          application/json:
            schema:
              required:
                - text
                - key
                - mode
              type: object
              properties:
                text:
                  type: string
                  description: 待解密的密文（Base64编码）。此值来自加密接口返回的ciphertext字段
                  example: 68vWkaxJPg1vx0LWJONpEfYdvW3Wz7V5uXiYg0WWfGJHIZWBmVVghHg=
                key:
                  type: string
                  description: 解密密钥（必须与加密时相同）
                  example: my-super-secret-key
                mode:
                  type: string
                  description: 加密模式（必须与加密时相同）：GCM/CBC/ECB/CTR/OFB/CFB
                  example: GCM
                  enum:
                    - GCM
                    - CBC
                    - ECB
                    - CTR
                    - OFB
                    - CFB
                  x-enumLabels:
                    GCM: GCM模式（推荐）
                    CBC: CBC模式
                    ECB: ECB模式
                    CTR: CTR模式
                    OFB: OFB模式
                    CFB: CFB模式
                padding:
                  type: string
                  description: 填充方式（可选，必须与加密时相同）：PKCS7/ZERO/NONE。GCM模式默认为NONE
                  example: NONE
                  enum:
                    - PKCS7
                    - ZERO
                    - NONE
                  x-enumLabels:
                    PKCS7: PKCS7填充
                    ZERO: 零填充
                    NONE: 无填充
                iv:
                  type: string
                  description: 初始化向量（非GCM模式必须提供，Base64编码）。此值来自加密接口返回的iv字段
                  example: cmFuZG9tSVZoZXJl
      x-search-words:
        - aes
        - 高级解密
        - decrypt-advanced
        - gcm
        - cbc
        - ecb
        - ctr
        - ofb
        - cfb
        - 解密模式
        - 填充方式
        - pkcs7
        - 认证解密
        - 完整性验证
      x-seo-optimized-text: 免费AES高级解密API接口，支持GCM/CBC/ECB/CTR/OFB/CFB六种解密模式和PKCS7/Zero/None三种填充方式。完整配对加密接口的AES-256解密服务，支持认证解密和完整性验证。适用于数据接收、文件解密、安全通信等场景。
      x-seo-keywords:
        - 免费AES解密API
        - GCM认证解密
        - 多模式AES解密
        - CBC解密接口
        - AES-256解密
        - 数据解密服务
        - 高级解密工具
        - 解密模式选择
      x-seo-title: 免费AES高级解密API - 支持多种解密模式和填充方式
      x-seo-usage-scenarios: 适用于数据接收解密、API安全通信、加密文件解密、敏感数据解析、数据库解密、流数据解密、隐私数据恢复等场景
      x-seo-related-apis:
        - AES高级加密
        - AES标准解密
        - Base64解码
        - MD5校验
  /text/convert:
    post:
      tags:
        - Text
      summary: 格式转换
      description: |-
        需要在不同文本格式之间转换？这个接口支持Base64、Hex、URL、HTML、Unicode等多种格式互转，还能生成MD5、SHA256等哈希值。

        ## 功能概述
        你提供待转换的文本、源格式和目标格式，接口会自动完成转换。支持7种双向格式（plain、base64、hex、url、html、unicode、binary）和4种单向哈希（md5、sha1、sha256、sha512）。

        ## 格式说明
        **双向转换格式**：plain（纯文本）、base64、hex（十六进制）、url、html（HTML实体）、unicode（\uXXXX转义）、binary（二进制字符串）

        **单向哈希格式**：md5、sha1、sha256、sha512（仅可作为目标格式，不可逆）

        ## 链式转换
        支持多次调用实现复杂转换，如先将文本转为base64，再将base64转为hex。
      operationId: post-text-convert
      parameters: []
      responses:
        "200":
          description: 转换成功
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    type: string
                    description: 转换结果
                    example: aGVsbG8gd29ybGQ=
                  from:
                    type: string
                    description: 源格式
                    example: plain
                  to:
                    type: string
                    description: 目标格式
                    example: base64
                  length:
                    type: integer
                    description: 结果长度
                    example: 16
                  info:
                    type: string
                    description: 额外信息（如哈希不可逆提示）
                    example: 此转换为单向哈希，不可逆
        "400":
          description: 转换失败或参数错误
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_code:
                    type: string
                    example: CONVERSION_FAILED
                  error_message:
                    type: string
                    example: "不支持的源格式: unknown"
                  error_details:
                    type: string
                    example: ""
      requestBody:
        description: 包含转换配置的JSON对象
        required: true
        content:
          application/json:
            schema:
              required:
                - text
                - from
                - to
              type: object
              properties:
                text:
                  type: string
                  description: 待转换的文本内容
                  example: hello world
                from:
                  type: string
                  description: 源格式类型
                  example: plain
                  enum:
                    - plain
                    - base64
                    - hex
                    - url
                    - html
                    - unicode
                    - binary
                    - md5
                    - sha1
                    - sha256
                    - sha512
                  x-enumLabels:
                    plain: 纯文本
                    base64: Base64
                    hex: 十六进制
                    url: URL编码
                    html: HTML实体
                    unicode: Unicode转义
                    binary: 二进制
                    md5: MD5哈希
                    sha1: SHA1哈希
                    sha256: SHA256哈希
                    sha512: SHA512哈希
                to:
                  type: string
                  description: 目标格式类型
                  example: base64
                  enum:
                    - plain
                    - base64
                    - hex
                    - url
                    - html
                    - unicode
                    - binary
                    - md5
                    - sha1
                    - sha256
                    - sha512
                  x-enumLabels:
                    plain: 纯文本
                    base64: Base64
                    hex: 十六进制
                    url: URL编码
                    html: HTML实体
                    unicode: Unicode转义
                    binary: 二进制
                    md5: MD5哈希
                    sha1: SHA1哈希
                    sha256: SHA256哈希
                    sha512: SHA512哈希
                options:
                  type: object
                  description: 可选参数（预留，当前未使用）
                  additionalProperties: true
      x-search-words:
        - 格式转换
        - 文本转换
        - convert
        - base64
        - hex
        - 十六进制
        - url编码
        - html转义
        - unicode
        - binary
        - 二进制
        - md5
        - sha1
        - sha256
        - sha512
        - 哈希
        - hash
        - 编码
        - 解码
        - encode
        - decode
      x-seo-optimized-text: 免费文本格式转换API接口，支持Base64、Hex、URL、HTML、Unicode等多种格式互转。一站式文本编码解码服务，支持MD5、SHA256等哈希计算。适用于开发调试、数据处理、格式转换等场景。
      x-seo-keywords:
        - 免费格式转换API
        - Base64转换
        - Hex编码
        - URL编码
        - HTML转义
        - Unicode转换
        - MD5哈希
        - SHA256哈希
        - 文本转换工具
        - 编码解码API
      x-seo-title: 免费通用文本格式转换API - 支持多种编码格式互转
      x-seo-usage-scenarios: 适用于在线编码工具、开发调试、数据处理、批量格式转换、密码哈希生成、安全编码防XSS攻击等场景
      x-seo-related-apis:
        - Base64编码
        - Base64解码
        - MD5哈希
        - AES加密
  /translate/text:
    post:
      tags:
        - Translate
      summary: 翻译
      description: |-
        需要跨越语言的鸿沟进行交流？这个翻译接口是你可靠的'同声传译'。

        ## 功能概述
        你可以将一段源语言文本（我们能自动检测源语言）翻译成你指定的任何目标语言。无论是中译英、日译法，都不在话下。

        ## 支持的语言
        我们支持超过100种语言的互译，包括但不限于：中文（简体/繁体）、英语、日语、韩语、法语、德语、西班牙语、俄语、阿拉伯语等主流语言，以及各种小语种。详见下方参数列表。
      operationId: post-translate-text
      parameters:
        - name: to_lang
          in: query
          required: true
          description: 目标语言代码。请从支持的语言列表中选择一个语言代码。
          schema:
            type: string
            enum:
              - sq
              - ga
              - et
              - ar
              - am
              - az
              - be
              - bg
              - eu
              - is
              - pl
              - bs-Latn
              - fa
              - da
              - de
              - ru
              - fr
              - tl
              - fi
              - fy
              - km
              - ka
              - gu
              - ht
              - ko
              - ha
              - kk
              - nl
              - gl
              - ca
              - cs
              - ky
              - kn
              - tlh
              - hr
              - otq
              - co
              - ku
              - la
              - lo
              - lv
              - lt
              - ro
              - lb
              - mg
              - mt
              - mr
              - ms
              - ml
              - mi
              - mk
              - mn
              - bn
              - my
              - mww
              - hmn
              - xh
              - zu
              - ne
              - no
              - pa
              - ps
              - pt
              - ny
              - ja
              - sv
              - sr-Latn
              - sr-Cyrl
              - st
              - sm
              - si
              - eo
              - sk
              - sl
              - sw
              - gd
              - so
              - ceb
              - te
              - ta
              - th
              - tg
              - tr
              - cy
              - zh-lzh
              - ur
              - uk
              - uz
              - haw
              - es
              - he
              - el
              - sd
              - hu
              - sn
              - hy
              - ig
              - it
              - yi
              - hi
              - id
              - en
              - su
              - jw
              - yua
              - yo
              - vi
              - zh-CHS
              - zh-CHT
            example: zh-CHS
          x-tooltip: 例如，'zh-CHS' 代表中文简体，'en' 代表英语。
      responses:
        "200":
          description: 成功响应
          content:
            application/json:
              schema:
                type: object
                properties:
                  source_lang:
                    type: string
                    description: The source language detected.
                    example: en
                  translated_text:
                    type: string
                    description: The translated text.
                    example: 你好，世界
        "400":
          description: 无效的请求体
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: INVALID_ARGUMENT
                  details:
                    type: object
                  message:
                    type: string
                    example: Invalid request body, 'text' and 'to_lang' are required.
        "500":
          description: 翻译失败
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: TRANSLATION_FAILED
                  details:
                    type: object
                  message:
                    type: string
                    example: Translation failed due to an upstream service error.
      requestBody:
        description: 包含待翻译文本的JSON对象
        required: true
        content:
          application/json:
            schema:
              required:
                - text
              type: object
              properties:
                text:
                  type: string
                  description: 待翻译的文本内容。
                  example: hello world
      x-search-words:
        - 翻译
        - translate
        - 语言
        - 中译英
        - 英译中
        - 自动检测
        - 日译中
        - 谷歌翻译
        - deepl
      x-seo-optimized-text: 免费多语言文本翻译API接口，支持100+种语言的高质量翻译服务。自动检测源语言，快速准确翻译。适用于国际化应用、多语言网站、翻译工具、跨境业务等场景。
      x-seo-keywords:
        - 免费翻译API
        - 多语言翻译接口
        - 文本翻译服务
        - 在线翻译API
        - 语言转换工具
        - 国际化API
        - 翻译工具接口
      x-seo-title: 免费多语言文本翻译API接口 - 100+语言翻译服务
      x-seo-usage-scenarios: 适用于国际化网站、多语言应用、翻译工具、跨境电商、学习软件、文档翻译、社交平台、内容本地化等场景
      x-seo-related-apis:
        - 文本处理
        - 语言检测
        - 内容分析
        - 文本工具
  /ai/translate:
    post:
      tags:
        - Translate
      summary: AI智能翻译
      description: |-
        这是一个商业级的AI智能翻译服务，采用最新的神经网络翻译技术和大语言模型，提供远超传统机器翻译的质量。

        > [!VIP]
        > 本API目前处于**限时免费**阶段，我们鼓励开发者深度集成和测试。未来，它将转为付费API，为用户提供更稳定、更智能的翻译服务。

        ## 功能概述

        - **智能双模式**: 支持单个文本翻译和批量文本翻译的统一接口设计，自动识别请求类型并提供相应的翻译服务。系统会根据输入自动判断是处理单条文本还是批量文本，无需使用不同的接口。
        - **多风格适配**: 提供随意口语化、专业商务、学术正式、文学艺术四种翻译风格，能够根据不同场景需求调整翻译的语言风格和表达方式。
        - **上下文感知**: 支持通用、商务、技术、医疗、法律、市场营销、娱乐、教育、新闻等九种专业领域的上下文翻译，确保术语准确性和表达地道性。
        - **高质量保证**: 内置质量评估系统，对每次翻译结果进行流畅度、准确度、完整性评分，并提供置信度分数和替代翻译建议。
        - **智能解释**: 提供关键词组翻译注释、文化背景说明和语法结构分析，帮助用户理解翻译逻辑和文化差异。
        - **高效批量**: 批量翻译支持最多50条文本，总计10万字符，配备智能并发控制（1-10并发）和失败重试机制。
        - **快速模式**: 提供快速模式选项，在保证95%+准确率的前提下，响应时间缩短至800ms内，适合实时翻译和聊天应用。
        - **格式保留**: 智能识别并保持原文的格式结构，包括换行、缩进、特殊符号等，确保翻译后的文本保持良好的可读性。
      operationId: post-ai-translate
      parameters:
        - name: target_lang
          in: query
          required: true
          description: 目标语言代码。请从支持的语言列表中选择一个语言代码。
          schema:
            type: string
            enum:
              - sq
              - ga
              - et
              - ar
              - am
              - az
              - be
              - bg
              - eu
              - is
              - pl
              - bs-Latn
              - fa
              - da
              - de
              - ru
              - fr
              - tl
              - fi
              - fy
              - km
              - ka
              - gu
              - ht
              - ko
              - ha
              - kk
              - nl
              - gl
              - ca
              - cs
              - ky
              - kn
              - tlh
              - hr
              - otq
              - co
              - ku
              - la
              - lo
              - lv
              - lt
              - ro
              - lb
              - mg
              - mt
              - mr
              - ms
              - ml
              - mi
              - mk
              - mn
              - bn
              - my
              - mww
              - hmn
              - xh
              - zu
              - ne
              - no
              - pa
              - ps
              - pt
              - ny
              - ja
              - sv
              - sr-Latn
              - sr-Cyrl
              - st
              - sm
              - si
              - eo
              - sk
              - sl
              - sw
              - gd
              - so
              - ceb
              - te
              - ta
              - th
              - tg
              - tr
              - cy
              - zh-lzh
              - ur
              - uk
              - uz
              - haw
              - es
              - he
              - el
              - sd
              - hu
              - sn
              - hy
              - ig
              - it
              - yi
              - hi
              - id
              - en
              - su
              - jw
              - yua
              - yo
              - vi
              - zh-CHS
              - zh-CHT
            example: zh-CHS
          x-tooltip: 例如，'zh-CHS' 代表中文简体，'en' 代表英语。
      responses:
        "200":
          description: 翻译成功！返回翻译结果、质量指标和性能统计。
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Translation completed successfully
                  is_batch:
                    type: boolean
                    description: 标识是否为批量翻译请求。
                    example: false
                  data:
                    type: object
                    description: 单个翻译的详细结果，仅在单个翻译时返回。
                    properties:
                      original_text:
                        type: string
                        example: Hello, how are you today?
                      translated_text:
                        type: string
                        example: 你好，你今天怎么样？
                      detected_lang:
                        type: string
                        example: en
                      confidence_score:
                        type: number
                        example: 0.98
                      alternatives:
                        type: array
                        items:
                          type: string
                        example:
                          - 你好，今天过得如何？
                      explanation:
                        type: object
                        properties:
                          key_phrases:
                            type: array
                            items:
                              type: object
                          cultural_notes:
                            type: array
                            items:
                              type: string
                          grammar_notes:
                            type: array
                            items:
                              type: string
                  batch_data:
                    type: array
                    description: 批量翻译结果列表，仅在批量翻译时返回。
                    items:
                      type: object
                      properties:
                        original_text:
                          type: string
                        translated_text:
                          type: string
                        confidence_score:
                          type: number
                  batch_summary:
                    type: object
                    description: 批量翻译汇总信息，仅在批量翻译时返回。
                    properties:
                      total_items:
                        type: integer
                      success_items:
                        type: integer
                      failed_items:
                        type: integer
                      average_quality:
                        type: number
                  performance:
                    type: object
                    properties:
                      processing_time_ms:
                        type: integer
                        example: 850
                      cache_hit:
                        type: boolean
                        example: false
                  quality_metrics:
                    type: object
                    description: 翻译质量指标，仅在单个翻译时返回。
                    properties:
                      fluency_score:
                        type: number
                        example: 0.95
                      accuracy_score:
                        type: number
                        example: 0.92
                      completeness_score:
                        type: number
                        example: 0.98
                      total_score:
                        type: number
                        example: 0.95
        "400":
          description: 请求参数错误。请检查必填参数和参数格式是否正确。
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    example: 400
                  message:
                    type: string
                    example: Invalid request parameters
                  error:
                    type: string
                    example: either 'text' or 'texts' must be provided
        "401":
          description: 认证失败。请检查API密钥是否有效。
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    example: 401
                  message:
                    type: string
                    example: Unauthorized
                  error:
                    type: string
                    example: Invalid or missing API token
        "429":
          description: 请求频率过高。请稍后重试。
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    example: 429
                  message:
                    type: string
                    example: Rate limit exceeded
                  error:
                    type: string
                    example: Too many requests, please try again later
        "500":
          description: 翻译服务内部错误。请稍后重试或联系技术支持。
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    example: 500
                  message:
                    type: string
                    example: Translation service error
                  error:
                    type: string
                    example: Translation request failed
                  is_batch:
                    type: boolean
                    example: false
      requestBody:
        description: 包含翻译参数的JSON对象，支持单个文本或批量文本翻译
        required: true
        content:
          application/json:
            schema:
              required: []
              type: object
              properties:
                text:
                  type: string
                  description: 单个翻译时使用的待翻译文本，与texts参数二选一。最大长度10,000字符。
                  example: Hello, how are you today?
                texts:
                  type: array
                  description: 批量翻译时使用的待翻译文本列表，与text参数二选一。最多50条，总计最大100,000字符。
                  items:
                    type: string
                source_lang:
                  type: string
                  description: 源语言代码，可选。如果不指定，系统会自动检测源语言。
                  example: en
                style:
                  type: string
                  description: 翻译风格，可选。支持casual(随意口语化)、professional(专业商务，默认)、academic(学术正式)、literary(文学艺术)。
                  enum:
                    - casual
                    - professional
                    - academic
                    - literary
                  default: professional
                  example: professional
                  x-enumLabels:
                    casual: 口语化
                    professional: 专业商务
                    academic: 学术正式
                    literary: 文学艺术
                context:
                  type: string
                  description: 翻译上下文场景，可选。支持general(通用，默认)、business(商务)、technical(技术)、medical(医疗)、legal(法律)、marketing(市场营销)、entertainment(娱乐)、education(教育)、news(新闻)。
                  enum:
                    - general
                    - business
                    - technical
                    - medical
                    - legal
                    - marketing
                    - entertainment
                    - education
                    - news
                  default: general
                  example: business
                  x-enumLabels:
                    general: 通用
                    business: 商务
                    technical: 技术
                    medical: 医疗
                    legal: 法律
                    marketing: 市场营销
                    entertainment: 娱乐
                    education: 教育
                    news: 新闻
                preserve_format:
                  type: boolean
                  description: 是否保留原文格式，包括换行、缩进等。
                  default: true
                  example: true
                fast_mode:
                  type: boolean
                  description: 是否启用快速模式。快速模式响应时间约800ms，准确率95%+；普通模式响应时间约2000ms，准确率98%+。
                  default: false
                  example: true
                max_concurrency:
                  type: integer
                  description: 批量翻译时的最大并发数，范围1-10。仅在批量翻译时有效。
                  minimum: 1
                  maximum: 10
                  default: 3
                  example: 3
      x-search-words:
        - AI翻译
        - 智能翻译
        - 批量翻译
        - AI translate
        - 翻译风格
        - 上下文翻译
        - 商业翻译
        - 专业翻译
        - 文学翻译
        - 学术翻译
        - 快速翻译
  /ai/translate/languages:
    get:
      tags:
        - Translate
      summary: AI翻译配置
      description: 获取AI智能翻译服务支持的完整语言列表、翻译风格选项、上下文场景选项以及性能指标信息。
      operationId: get-ai-translate-languages
      parameters: []
      responses:
        "200":
          description: 成功获取AI翻译配置信息！
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Supported languages retrieved successfully
                  data:
                    type: object
                    properties:
                      languages:
                        type: array
                        items:
                          type: object
                          properties:
                            code:
                              type: string
                              example: zh-CHS
                            name:
                              type: string
                              example: Chinese (Simplified)
                            native:
                              type: string
                              example: 中文(简体)
                      styles:
                        type: array
                        items:
                          type: object
                          properties:
                            code:
                              type: string
                              example: professional
                            name:
                              type: string
                              example: Professional
                            description:
                              type: string
                              example: Formal, business-appropriate style
                      contexts:
                        type: array
                        items:
                          type: object
                          properties:
                            code:
                              type: string
                              example: business
                            name:
                              type: string
                              example: Business
                            description:
                              type: string
                              example: Business and corporate content
                  performance:
                    type: object
                    properties:
                      fast_mode_available:
                        type: boolean
                        example: true
                      batch_translation_available:
                        type: boolean
                        example: true
                      max_text_length:
                        type: integer
                        example: 10000
                      max_batch_size:
                        type: integer
                        example: 50
                      typical_response_time_ms:
                        type: object
                        properties:
                          fast_mode:
                            type: integer
                            example: 800
                          normal_mode:
                            type: integer
                            example: 2000
      x-search-words:
        - 支持语言
        - 翻译配置
        - 语言列表
        - 翻译风格
        - 上下文选项
        - supported languages
        - translation config
        - language list
        - AI翻译配置
  /translate/stream:
    post:
      tags:
        - Translate
      summary: 流式翻译（中英互译）
      description: |-
        想让翻译结果像打字机一样逐字显示出来？这个流式翻译接口能实现这种效果。

        ## 功能概述
        不同于传统翻译API一次性返回完整结果，这个接口会实时地、一个字一个字地把翻译内容推给你（就像ChatGPT回复消息那样），非常适合用在聊天应用、直播字幕等需要即时反馈的场景。

        ## 它能做什么
        - **中英互译**：支持中文和英文之间的双向翻译
        - **自动识别**：不确定源语言？设置为 `auto` 让我们自动检测
        - **逐字返回**：翻译结果会像打字机一样逐字流式返回，用户体验更流畅
        - **音频朗读**：部分翻译结果会附带音频链接，方便朗读

        ## 支持的语言
        目前专注于中英互译，支持以下选项：
        - `中文`（简体/繁体）
        - `英文`
        - `auto`（自动检测）
      operationId: post-translate-stream
      parameters: []
      responses:
        "200":
          description: SSE流式响应。Content-Type为text/event-stream
          content:
            application/json:
              schema:
                type: string
                example: |+
                  event: start
                  data: ok

                  event: message
                  data: {"content":"Hello"}

                  event: audio
                  data: {"speak_url":"https://fanyi.so.com/audio?from=zh&to=en&voice=2&cate=speakUrl&key=7eca689f0d3389d9dea66ae112e5cfd7&query=你好","tSpeak_url":"/audio?from=zh&to=en&voice=2&cate=tSpeakUrl&key=8b1a9953c4611296a827abf8c47804d7&query=Hello","美":"/audio?from=zh&to=en&voice=6&cate=us-speech&key=7eca689f0d3389d9dea66ae112e5cfd7&query=你好","英":"/audio?from=zh&to=en&voice=5&cate=uk-speech&key=7eca689f0d3389d9dea66ae112e5cfd7&query=你好"}

                  event: end
                  data: ok

        "400":
          description: 请求参数错误
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: 错误描述
                    example: Missing required parameter
                  code:
                    type: string
                    description: 错误码
                    enum:
                      - INVALID_REQUEST
                      - MISSING_QUERY
                      - MISSING_TARGET_LANG
                    example: MISSING_QUERY
        "500":
          description: 翻译服务错误
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: 错误描述
                    example: Translation service unavailable
                  code:
                    type: string
                    example: SERVICE_ERROR
      requestBody:
        description: 包含翻译参数的JSON对象
        required: true
        content:
          application/json:
            schema:
              required:
                - query
                - to_lang
              type: object
              properties:
                query:
                  type: string
                  description: 待翻译的文本内容
                  example: Hello, how are you?
                to_lang:
                  type: string
                  description: 目标语言，支持：中文、英文
                  enum:
                    - 中文
                    - 英文
                  example: 中文
                from_lang:
                  type: string
                  description: 源语言，支持：中文、英文、auto（自动检测）。默认为auto
                  enum:
                    - 中文
                    - 英文
                    - auto
                  example: 英文
                  default: auto
                tone:
                  type: string
                  description: 语气参数，可选
                  example: ""
      x-search-words:
        - 流式翻译
        - SSE翻译
        - 实时翻译
        - 中译英
        - 英译中
        - 打字机效果
        - 流式响应
        - Server-Sent Events
        - stream translate
        - 实时
        - 逐字翻译
      x-seo-optimized-text: 免费流式翻译API接口，支持中文和英文之间的实时流式翻译。采用Server-Sent
        Events（SSE）技术，提供打字机效果的翻译体验。适用于实时翻译应用、聊天翻译、直播字幕、即时通讯翻译等场景。
      x-seo-keywords:
        - 流式翻译API
        - SSE翻译接口
        - 实时翻译API
        - 中英互译
        - 打字机翻译
        - Server-Sent Events
        - 流式响应翻译
        - 实时翻译服务
      x-seo-title: 免费流式翻译API接口 - SSE实时中英互译服务
      x-seo-usage-scenarios: 适用于实时聊天翻译、直播字幕翻译、即时通讯应用、AI对话翻译、语音识别翻译、在线教育、跨境沟通等场景
      x-seo-related-apis:
        - 多语言文本翻译
        - AI智能翻译
        - 文本处理
        - 实时通信
  /webparse/extractimages:
    get:
      tags:
        - WebParse
      summary: 提取网页图片
      description: |-
        想批量获取一个网页上的所有图片链接？这个接口帮你搞定。

        ## 功能概述
        提供一个网页 URL，返回该页面中所有图片的链接列表。适合用于图片采集、素材下载等场景。
      operationId: get-webparse-extractimages
      parameters:
        - name: url
          in: query
          required: true
          description: 需要提取图片的网页URL
          schema:
            type: string
            format: uri
            example: https://cn.bing.com/
          x-tooltip: 必须是完整的URL，如 https://cn.bing.com/
      responses:
        "200":
          description: 成功响应
          content:
            application/json:
              schema:
                type: object
                properties:
                  count:
                    type: integer
                    example: 25
                  images:
                    type: array
                    example:
                      - https://example.com/image1.jpg
                      - https://example.com/image2.png
                    items:
                      type: string
                  url:
                    type: string
                    example: https://example.com
        "400":
          description: URL参数缺失或无效
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: INVALID_ARGUMENT
                  details:
                    type: object
                  message:
                    type: string
                    example: Missing or invalid 'url' parameter.
        "500":
          description: 服务器内部错误
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: INTERNAL_SERVER_ERROR
                  details:
                    type: object
                  message:
                    type: string
                    example: Failed to parse the webpage.
      x-search-words:
        - 提取图片
        - 爬取图片
        - 网页解析
        - 抓取图片
        - 爬虫
        - scrape
        - extract
        - image
        - 下载
  /webparse/metadata:
    get:
      tags:
        - WebParse
      summary: 提取网页元数据
      description: >-
        想在应用里做链接预览卡片？这个接口帮你一键获取网页的标题、描述、图标等信息。


        ## 功能概述

        提供一个网页 URL，返回该页面的元数据，包括标题、描述、关键词、Favicon、Open Graph 信息等。非常适合用于生成链接预览卡片或做
        SEO 分析。
      operationId: get-webparse-metadata
      parameters:
        - name: url
          in: query
          required: true
          description: 需要提取元数据的网页URL
          schema:
            type: string
            format: uri
            example: https://www.bilibili.com
          x-tooltip: 必须是完整的URL，如 https://www.bilibili.com
      responses:
        "200":
          description: 成功响应
          content:
            application/json:
              schema:
                type: object
                properties:
                  page_url:
                    type: string
                    example: https://www.bilibili.com
                  title:
                    type: string
                    example: 哔哩哔哩 (゜-゜)つロ 干杯~-bilibili
                  description:
                    type: string
                    example: bilibili是国内知名的视频弹幕网站，这里有及时的动漫新番，活跃的ACG氛围，有创意的Up主。大家可以在这里找到许多欢乐。
                  keywords:
                    type: array
                    example:
                      - B站
                      - 弹幕
                      - 视频
                    items:
                      type: string
                  favicon_url:
                    type: string
                    example: https://i0.hdslb.com/bfs/static/jinkela/long/images/512.png
                  language:
                    type: string
                    example: zh-CN
                  author:
                    type: string
                    example: ""
                  published_time:
                    type: string
                    example: ""
                  canonical_url:
                    type: string
                    example: https://www.bilibili.com/
                  generator:
                    type: string
                    example: ""
                  open_graph:
                    type: object
                    example: {}
        "400":
          description: URL参数缺失或无效
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: INVALID_ARGUMENT
                  details:
                    type: object
                  message:
                    type: string
                    example: Missing or invalid 'url' parameter.
        "500":
          description: 服务器内部错误
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: INTERNAL_SERVER_ERROR
                  details:
                    type: object
                  message:
                    type: string
                    example: Failed to parse webpage metadata.
      x-search-words:
        - 元数据
        - metadata
        - 链接预览
        - 网页标题
        - 网页描述
        - favicon
        - og
        - 爬虫
        - 抓取
        - 解析
        - TDK
  /web/tomarkdown/async:
    post:
      tags:
        - WebParse
      summary: 网页转 Markdown
      description: >-
        想把一个网页的内容转成干净的 Markdown 文本？这个异步接口可以帮你搞定，特别适合处理大型或复杂的网页。


        ## 功能概述


        > [!VIP]

        > 本 API 目前处于**限时免费**阶段，未来将转为付费服务。


        提交一个网页 URL，我们会自动抓取主体内容，剔除广告、导航栏等干扰元素，并转换为 Markdown
        格式。同时会提取标题、作者、发布日期等元数据，生成 YAML Front Matter。


        任务提交后会立即返回任务 ID，你可以用它来查询处理进度和结果。单个任务最长处理 60 秒，结果缓存 30 分钟。
      operationId: post-web-tomarkdown-async
      parameters:
        - name: url
          in: query
          required: true
          description: 需要转换的网页URL。URL必须经过编码。
          schema:
            type: string
            example: https://example.com
          x-tooltip: 支持HTTP/HTTPS协议，禁止访问内网地址
      responses:
        "202":
          description: 任务已提交成功，返回任务ID
          content:
            application/json:
              schema:
                type: object
                properties:
                  task_id:
                    type: string
                    description: 任务唯一标识符
                    example: a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6
                  status:
                    type: string
                    description: 任务状态
                    example: pending
                  url:
                    type: string
                    description: 要转换的URL
                    example: https://example.com
                  created_at:
                    type: string
                    description: 任务创建时间（ISO 8601格式）
                    example: 2025-10-13T10:30:45.123456Z
                  message:
                    type: string
                    description: 提示信息
                    example: 任务已提交，请使用task_id查询结果
        "400":
          description: 请求参数错误
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: 缺少参数
                  message:
                    type: string
                    example: url 参数是必需的
                  code:
                    type: integer
                    example: 400
      x-search-words:
        - url转markdown
        - 网页转markdown
        - 异步
        - async
        - tomarkdown
        - 网页抓取
        - 内容提取
        - web scraping
        - 任务队列
  /web/tomarkdown/async/{task_id}:
    get:
      tags:
        - WebParse
      summary: 转换任务状态
      description: |-
        提交了网页转 Markdown 任务后，想知道处理进度和结果？用这个接口来查询。

        ## 功能概述
        通过任务 ID 查询转换任务的当前状态、处理进度和最终结果。任务结果缓存 30 分钟，期间可重复查询。

        ## 任务状态

        | 状态 | 说明 |
        |------|------|
        | `pending` | 等待处理 |
        | `processing` | 处理中 |
        | `completed` | 已完成，可获取结果 |
        | `failed` | 失败 |
        | `timeout` | 超时（超过 60 秒） |

        > [!NOTE]
        > 建议每 2-5 秒轮询一次，当状态为 `completed`、`failed` 或 `timeout` 时停止轮询。
      operationId: get-web-tomarkdown-async-status
      parameters:
        - name: task_id
          in: path
          required: true
          description: 任务ID（由提交接口返回）
          schema:
            type: string
            example: a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6
      responses:
        "200":
          description: 成功获取任务状态（包含各种状态的响应）
          content:
            application/json:
              schema:
                anyOf:
                  - title: 任务等待中
                    type: object
                    properties:
                      task_id:
                        type: string
                        example: a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6
                      status:
                        type: string
                        example: pending
                      url:
                        type: string
                        example: https://example.com
                      progress:
                        type: integer
                        example: 0
                      created_at:
                        type: string
                        example: 2025-10-13T10:30:45.123456Z
                      message:
                        type: string
                        example: 任务等待处理
                  - title: 任务处理中
                    type: object
                    properties:
                      task_id:
                        type: string
                        example: a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6
                      status:
                        type: string
                        example: processing
                      url:
                        type: string
                        example: https://example.com
                      progress:
                        type: integer
                        example: 50
                      created_at:
                        type: string
                        example: 2025-10-13T10:30:45.123456Z
                      started_at:
                        type: string
                        example: 2025-10-13T10:30:46.000000Z
                      elapsed:
                        type: number
                        example: 2.5
                      message:
                        type: string
                        example: 任务处理中，请继续轮询
                  - title: 任务完成
                    type: object
                    properties:
                      task_id:
                        type: string
                        example: a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6
                      status:
                        type: string
                        example: completed
                      url:
                        type: string
                        example: https://example.com
                      progress:
                        type: integer
                        example: 100
                      created_at:
                        type: string
                        example: 2025-10-13T10:30:45.123456Z
                      started_at:
                        type: string
                        example: 2025-10-13T10:30:46.000000Z
                      completed_at:
                        type: string
                        example: 2025-10-13T10:30:48.500000Z
                      duration:
                        type: number
                        example: 2.5
                      result:
                        type: object
                        properties:
                          markdown:
                            type: string
                            example: |-
                              ---
                              title: "示例页面"
                              author: "作者名"
                              ---

                              # 示例页面

                              这是转换后的Markdown内容...
                          size:
                            type: integer
                            example: 1234
                  - title: 任务失败
                    type: object
                    properties:
                      task_id:
                        type: string
                        example: a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6
                      status:
                        type: string
                        example: failed
                      url:
                        type: string
                        example: https://example.com
                      progress:
                        type: integer
                        example: 100
                      created_at:
                        type: string
                        example: 2025-10-13T10:30:45.123456Z
                      started_at:
                        type: string
                        example: 2025-10-13T10:30:46.000000Z
                      completed_at:
                        type: string
                        example: 2025-10-13T10:30:48.000000Z
                      duration:
                        type: number
                        example: 2
                      error:
                        type: string
                        example: "网络连接失败: connection timeout"
        "404":
          description: 任务不存在或已过期
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: 任务不存在
                  message:
                    type: string
                    example: 未找到指定的task_id，任务可能已过期（30分钟TTL）
                  code:
                    type: integer
                    example: 404
      x-search-words:
        - 查询任务
        - 任务状态
        - 异步结果
        - task status
        - 轮询
        - polling
  /api/store:
    post:
      tags:
        - Clipzy 在线剪贴板
      summary: 步骤1：上传加密数据
      description: >-
        这是所有流程的第一步。您的客户端应用需要先在本地准备好
        **加密后的数据**，然后调用此接口进行上传。成功后，您会得到一个用于后续操作的唯一ID。


        > [!NOTE]

        > 您发送给此接口的应该是**密文**，而不是原始文本。请参考文档首页的JavaScript示例来了解如何在客户端进行加密。
      operationId: post-clipzy-store
      parameters: []
      responses:
        "200":
          description: 片段创建成功！返回该片段的唯一ID。
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    description: 用于构建分享链接的唯一 ID。
                    example: PREF0Zv8Yj
        "400":
          description: 请求体缺失、格式错误或参数无效。
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Invalid request body or parameters.
                  details:
                    type: string
                    example: Field 'compressedData' is required.
        "413":
          description: 请求体过大。上传的数据（压缩后）超过了服务器限制。
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Payload too large.
                  details:
                    type: string
                    example: Data exceeds the 8MB limit for the given TTL.
      requestBody:
        description: 包含加密数据和可选的TTL。
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                compressedData:
                  type: string
                  description: 必需：经过加密和 LZString 压缩后的 Base64 字符串。请参考文档首页的JS代码示例。
                  example: PIZQqgLgUgNg6gEQEYAUCuBrA7gSQBoDMAiigPakCOAYgQIYBKEA7AFbABqAEiAJYBmAYSJUAznHbsAcgBMBAFQDSAegCcALz4BZKHDwql9DADtOCqvQCCATQowAWhgVgYAUwBMAFgC8QA==
                ttl:
                  type: number
                  description: 可选：片段的留存时间（秒）。正数表示秒数（最大约30天），-1 表示永久存储。默认为 3600。
                  example: 3600
              required:
                - compressedData
      x-search-words:
        - clipzy
        - paste
        - 剪贴板
        - 加密
        - 分享文本
        - 阅后即焚
        - store
        - create
      servers:
        - url: https://paste.sdjz.wiki
  /api/get:
    get:
      tags:
        - Clipzy 在线剪贴板
      summary: "步骤2 (方法一): 获取加密数据"
      description: |-
        **此接口用于“最高安全等级”方法。**

        您提供第一步中获得的ID，它会返回存储在服务器上的**加密数据**。您需要在自己的客户端中，使用您自己保管的密钥来解密它。
      operationId: get-clipzy-get
      parameters:
        - name: id
          in: query
          required: true
          description: 片段的唯一 ID。
          schema:
            type: string
            example: PREF0Zv8Yj
      responses:
        "200":
          description: 获取成功！返回加密并压缩后的数据。
          content:
            application/json:
              schema:
                type: object
                properties:
                  compressedData:
                    type: string
                    description: 加密并使用 LZString 压缩后的 Base64 数据。
                    example: PIZQqgLgUgNg6gEQEYAUCuBrA7gSQBoDMAiigPakCOAYgQIYBKEA7AFbABqAEiAJYBmAYSJUAznHbsAcgBMBAFQDSAegCcALz4BZKHDwql9DADtOCqvQCCATQowAWhgVgYAUwBMAFgC8QA==
        "400":
          description: 请求参数错误，通常是缺少 `id` 参数。
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Invalid or missing ID.
        "404":
          description: 片段未找到。它可能已过期、被删除或ID不正确。
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Paste not found.
      x-search-words:
        - clipzy
        - paste
        - 剪贴板
        - 加密
        - 获取文本
        - get
        - retrieve
      servers:
        - url: https://paste.sdjz.wiki
  /api/raw/{id}:
    get:
      tags:
        - Clipzy 在线剪贴板
      summary: "步骤2 (方法二): 获取原始文本"
      description: |-
        **此接口用于“方便自动化”方法。**

        您提供第一步获得的ID，并附上您自己保管的**解密密钥**作为 `key` 参数。服务器会直接为您解密，并返回纯文本内容。

        > [!IMPORTANT]
        > 查看文档首页的 **cURL 示例**，了解此接口最典型的用法。
      operationId: get-clipzy-raw
      parameters:
        - name: id
          in: path
          required: true
          description: 片段的唯一 ID。
          schema:
            type: string
            example: PREF0Zv8Yj
        - name: key
          in: query
          required: true
          description: 用于解密的 Base64 编码的 AES 密钥。
          schema:
            type: string
            example: ES9tGP0v3e7oqzmAk3vMboxVOOBlvw9RS3DszeW675k=
          x-tooltip: 此密钥由客户端在创建加密片段前自行生成，不由服务器提供。请参考文档中的“客户端工作流程”部分。
      responses:
        "200":
          description: 解密并获取成功！响应体为纯文本内容。
          content:
            text/plain:
              schema:
                type: string
                example: Ciallo～(∠・ω< )⌒★
        "400":
          description: 请求参数错误，缺少 ID 或密钥。
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Invalid or missing ID/key.
        "403":
          description: 禁止访问。提供的密钥无法解密对应的数据。
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: "Forbidden: incorrect key."
        "404":
          description: 片段未找到。它可能已过期、被删除或ID不正确。
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Paste not found.
      x-search-words:
        - clipzy
        - paste
        - 剪贴板
        - 解密
        - 原始文本
        - raw
        - plaintext
      servers:
        - url: https://paste.sdjz.wiki
  /search/aggregate:
    post:
      tags:
        - 智能搜索
      summary: 智能搜索
      description: "想在你的应用中集成搜索功能？我们提供了一个强大的搜索引擎API，让你可以轻松实现实时网页搜索。


        ## 功能概述


        UAPI Pro Search
        是一个智能搜索引擎，采用机器学习算法对搜索结果进行智能排序，确保最相关的内容排在前面。你可以用它搜索任何关键词，也可以限定在特定网站或特定文件\
        类型中搜索。


        - **实时网页搜索**: 毫秒级响应，快速返回搜索结果

        - **智能排序**: 采用机器学习回归排序算法，结果更精准

        - **时间排序**: 支持按发布时间排序，获取最新内容

        - **时间范围过滤**: 支持按天/周/月/年过滤结果

        - **站内搜索**: 支持 `site:` 操作符，在指定网站内搜索

        - **文件类型过滤**: 支持 `filetype:` 操作符，快速找到 PDF、Word 等特定格式文件


        > [!VIP]

        > 本API目前处于**限时免费**阶段，我们鼓励开发者集成和测试。未来，它将转为付费API，为用户提供更稳定和强大的服务。

        \      "
      operationId: post-search-aggregate
      parameters: []
      responses:
        "200":
          description: 搜索成功，返回经过AI排序的高质量结果
          content:
            application/json:
              schema:
                type: object
                properties:
                  query:
                    type: string
                    description: 实际执行的搜索查询
                    example: Go最新的版本是多少
                  total_results:
                    type: integer
                    description: 搜索结果总数
                  results:
                    type: array
                    description: 搜索结果列表
                    items:
                      type: object
                      properties:
                        title:
                          type: string
                          description: 结果标题
                        url:
                          type: string
                          description: 结果链接
                        snippet:
                          type: string
                          description: 结果摘要/描述
                        domain:
                          type: string
                          description: 来源域名
                        source:
                          type: string
                          description: 搜索引擎标识
                        position:
                          type: integer
                          description: 原始排名位置
                        score:
                          type: number
                          description: 综合得分 (0-1，经过机器学习排序)
                        publish_time:
                          type: string
                          format: date-time
                          description: 发布时间 (ISO 8601 格式)
                        author:
                          type: string
                          nullable: true
                          description: 作者信息
                  sources:
                    type: array
                    description: 各搜索源的结果统计
                    items:
                      type: object
                      properties:
                        name:
                          type: string
                          example: uapi-search
                        status:
                          type: string
                          example: success
                        result_count:
                          type: integer
                          example: 16
                        elapsed_ms:
                          type: integer
                          example: 1256
                        first_result_host:
                          type: string
                          example: help.aliyun.com
                  process_time_ms:
                    type: integer
                    description: 处理耗时（毫秒）
                  cached:
                    type: boolean
                    description: 结果是否来自缓存
        "400":
          description: 请求参数错误
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: INVALID_REQUEST
                  message:
                    type: string
                    example: 请求参数格式错误
                  timestamp:
                    type: string
                    format: date-time
                    example: 2024-01-15T10:30:00Z
        "401":
          description: 未授权
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: UNAUTHORIZED
                  message:
                    type: string
                    example: 无效的访问令牌
                  timestamp:
                    type: string
                    format: date-time
                    example: 2024-01-15T10:30:00Z
        "429":
          description: 请求过于频繁
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: RATE_LIMIT_EXCEEDED
                  message:
                    type: string
                    example: 请求过于频繁，请稍后重试
                  timestamp:
                    type: string
                    format: date-time
                    example: 2024-01-15T10:30:00Z
        "500":
          description: 服务器内部错误
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: INTERNAL_ERROR
                  message:
                    type: string
                    example: 服务器内部错误
                  timestamp:
                    type: string
                    format: date-time
                    example: 2024-01-15T10:30:00Z
      requestBody:
        description: 包含搜索参数的JSON对象
        required: true
        content:
          application/json:
            schema:
              required:
                - query
              type: object
              properties:
                query:
                  type: string
                  description: 搜索查询关键词，支持中英文
                  example: Go最新的版本是多少
                site:
                  type: string
                  description: 限制搜索特定网站，不需要 `site:` 前缀
                filetype:
                  type: string
                  description: 限制文件类型，不需要 `filetype:` 前缀。支持 pdf、doc、docx、ppt、pptx、xls、xlsx、txt 等
                fetch_full:
                  type: boolean
                  description: 是否获取页面完整正文（会影响响应时间）
                  default: false
                timeout_ms:
                  type: integer
                  description: 请求超时时间（毫秒），范围 1000-30000
                  default: 8000
                sort:
                  type: string
                  description: 排序方式
                  enum:
                    - relevance
                    - date
                  default: relevance
                  x-enumLabels:
                    relevance: 按相关性排序（默认）
                    date: 按发布时间排序，最新优先
                time_range:
                  type: string
                  description: 时间范围过滤
                  enum:
                    - day
                    - week
                    - month
                    - year
                  x-enumLabels:
                    day: 最近24小时
                    week: 最近一周
                    month: 最近一月
                    year: 最近一年
      x-search-words:
        - 搜索
        - search
        - google search api
        - bing search api
        - 网页搜索
        - 搜索引擎
        - 免费搜索api
        - search engine
        - web search
        - 实时搜索
        - 站内搜索
        - site search
        - 文件搜索
        - filetype
        - pdf搜索
      x-seo-optimized-text: 免费网页搜索API接口，可替代Google Search API和Bing Search
        API。提供实时网页搜索、站内搜索、PDF文档搜索、文件类型过滤等功能。采用机器学习智能排序，简单易用，限时免费开放。
      x-seo-keywords:
        - 免费搜索API
        - Google Search API替代
        - Bing Search API替代
        - 网页搜索接口
        - 免费搜索引擎API
        - 站内搜索API
        - PDF搜索API
        - 实时网页搜索
        - search api
        - web search api
        - 机器学习搜索
      x-seo-title: 【限时免费】智能搜索API - Google/Bing Search API替代方案
      x-seo-usage-scenarios: 适合个人开发者、中小企业、创业公司快速集成搜索功能。可替代Google Custom Search
        API、Bing Web Search API等付费服务。支持网站搜索、内容聚合、数据采集、市场分析、学术研究等场景
      x-seo-related-apis:
        - 网页抓取
        - 内容采集
        - 数据分析
        - 文本处理
  /search/engines:
    get:
      tags:
        - 智能搜索
      summary: 搜索引擎配置
      description: "获取 UAPI Pro Search 引擎的详细信息，包括支持的功能特性、参数限制和使用说明。


        ## 功能概述


        此接口返回搜索引擎的完整配置信息，你可以用它来：

        - 了解搜索引擎支持哪些功能（如站内搜索、文件类型过滤等）

        - 获取参数的默认值和限制范围

        - 查看当前引擎版本和可用状态


        适合在应用初始化时调用，或用于动态配置搜索界面。

        \      "
      operationId: get-search-engines
      parameters: []
      responses:
        "200":
          description: 成功返回搜索引擎的详细信息
          content:
            application/json:
              schema:
                type: object
                properties:
                  engine:
                    type: object
                    description: 搜索引擎的基本信息
                    properties:
                      name:
                        type: string
                        description: 引擎标识名称
                        example: uapi-search
                      display_name:
                        type: string
                        description: 引擎显示名称
                        example: UAPI Pro Search
                      description:
                        type: string
                        description: 引擎描述
                        example: UAPI Pro 智能搜索引擎，提供高质量的实时网页搜索和智能摘要
                      available:
                        type: boolean
                        description: 引擎是否可用
                        example: true
                      version:
                        type: string
                        description: 引擎版本号
                        example: "2.0"
                      features:
                        type: array
                        description: 支持的特性列表
                        items:
                          type: string
                        example:
                          - 实时网页搜索
                          - AI智能摘要
                          - 自有机器学习回归排序
                          - "时间排序 (sort: date)"
                          - 时间范围过滤 (time_range)
                          - 站内搜索 (site:)
                          - 文件类型过滤 (filetype:)
                          - 分页浏览
                  limits:
                    type: object
                    description: 搜索结果数量限制
                    properties:
                      default:
                        type: integer
                        description: 默认返回结果数
                        example: 10
                      max:
                        type: integer
                        description: 最大返回结果数
                        example: 100
                  supported_parameters:
                    type: array
                    description: 支持的所有参数说明列表
                    items:
                      type: string
                    example:
                      - query (必需) - 搜索查询
                      - limit (可选) - 返回条数，默认10，最大100
                      - page (可选) - 页码，默认1
                      - site (可选) - 站内搜索，例如：github.com
                      - filetype (可选) - 文件类型，例如：pdf
                      - fetch_full (可选) - 是否获取完整正文
                      - timeout_ms (可选) - 超时时间（毫秒），默认3000
                      - sort (可选) - 排序方式：relevance(相关性) 或 date(时间)
                      - time_range (可选) - 时间范围：day/week/month/year
      x-search-words:
        - 搜索引擎
        - engines
        - 引擎信息
        - API参数
        - 功能列表
        - 配置
  /sensitive-word/analyze:
    post:
      tags:
        - 敏感词识别
      summary: 分析敏感词
      description: "分析单个或多个关键词的敏感程度，返回标准化风险标签与置信度结果。


        > [!VIP]

        > 本API基于先进的分析模型，提供三级缓存策略和并发处理能力。


        ## 功能概述


        - **模型驱动**: 使用先进的分析模型进行语义分析。

        - **高性能**: 采用三级缓存策略（持久化存储 → 统一缓存 → 模型分析），确保高频请求的响应速度。

        - **并发支持**: 支持批量并发处理，单次最多可分析100个关键词。

        - **标准标签**: 返回 `label` 字段，明确区分 `sensitive` 与 `normal`。

        - **分类清晰**: 返回 `category` 字段，用于标识具体风险类别。

        - **置信度输出**: 返回 `confidence` 字段，范围为0.0到1.0。


        ## 响应字段说明


        | 字段 | 类型 | 说明 |

        |------|------|------|

        | `results` | array | 分析结果对象的数组。 |

        | `results[].k` | string | 您在请求中提供的原始关键词。 |

        | `results[].label` | string | 核心判断字段：`sensitive`(敏感)、`normal`(正常)。 |

        | `results[].category` | string |
        风险分类：`safe`(安全)、`threat`(威胁)、`porn`(色情)、`fraud`(欺诈)、`insult`(辱骂)。 |

        | `results[].confidence` | number | 当前分类的置信度，范围0.0到1.0。 |

        | `total` | integer | 本次请求成功分析的关键词总数。 |

        \      "
      operationId: post-sensitive-word-analyze
      parameters: []
      responses:
        "200":
          description: 分析成功
          content:
            application/json:
              schema:
                type: object
                properties:
                  results:
                    type: array
                    items:
                      type: object
                      properties:
                        k:
                          type: string
                        label:
                          type: string
                          enum:
                            - sensitive
                            - normal
                        category:
                          type: string
                          enum:
                            - safe
                            - threat
                            - porn
                            - fraud
                            - insult
                        confidence:
                          type: number
                          minimum: 0
                          maximum: 1
                  total:
                    type: integer
        "400":
          description: 请求参数错误
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: INVALID_PARAMETER
                  message:
                    type: string
                    example: 关键词列表不能为空
        "401":
          description: 未授权访问
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: UNAUTHORIZED
                  message:
                    type: string
                    example: 请求未授权
        "429":
          description: 请求频率超限
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: RATE_LIMIT_EXCEEDED
                  message:
                    type: string
                    example: 请求频率超限
      requestBody:
        description: 包含待检测文本 'keywords' 的JSON对象
        required: true
        content:
          application/json:
            schema:
              required:
                - keywords
              type: object
              properties:
                keywords:
                  type: array
                  description: 要分析的关键词列表，单次最多100个，每个关键词最长50字符。
                  items:
                    type: string
                  example:
                    - 喵
                    - cnm
                    - ccb
      x-seo-optimized-text: 免费敏感词分析API接口，智能检测文本中的敏感内容。支持色情、暴力、辱骂等多维度风险评分。先进的AI模型驱动，适用于内容审核、评论过滤、文本安全检测等场景。
      x-seo-keywords:
        - 免费敏感词分析API
        - 内容审核接口
        - 敏感词检测API
        - 文本风险评估
        - AI内容审核
        - 智能过滤API
        - 敏感内容识别
      x-seo-title: 免费敏感词分析API接口 - AI驱动内容审核服务
      x-seo-usage-scenarios: 适用于社交平台内容审核、评论系统过滤、论坛管理、直播弹幕审核、UGC内容检测、文本安全防护、智能客服等场景
      x-seo-related-apis:
        - 文本处理
        - 内容分析
        - AI服务
        - 安全工具
  /sensitive-word/analyze-query:
    get:
      tags:
        - 敏感词识别
      summary: 敏感词分析 (GET)
      description: 通过URL查询参数分析单个关键词，便于GET请求调用。
      operationId: get-sensitive-word-analyze-query
      parameters:
        - name: keyword
          in: query
          required: true
          description: 要分析的关键词，最长50字符。
          schema:
            type: string
          example: 喵
      responses:
        "200":
          description: 分析成功
          content:
            application/json:
              schema:
                type: object
                properties:
                  results:
                    type: array
                    items:
                      type: object
                      properties:
                        k:
                          type: string
                        label:
                          type: string
                          enum:
                            - sensitive
                            - normal
                        category:
                          type: string
                          enum:
                            - safe
                            - threat
                            - porn
                            - fraud
                            - insult
                        confidence:
                          type: number
                          minimum: 0
                          maximum: 1
                  total:
                    type: integer
        "400":
          description: 请求参数错误
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: INVALID_PARAMETER
                  message:
                    type: string
                    example: 关键词不能为空
        "401":
          description: 未授权访问
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: UNAUTHORIZED
                  message:
                    type: string
                    example: 请求未授权
  /text/profanitycheck:
    post:
      tags:
        - 敏感词识别
      summary: 敏感词检测（快速）
      description: >-
        在你的社区或应用中，需要来过滤掉不和谐的声音吗？这个接口可以助你一臂之力。


        ## 功能概述


        我们对敏感词检测接口进行了大幅升级，现在采用高效的 **Aho-Corasick
        算法**，实现了多模式字符串匹配。这意味着你不再需要手动编写复杂的正则表达式，系统会自动高效地检测出文本中的所有敏感词。


        ### 主要特性


        - **高性能算法**：基于 Aho-Corasick 算法，单次扫描即可检测多个敏感词模式

        - **简繁体支持**：自动识别和处理简体中文、繁体中文内容

        - **多模匹配**：无需编写正则表达式，系统内置智能匹配逻辑

        - **快速响应**：相比传统方法，检测速度显著提升


        无论是论坛、社交平台还是评论系统，这个接口都能帮你快速构建内容审核功能。
      operationId: post-sensitive-word-quick-check
      parameters: []
      responses:
        "200":
          description: 成功响应
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    example: forbidden
                  original_text:
                    type: string
                    example: 假装是违禁词
                  masked_text:
                    type: string
                    example: 假装是屏蔽后词语
                  forbidden_words:
                    type: array
                    items:
                      type: string
                    example:
                      - 假装是违禁词列表
        "400":
          description: 请求体无效或文本为空
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: INVALID_ARGUMENT
                  details:
                    type: object
                  message:
                    type: string
                    example: Request body is invalid or text is empty.
      requestBody:
        description: 包含待检测文本 'text' 的JSON对象
        required: true
        content:
          application/json:
            schema:
              required:
                - text
              type: object
              properties:
                text:
                  type: string
                  description: 需要检测的文本内容。支持简体和繁体中文。
                  example: 这是一段友善的、不包含任何违禁词的文本。
      x-search-words:
        - 敏感词
        - 违禁词
        - 内容审核
        - 文本审查
        - 过滤
        - profanity
        - censor
        - moderation
        - 脏话
        - 检测
        - aho-corasick
        - 多模匹配
        - 简繁体
        - 算法优化
