{"openapi":"3.0.3","info":{"title":"Learn Catalan open API","version":"1.0","description":"Read-only access to the Learn Catalan dictionary (Catalan words with translations into several languages) and to the Catalan verb conjugator. No key is needed; every origin may call it (CORS). Each client may make a limited number of requests a minute; over the limit the answer is 429 with a Retry-After header. Regional labels come partly from Wiktionary (CC BY-SA 4.0); conjugations are made with verbecc from Verbiste/catverbs data (GPL-2.0-or-later). The API index lists the sources."},"servers":[{"url":"https://langsite.tail828a5c.ts.net/api/v1"}],"paths":{"/languages":{"get":{"summary":"Languages the dictionary is translated into, with word counts","responses":{"200":{"description":"Languages"}}}},"/words":{"get":{"summary":"Search and list dictionary words","parameters":[{"name":"q","in":"query","required":false,"description":"Text to look for in the Catalan word, its translations or the Catalan example.","schema":{"type":"string"}},{"name":"lang","in":"query","required":false,"description":"Comma-separated language codes of the translations to return (default: all).","schema":{"type":"string","example":"en,fr"}},{"name":"topic","in":"query","required":false,"description":"Topic code.","schema":{"type":"string","enum":["greetings","family","food","home","city","work","time","numbers","body","clothes","nature","animals","travel","shopping","feelings","colors","communication","leisure","society","culture","basics"]}},{"name":"level","in":"query","required":false,"description":"CEFR level.","schema":{"type":"string","enum":["A1","A2","B1","B2","C1"]}},{"name":"part_of_speech","in":"query","required":false,"description":"Part of speech.","schema":{"type":"string","enum":["noun","verb","adjective","adverb","pronoun","numeral","preposition","conjunction","interjection","article","phrase"]}},{"name":"variety","in":"query","required":false,"description":"\"central\" hides regional and archaic words, \"regional\" shows only them.","schema":{"type":"string","enum":["central","regional"]}},{"name":"page","in":"query","required":false,"description":"Page number.","schema":{"type":"integer","minimum":1,"default":1}},{"name":"per_page","in":"query","required":false,"description":"Words per page.","schema":{"type":"integer","minimum":1,"maximum":100,"default":20}}],"responses":{"200":{"description":"A page of words","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Word"}},"meta":{"type":"object"},"links":{"type":"object"}}}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/words/{slug}":{"get":{"summary":"One dictionary word, by slug or by the Catalan word itself","parameters":[{"name":"slug","in":"path","required":true,"description":"Slug or Catalan word, e.g. \"anar\".","schema":{"type":"string"}},{"name":"lang","in":"query","required":false,"description":"Comma-separated language codes of the translations to return (default: all).","schema":{"type":"string","example":"en,fr"}}],"responses":{"200":{"description":"The word","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Word"}}}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/conjugations/{verb}":{"get":{"summary":"Every tense and mood of a Catalan verb","parameters":[{"name":"verb","in":"path","required":true,"description":"Infinitive, e.g. \"anar\" or \"rentar-se\".","schema":{"type":"string"}}],"responses":{"200":{"description":"The conjugation","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Conjugation"}}}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/verbs":{"get":{"summary":"Infinitives that start with the given letters (for autocomplete)","parameters":[{"name":"q","in":"query","required":true,"description":"Beginning of the verb.","schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"description":"How many.","schema":{"type":"integer","minimum":1,"maximum":50,"default":10}}],"responses":{"200":{"description":"Infinitives"}}}},"/dictionary.csv":{"get":{"summary":"The whole dictionary as CSV, every language","responses":{"200":{"description":"CSV file","content":{"text/csv":{}}}}}}},"components":{"schemas":{"Translation":{"type":"object","properties":{"translation":{"type":"string"},"example":{"type":"string","nullable":true,"description":"The Catalan example in this language."},"notes":{"type":"string","nullable":true},"reviewed":{"type":"boolean","description":"False for a draft (machine) translation nobody has checked yet."}}},"Word":{"type":"object","properties":{"term":{"type":"string","example":"anar"},"slug":{"type":"string"},"language":{"type":"string","example":"ca"},"part_of_speech":{"type":"string","nullable":true,"enum":["noun","verb","adjective","adverb","pronoun","numeral","preposition","conjunction","interjection","article","phrase",null]},"gender":{"type":"string","nullable":true,"enum":["m","f","mf",null]},"pronunciation":{"type":"string","nullable":true,"description":"IPA typed in by an editor, if any."},"transcription":{"$ref":"#/components/schemas/Transcription"},"topic":{"type":"string","nullable":true},"level":{"type":"string","nullable":true},"example":{"type":"string","nullable":true,"description":"Example sentence in Catalan."},"regional":{"type":"array","items":{"type":"string","enum":["valencian","balearic","northwestern","western","northern","alguerese","dialectal","archaic"]},"description":"Where the word is used instead of Central Catalan (empty for standard words)."},"central_alternative":{"type":"string","nullable":true},"translations":{"type":"object","description":"By language code: uk, en, fr, it, es, pl, de, ar, zh.","additionalProperties":{"$ref":"#/components/schemas/Translation"}},"senses":{"type":"array","description":"The meanings of the word in order, each with its translation per language (the meanings follow the English translation). \"translation\" above is these joined with \";\".","items":{"$ref":"#/components/schemas/Sense"}},"conjugation":{"type":"string","nullable":true,"format":"uri"},"url":{"type":"string","format":"uri"},"api_url":{"type":"string","format":"uri"}}},"Transcription":{"type":"object","nullable":true,"properties":{"ipa":{"type":"string","example":"\u02c8kaz\u0259","description":"Central Catalan, broad IPA, \u02c8 before the stressed syllable."},"cyrillic":{"type":"string","example":"\u043a\u0430\u0301\u0437\u0259","description":"The same in Ukrainian letters, the stressed vowel marked."},"certain":{"type":"boolean","description":"False when the rules had to guess (open or closed e/o, a final -r)."},"source":{"type":"string","enum":["editor","lessons","rules"]}}},"Sense":{"type":"object","properties":{"position":{"type":"integer","example":1},"translations":{"type":"object","additionalProperties":{"type":"object","properties":{"text":{"type":"string"},"reviewed":{"type":"boolean"}}}}}},"Conjugation":{"type":"object","properties":{"infinitive":{"type":"string"},"base_infinitive":{"type":"string"},"pronominal":{"type":"boolean"},"model":{"type":"string","description":"Conjugation model the verb follows."},"verified":{"type":"boolean","description":"Checked by hand against a reference."},"moods":{"type":"object","description":"mood \u2192 tense \u2192 list of {person, form}. Persons: 1s 2s 3s 1p 2p 3p; imperative from 2s; participle ms fs mp fp; infinitive and gerund have no person."},"url":{"type":"string","format":"uri"}}},"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}}}}}}}}
