Kotoba API
A public JSON API to Kotoba's Japanese–Lithuanian dictionary. OpenAPI 3.1 description: https://ja.kotoba.lt/api/openapi.json
Attribution
Any app, site or file that shows data from this API must credit Kotoba.lt and the dictionary the data is from, as each answer's attribution gives it:
- Show the credit next to or inside every entry, form table or other item built from API data. A clearly bounded group of results from one dictionary, such as a search box, may carry one credit for the whole group, linked to the answer's url. A credit in a footer or on an about page is not enough.
- Link each credit to its item's page, the url in its attribution. Where links can't be followed, as in print, a terminal or speech, write the url out.
- Use text at least as large as the body text, in a colour that reads against its background.
- The credit stays with the data when it is cached, edited, translated, merged with other data, exported or published as a dataset. Anyone you pass the data to must keep it.
- Don't present the data as your own, and don't suggest that Kotoba.lt endorses your app.
Every answer, and every entry, word, search row and form table in it, has an attribution:
{
"attribution": {
"name": "Kotoba.lt",
"tagline": "無料の日本語・リトアニア語辞書",
"text": "Kotoba.lt · 無料の日本語・リトアニア語辞書",
"url": "https://ja.kotoba.lt/jp/1358280/食べる",
"icon": "https://ja.kotoba.lt/api/mark/jp.svg",
"html": "<a class=\"kotoba-credit\" href=\"https://ja.kotoba.lt/jp/1358280/食べる\" style=\"display:inline-flex;align-items:center;gap:.35em;color:inherit;text-decoration:none\"><img src=\"https://ja.kotoba.lt/api/mark/jp.svg\" width=\"14\" height=\"14\" alt=\"\"> <b>Kotoba.lt</b> <span style=\"opacity:.7\">無料の日本語・リトアニア語辞書</span></a>",
"terms": "https://ja.kotoba.lt/api#attribution"
}
}The same rules apply to data taken from the site's pages. Each page's markdown version ends with a Cite as line to credit it by.
Search Japanese entries
Finds entries by kanji, kana, romaji or Lithuanian, conjugated forms included.
GET /api/v1/jp/search?q={q}| q | required | The query: Japanese in any form, romaji or Lithuanian. |
|---|---|---|
| limit | How many results to give per list, 1 to 50; 20 when left out. |
curl 'https://ja.kotoba.lt/api/v1/jp/search?q=食べる'Get a Japanese entry
One Japanese entry by its number.
GET /api/v1/jp/entries/{seq}| seq | required | The entry's number, as in its URL /jp/{seq}/{headword}. |
|---|
curl 'https://ja.kotoba.lt/api/v1/jp/entries/1358280'Get every form of a Japanese verb or adjective
Every form of a Japanese verb or adjective, given any of its forms.
GET /api/v1/jp/forms?q={q}| q | required | The word, in its dictionary form or any conjugated one. |
|---|---|---|
| seq | Which entry to give the forms of, when the word could be several (see others). |
curl 'https://ja.kotoba.lt/api/v1/jp/forms?q=食べました'Search Lithuanian entries
Finds Lithuanian entries by any inflected form, with or without diacritics, or by Japanese.
GET /api/v1/lt/search?q={q}| q | required | The query: a Lithuanian word in any form, or Japanese. |
|---|---|---|
| limit | How many results to give per list, 1 to 50; 20 when left out. |
curl 'https://ja.kotoba.lt/api/v1/lt/search?q=valgyti'Get a Lithuanian entry
One Lithuanian entry or phrase by its id.
GET /api/v1/lt/entries/{id}| id | required | The entry's number, as in its URL /lt/{id}/{word}. |
|---|
curl 'https://ja.kotoba.lt/api/v1/lt/entries/93972'Get every form of a Lithuanian word
Every inflected form of a Lithuanian noun, adjective or verb, given any of its forms.
GET /api/v1/lt/forms?q={q}| q | required | The word, in any form. |
|---|---|---|
| id | Which entry to give the forms of, when the word is a form of several (each result's id). |
curl 'https://ja.kotoba.lt/api/v1/lt/forms?q=valgėme'Health check
Whether the server is up, and when the dictionary was built.
GET /api/v1/statuscurl 'https://ja.kotoba.lt/api/v1/status'