Url and docs for 3.0 API?

I’m still not sure what are you refering to with the code. Also it would be nice if you could paste whatever error you are getting and where.

Code and the error message based on a file with an API key.
Misc 2025_Mar_24--21_07 48

These work amazingly well. Thanks a lot. I’ve been looking to show this statisitic easily on a second machine for a long time.

https://www.lingq.com/api/v3/el/progress/chart_data/?metric=reading&period=today

https://www.lingq.com/api/v3/fr/progress/chart_data/?metric=reading&period=today

https://www.lingq.com/api/v3/ga/progress/chart_data/?metric=reading&period=today

Glad to hear it worked.

I’m not sure if you are still interested but this js code worked for me locally:

async function getStats(lang, period) {
  const endpoint = `https://www.lingq.com/api/v2/${lang}/progress/chart_data/?metric=reading&period=${period}`;

  const response = await fetch(endpoint, {
    method: "GET",
    headers: {
      "Content-Type": "application/json",
      // https://www.lingq.com/en/accounts/apikey/
      // NOTE: Do not remove the TOKEN part of the string!
      // Example: "Authorization" : "TOKEN 7127eabb12bc..."
      "Authorization": "TOKEN FILLME"
    },
  });

  if (!response.ok) {
    console.error(`Error fetching stats for lang ${lang}:`, response.status);
    return;
  }

  const json = await response.json();
  // Do your manipulation here...
  const { name, daily } = json[0];
  console.log(lang, name, daily);
}

async function main() {
  const langs = ["ja", "el", "uk"];
  for (const lang of langs) {
    await getStats(lang, "today");
  }
}

main();

Run in the terminal:

rafa@rafapc ~/d/tmp> node t.js
ja 03/24 0
el 03/24 4
Error fetching stats for lang uk: 404

The error is expected, I am not studying ukrainian.

I am interested but am only semi-technical.
Do I save this as a html file?
How do I run something in the terminal?
I’m hoping to be able to see it on an old second device. URLs work for that.

I am not sure if you could make this work with just a local html and no server. The request will probably be denied by CORS restrictions.

To run the above code in the terminal you will first need node, which is, roughly speaking, the program that runs your js (=javascript) code.

I can not be precise on the instructions because I don’t know what OS runs on your second device (or if it is even a computer). Assuming you are on windows and that you managed to install node, you just will have to paste the above js code on some file (I named mine t.js), and then just type node t.js in the terminal (and then click enter).

Note that you will need to manually enter your API token at the "Authorization": "TOKEN FILLME" line, as described on the above comments, and also customize the line const langs = ["ja", "el", "uk"]; to whatever floats your boat.

Maybe you could try again with chatGPT to see if it can describe each step in a way that suits your setup.

Thanks. I may try it in a few days. (Windows 10 or android).