← API.MAO.MS Home简体 · 繁體

Hitokoto — Random Quotes

One random quote per call. English serves 2,132 classic quotes with authors; the Chinese corpus holds 11,267 one-liners in 12 categories, also available in Traditional Chinese (Taiwan / Hong Kong variants).

Endpoints

Method & pathDescription
GET /v1/hitokotoReturns one random quote
GET /v1/hitokoto/categoriesCategory list with per-category counts (Chinese corpus; names follow lang)
ParameterValuesDescription
langen / zh (default) / hant / tw / hkThis page uses en. hant and tw return the Taiwan traditional variant, hk the Hong Kong variant
ca–l, multiple allowedRestrict to categories (comma-separated, e.g. c=d,i). Chinese corpus only
min_lengthinteger ≥ 0Minimum quote length in characters
max_lengthintegerMaximum quote length; returns 404 when nothing matches

Categories: a Anime · b Comics · c Games · d Literature · e Original · f Internet · g Other · h Film & TV · i Poetry · j NetEase Music · k Philosophy · l Humor.

Example response

{"code":0,"message":"ok","data":{"id":42,"hitokoto":"The Superior Man is aware of Righteousness, the inferior man is aware of advantage.","type":null,"type_name":null,"from":null,"from_who":"Confucius","tags":["famous-quotes"],"length":83,"lang":"en"}}
FieldDescription
hitokotoThe quote text
from_whoAuthor / speaker (null when unknown). For Chinese quotes, from carries the source work
tagsTopic tags (English quotes)
type / type_nameCategory key and name (Chinese corpus); null for English
lengthLength of the quote in characters

Try it

Press the button for a quote

The raw JSON response will appear here

Data sources & licensing

Chinese sentences come from the official sentence bundle of the Hitokoto open-source community, hitokoto-osc/sentences-bundle, under AGPL-3.0. This site syncs with upstream regularly, and sentences removed upstream are taken down here as well; every sentence keeps its original source and author attribution. Traditional Chinese variants are converted from the Simplified originals with OpenCC (Taiwan and Hong Kong rule sets) and stored alongside.

English quotes (2,132 in total) are mainly compiled from the dataset of the open-source quotable project (MIT License), merged with the public DummyJSON quotes collection, which is re-synced monthly (additions picked up, removals followed).

Usage statistics

This endpoint group has been called 44 times in total · 0 today · All endpoints

EndpointPathTodayTotal
Hitokoto/v1/hitokoto043
Categories/v1/hitokoto/categories01