### Get a Quote Source: https://hitokoto.cn/usage This endpoint allows you to fetch a quote. You can filter by sentence type using the 'c' parameter. ```APIDOC ## GET v1.hitokoto.cn ### Description Fetches a quote from the Hitokoto service. Supports filtering by sentence type. ### Method GET ### Endpoint `https://v1.hitokoto.cn/` ### Parameters #### Query Parameters - **c** (string) - Optional - Sentence type (e.g., 'a' for anime, 'b' for manga, 'f' for internet). - **encode** (string) - Optional - Return encoding ('text', 'json', 'js'). Defaults to 'json'. - **charset** (string) - Optional - Character set ('utf-8', 'gbk'). Defaults to 'utf-8'. - **callback** (string) - Optional - Asynchronous function name for JSONP response. - **select** (string) - Optional - Selector for 'js' encoding. Defaults to '.hitokoto'. - **min_length** (integer) - Optional - Minimum length of the quote. Defaults to 0. - **max_length** (integer) - Optional - Maximum length of the quote. Defaults to 30. ### Request Example ``` https://v1.hitokoto.cn/?c=f ``` ### Response #### Success Response (200) - **id** (integer) - Quote identifier. - **uuid** (string) - Unique identifier for the quote, can be used to link to the quote on hitokoto.cn. - **hitokoto** (string) - The quote text. - **type** (string) - The type of the quote (e.g., 'a', 'b', 'f'). - **from** (string) - The source of the quote. - **from_who** (string) - The author of the quote. - **creator** (string) - The user who added the quote. - **creator_uid** (integer) - The user ID of the creator. - **reviewer** (integer) - The identifier of the reviewer. - **commit_from** (string) - How the quote was submitted. - **created_at** (string) - Timestamp when the quote was added. - **length** (integer) - The length of the quote. #### Response Example ```json { "id": 7338, "uuid": "75a45fd4-4f2f-45eb-80cb-6f0a7bcdfaf2", "hitokoto": "用代码表达言语的魅力,用代码书写山河的壮丽。", "type": "f", "from": "一言开发者中心", "from_who": "一言", "creator": "DreamOne", "creator_uid": 9209, "reviewer": 4756, "commit_from": "web", "created_at": "1621833280", "length": 22 } ``` ### Related Links #### Quote Detail Link ``` https://hitokoto.cn?uuid=75a45fd4-4f2f-45eb-80cb-6f0a7bcdfaf2 ``` ``` -------------------------------- ### 获取句子接口请求示例 Source: https://hitokoto.cn/usage 使用此URL向一言接口请求类型为'f'(来自网络)的句子。 ```text https://v1.hitokoto.cn/?c=f ``` -------------------------------- ### 一言完整信息链接示例 Source: https://hitokoto.cn/usage 通过提供的UUID,可以构建一个链接,指向一言服务网站上该句子的完整信息页面。 ```text https://hitokoto.cn?uuid=75a45fd4-4f2f-45eb-80cb-6f0a7bcdfaf2 ``` -------------------------------- ### 一言接口JSON返回值示例 Source: https://hitokoto.cn/usage 这是向一言接口发出请求后返回的JSON格式的句子信息,包含ID、内容、来源、作者等字段。 ```json { "id": 7338, "uuid": "75a45fd4-4f2f-45eb-80cb-6f0a7bcdfaf2", "hitokoto": "用代码表达言语的魅力,用代码书写山河的壮丽。", "type": "f", "from": "一言开发者中心", "from_who": "一言", "creator": "DreamOne", "creator_uid": 9209, "reviewer": 4756, "commit_from": "web", "created_at": "1621833280", "length": 22 } ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.