← 返回
未分类 Key

Duolingo Tracker

Fetch and display Duolingo learning stats: streak, XP, league, level, course progress, and daily/weekly summaries. Use this skill whenever the user asks abou...
获取并显示Duolingo学习统计:连续天数、XP、联赛、等级、课程进度以及每日/每周摘要。当用户询问Duolingo学习相关情况时使用此技能。
elmoorish elmoorish 来源
未分类 clawhub v0.1.0 1 版本 100000 Key: 需要
★ 0
Stars
📥 310
下载
💾 0
安装
1
版本
#latest

概述

Duolingo Tracker Skill

Fetch Duolingo user stats via the unofficial Duolingo API. No official API key required — uses the same endpoints the Duolingo web app uses.


Authentication setup

Duolingo does not offer an official public API. The tracker uses the cookie-based session token from an active browser session.

One-time setup:

  1. Log in to duolingo.com in your browser
  2. Open DevTools → Application → Cookies → duolingo.com
  3. Copy the value of the jwt_token cookie
  4. Save it: export DUOLINGO_JWT="your_token_here"

Alternatively the user can provide their username only — a subset of public stats is available without auth.


Base URL

https://www.duolingo.com/2017-06-30

All requests should include:

Accept: application/json
Content-Type: application/json
Authorization: Bearer $DUOLINGO_JWT   # omit if unauthenticated

Fetch user profile and streak

curl -s "https://www.duolingo.com/2017-06-30/users?username=USERNAME&fields=streak,xpGoal,xpGoalMetToday,lingots,totalXp,currentCourse,courses,streakData" \
  -H "Authorization: Bearer $DUOLINGO_JWT" \
  -H "Accept: application/json"

Key fields to surface:

FieldMeaning
------
streakCurrent day streak
streakData.currentStreak.lengthDays in current streak
streakData.longestStreak.lengthAll-time longest streak
totalXpLifetime XP
xpGoalDaily XP goal
xpGoalMetTodayWhether today's goal is met (bool)
courses[].xpXP per language course
courses[].crownsCrowns earned per course
courses[].titleLanguage name

Fetch leaderboard / league info

# Get user ID first from profile, then:
curl -s "https://duolingo-leaderboards-prod.duolingo.com/leaderboards/7d9f5dd1-8423-491a-91f2-2532052038d8/users/USER_ID?get_users_only=true" \
  -H "Authorization: Bearer $DUOLINGO_JWT"

League tiers (low → high): Bronze, Silver, Gold, Sapphire, Ruby, Emerald, Amethyst, Pearl, Obsidian, Diamond.


Fetch XP summary (last 7 days)

curl -s "https://www.duolingo.com/2017-06-30/users/USER_ID/xp_summaries?startDate=YYYY-MM-DD" \
  -H "Authorization: Bearer $DUOLINGO_JWT"

Set startDate to 7 days ago. Returns daily XP totals — use these to show a mini chart or bar summary.


Displaying results

Present stats in this format:

🔥 Streak: 47 days  (longest: 93 days)
⭐ Today: 150 XP / 100 XP goal ✓
📚 Active course: Spanish (es) — 3,420 XP, 42 crowns
🏆 League: Gold  |  Weekly XP: 892

Weekly XP:
Mon ████████ 180
Tue ██████   120
Wed █████    100
Thu ████████ 160
Fri ██████   132
Sat ███      60 
Sun ████████ 140

If the daily goal is not yet met, flag it clearly so the user knows to practice today.


Public stats (no auth required)

For users who don't want to share their JWT, these endpoints work without auth for public profiles:

curl -s "https://www.duolingo.com/users/USERNAME" \
  -H "Accept: application/json"

Returns streak, learning_language, level, totalXp, courses. Fewer fields but sufficient for a quick summary.


Common issues

ProblemFix
------
401 UnauthorizedJWT expired — user needs to re-copy token from browser
Empty streak dataUser hasn't practiced in 7+ days (streak likely 0)
Username not foundCheck exact username (case-sensitive) on duolingo.com/profile
Rate limited (429)Wait 60 seconds before retrying

Privacy note

Always remind the user that their JWT token is sensitive — treat it like a password. Never log it or include it in outputs.

版本历史

共 1 个版本

  • v0.1.0 当前
    2026-05-07 12:11 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

Coursera Progress

elmoorish
使用 Coursera API 获取并展示课程注册、完成进度、成绩、证书以及即将到来的截止日期。在需要时使用此技能。
★ 0 📥 352
ai-agent

Cognitive Compaction State Manager

elmoorish
主动监控令牌利用率,在上下文膨胀导致故障前执行内存压缩操作。
★ 1 📥 494
education

Khan Tutor

elmoorish
使用 Khan Academy 课程分类法和苏格拉底式辅导方法,为解释、练习和提示提供分层支架。在用户想要 ... 时使用此技能。
★ 0 📥 475