Duolingo

v3.0.0
io.github.udondan/duolingo Checked 2 hours ago Published 3 days ago

Duolingo profile, streak, XP, courses, words and friends; can switch the active course

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

duolingo_get_user_info Get Duolingo User Info

Reads the profile of a Duolingo user (default: the authenticated user): username, full name, bio, location, avatar URL, follower and following counts, learning and UI language, cohort, and more. Use it for who the user is; for the streak use duolingo_get_streak_info, for the courses duolingo_get_courses.

ParameterTypeDescription
response_formatstringOutput format: 'markdown' or 'json'.
usernamestringDuolingo username to query. Defaults to the authenticated user. Use this to look up another user's public data.

duolingo_get_settings Get Duolingo User Settings

Reads the account settings of the authenticated user: notification preferences and follow flags. Changes nothing, and takes no username: other users' settings are not visible. For the profile use duolingo_get_user_info.

ParameterTypeDescription
response_formatstringOutput format: 'markdown' or 'json'.

duolingo_get_streak_info Get Duolingo Streak Info

Reads the streak of a user (default: the authenticated user): current streak in days, daily XP goal, and whether the streak was already extended today. Use it to tell whether a lesson is still needed today; for today's XP and lessons use duolingo_get_daily_xp_progress, for the streak goal and its milestones duolingo_get_streak_goal, for the days with activity duolingo_get_calendar.

ParameterTypeDescription
response_formatstringOutput format: 'markdown' or 'json'.
usernamestringDuolingo username to query. Defaults to the authenticated user. Use this to look up another user's public data.

duolingo_get_daily_xp_progress Get Duolingo Daily XP Progress

Reads today's XP of the authenticated user: daily goal, XP earned today, and the lessons completed today. The result changes as the user learns. For the streak use duolingo_get_streak_info; for the last two weeks duolingo_get_calendar.

ParameterTypeDescription
response_formatstringOutput format: 'markdown' or 'json'.

duolingo_get_languages Get Duolingo Learning Languages

Lists the language courses a user (default: the authenticated user) learns, each with its full name like 'French' and its abbreviation like 'fr'. Most language tools take the abbreviation as `language_abbr`, duolingo_get_language_details takes the name; use this list to convert between them. Languages only: for all courses, Math, Chess and Music too, with XP use duolingo_get_courses.

ParameterTypeDescription
response_formatstringOutput format: 'markdown' or 'json'.
usernamestringDuolingo username to query. Defaults to the authenticated user. Use this to look up another user's public data.

duolingo_get_friends Get Duolingo Friends

Lists the users the authenticated user follows, each with username, display name and total XP. Takes no username. To rank them by XP of this week or month use duolingo_get_leaderboard; for one of them in detail duolingo_get_user_info with their username.

ParameterTypeDescription
response_formatstringOutput format: 'markdown' or 'json'.

duolingo_get_calendar Get Duolingo Activity Calendar

Lists the recent activity of a user (default: the authenticated user), newest first: each entry with time, XP and, where reported, skill and event type, for about the last two weeks, as far as Duolingo keeps them. Covers only the active course (like Spanish, Math or Chess), not all courses. Use it to see on which days the user learned; for today alone use duolingo_get_daily_xp_progress.

ParameterTypeDescription
response_formatstringOutput format: 'markdown' or 'json'.
usernamestringDuolingo username to query. Defaults to the authenticated user. Use this to look up another user's public data.

duolingo_get_leaderboard Get Duolingo Leaderboard

Ranks the users the authenticated user follows by the XP they earned this `unit` (week or month), highest first. Takes no username; the ranking changes as they learn. For the list of friends with total XP use duolingo_get_friends.

ParameterTypeDescription
response_formatstringOutput format: 'markdown' or 'json'.
unitstringTime unit for the leaderboard: 'week' or 'month'.

duolingo_get_courses Get Duolingo Courses

Lists all courses a user (default: the authenticated user) is enrolled in, including Math, Chess and Music: subject, title, XP earned and course id, and for language courses the language code and the language it is taught in. Use it for an overview of all courses, or to find the course to pass to duolingo_switch_course; for language names only use duolingo_get_languages.

ParameterTypeDescription
response_formatstringOutput format: 'markdown' or 'json'.
usernamestringDuolingo username to query. Defaults to the authenticated user. Use this to look up another user's public data.

duolingo_switch_course Switch Duolingo Course

Switches the authenticated user's active course to another language course they are enrolled in. Duolingo returns topics, skills and words only for the active course, so switch first to read another one with the topic tools. This changes the account: the Duolingo apps and website continue with the new course. Switching back undoes it. Find the courses with duolingo_get_courses. Call it only when the user asks to switch or agrees to it. Returns the new active course.

ParameterTypeDescription
language_abbr *stringLanguage to switch to (e.g. 'es' for Spanish).
from_languagestringLanguage the course is taught in (e.g. 'en'). Only needed when the user learns the language from more than one language.
response_formatstringOutput format: 'markdown' or 'json'.

duolingo_get_shop_items Get Duolingo Shop Items

Lists the Duolingo shop catalogue: each item with name, type, price and currency (gems or lingots), and when the user last used it. Only reads, never buys. For the balance to pay with use duolingo_get_currencies.

ParameterTypeDescription
response_formatstringOutput format: 'markdown' or 'json'.

duolingo_get_health Get Duolingo Health (Hearts)

Reads the hearts of the authenticated user: current and maximum hearts, whether a refill is possible, and the time until the next heart. Use it to tell whether the user can start a lesson now; for gems use duolingo_get_currencies.

ParameterTypeDescription
response_formatstringOutput format: 'markdown' or 'json'.

duolingo_get_currencies Get Duolingo Currency Balances

Reads the gem and lingot balances of the authenticated user. Takes no username. For what they buy use duolingo_get_shop_items; for hearts duolingo_get_health.

ParameterTypeDescription
response_formatstringOutput format: 'markdown' or 'json'.

duolingo_get_streak_goal Get Duolingo Streak Goal

Reads the streak goal of the authenticated user: the last goal reached, the upcoming milestones (checkpoints in days), and the next goal selected. For the current streak use duolingo_get_streak_info.

ParameterTypeDescription
response_formatstringOutput format: 'markdown' or 'json'.

duolingo_get_language_details Get Duolingo Language Details

Reads the status of one language for a user, by its full name like 'French': level, points (XP), streak and whether it is the language being learned now. Fails while the active course is not a language course, like Math. Takes the full name; duolingo_get_languages lists the name and abbreviation of each language. For percent to the next level, fluency and skill counts use duolingo_get_language_progress; for all courses at once duolingo_get_courses.

ParameterTypeDescription
language_name *stringFull name of the language (e.g. 'French', 'Spanish').
response_formatstringOutput format: 'markdown' or 'json'.
usernamestringDuolingo username to query. Defaults to the authenticated user. Use this to look up another user's public data.

duolingo_get_language_progress Get Duolingo Language Progress

Reads detailed progress of the authenticated user in one language, by abbreviation like 'fr': level, percent and points to the next level, fluency score, number of skills learned out of all, and more. Use it to report how far a course is; for level and streak of another user use duolingo_get_language_details, for which topics are done duolingo_get_topics.

ParameterTypeDescription
language_abbr *stringAbbreviation of a language the user learns, like 'fr' for French or 'es' for Spanish, as duolingo_get_languages lists them.
response_formatstringOutput format: 'markdown' or 'json'.

duolingo_get_known_words Get Duolingo Known Words

Lists the words (lexemes) the user has learned in one language, without duplicates and sorted alphabetically; it can be several hundred words. Use it for vocabulary, for example to build practice sentences from known words; for topics use duolingo_get_topics. On learning-path courses the words come from the authenticated user's active course: switch with duolingo_switch_course to read another.

ParameterTypeDescription
language_abbr *stringAbbreviation of a language the user learns, like 'fr' for French or 'es' for Spanish, as duolingo_get_languages lists them.
response_formatstringOutput format: 'markdown' or 'json'.
usernamestringDuolingo username to query. Defaults to the authenticated user. Use this to look up another user's public data.

duolingo_get_learned_skills Get Duolingo Learned Skills

Returns the learned skills of one language as full objects in the order they were learned: title, strength (0 to 1), progress in percent, words, and more. The most detailed and largest of the topic tools: for names only use duolingo_get_topics, with `filter: reviewable` for the weak ones. Courses on the learning path report skills only for the authenticated user's active course: switch with duolingo_switch_course to read another.

ParameterTypeDescription
language_abbr *stringAbbreviation of a language the user learns, like 'fr' for French or 'es' for Spanish, as duolingo_get_languages lists them.
response_formatstringOutput format: 'markdown' or 'json'.
usernamestringDuolingo username to query. Defaults to the authenticated user. Use this to look up another user's public data.

duolingo_get_topics Get Duolingo Topics

Lists the names of the topics (skills) of one language, sorted alphabetically: names only. `filter` picks which: `known` (default) the learned ones, `unknown` the ones not learned yet, `golden` the learned ones that are fully mastered (strength 1.0, nothing to review), `reviewable` the learned ones whose strength is below 1.0, so practice would refresh them; golden and reviewable together make up known. For the skills with strength and progress use duolingo_get_learned_skills. Courses on the learning path report skills only for the authenticated user's active course: switch with duolingo_switc…

ParameterTypeDescription
language_abbr *stringAbbreviation of a language the user learns, like 'fr' for French or 'es' for Spanish, as duolingo_get_languages lists them.
filterstringWhich topics to list: 'known' (learned), 'unknown' (not learned yet), 'golden' (learned and fully mastered) or 'reviewable' (learned, strength below 1.0).
response_formatstringOutput format: 'markdown' or 'json'.
usernamestringDuolingo username to query. Defaults to the authenticated user. Use this to look up another user's public data.

duolingo_get_language_voices Get Duolingo Language TTS Voices

Lists the text-to-speech voice names Duolingo has for one language, like 'mathieu'. Reads them from a practice session it requests but never starts or completes, and caches them while the server runs. The language defaults to the first course of the authenticated user. Use the names as `voice` of duolingo_get_audio_url. Empty if Duolingo reports none.

ParameterTypeDescription
language_abbrstringAbbreviation of the language, like 'fr'. Default: the first course of the authenticated user.
response_formatstringOutput format: 'markdown' or 'json'.

duolingo_get_audio_url Get Duolingo Word Audio URL

Builds the URL of the Duolingo text-to-speech audio of a word or phrase, on Duolingo's CDN, which plays without a login. Does not download the audio or check that it exists. Without `voice` it picks a random voice of duolingo_get_language_voices, so the result varies; with `random` false and no voice, the URL has no voice. The language defaults to the first course of the authenticated user. Returns the URL as text.

ParameterTypeDescription
word *stringThe word to get pronunciation audio for (e.g. 'bonjour').
language_abbrstringAbbreviation of the language, like 'fr'. Default: the first course of the authenticated user.
randombooleanWithout `voice`: true picks a random voice of the language, false builds the URL without a voice. Ignored when `voice` is given.
voicestringVoice name from duolingo_get_language_voices, like 'mathieu'. Default: see `random`.