LingQ API

You can find the LingQ API here, http://www.lingq.com/lingq_api/details/.

1 Like

Thanks very much, LingQ, for opening the independent access to our lingQs! I think it is both a bold but needed step. It will sure benefit the community, and I hope it will also be advantageous for LingQ. Thanks again.

I do not understand what is the goal of this ?
What will people be able to do now that they could not do before ?

I think Mark just added the opportunity to have thousands of programmers at his disposal rather than just a handful.

Will you get Polish sooner now, do you think?

That’s right. Now any programmers can develop applications which can interact with LingQ using our API. Let’s see what you come up with! :slight_smile:

Can’t wait to try it out!!! if I wasn’t so busy :frowning:
Only one question: At which url can we replace the Lesson ID to return the lesson’s text?

I’m no programmer… I can turn thing bold with html… that’s about it lol

I don’t know how to use API. Do I need to know Java or something?

You don’t have to know Java. It looks like all one needs is a program called Curl to be installed on her/his computer. If you are on Mac, or on Linux, you most probably have it already installed. On Windows, you usually have to find it and install yourself (it is free) As far as I see from the first, the Login example of the API, because of this Login, we need a version that supports a secure connections (https). Therefore, among many versions of the Curl for Windows, we need a so called ssl-compiled Curl. (or something like that - I am very far from being a specialist in that, and cannot, actually, advise).

The examples given in the API are all for the Curl. With the Curl and this API you should be able, for example, extract all your lingQs or/end hints programmatically (and without opening the LingQ) .What you’d do with what you extract is up to you. How you will do it is also up to you, and here you may use Java or whatever you know.

It looks like you can try relatively easy make some toys for yourself, to use on your computer only. It must be much harder to create applications distributable to other people. Because the other people may and may not have the Curl installed on their computers, but your application must run in either case.

  1. I would like to ask Mark or the LingQ’s programmers, if I see it (what I have written) correctly. If yes, include the info about Curl in the API .
  2. Are there other methods, except Curl, to use this API? Thanks.

Ilya_L,
Thank you for telling me about Curl.
I am going to read the following page:
http://groups.csail.mit.edu/cag/curl/wwwpaper.html

I’ll leave this to the more technical, I don’t need something else taking me away from more language study. :slight_smile:

@ktm - right now there is no API to return the lesson text. That will come eventually.

@everyone - I don’t understand most of this stuff myself. I assume developers can just figure it out! :slight_smile: I will try and get one of our developers to follow this thread and chime in.

Can’t wait to try it out!!! if I wasn’t so busy :frowning:
Only one question: At which url can we replace the Lesson ID to return the lesson’s text?

Currently, there’s no such method/url. We can add it if neccessary.

I don’t know how to use API. Do I need to know Java or something?

You can access the API from any programming language that has library for HTTP interaction. Java, Python, C, C++, Objective-C, Lisp, Erlang, Scala.

Curl is used in examples just because it’s a very convenient tool for playing/experimenting with the API from the command line. We’ll provide an example in Python later.

Meanwhile, you can read a short tutorial on using curl for HTTP scripting here: curl - The Art Of Scripting HTTP Requests Using Curl

I would like to have some API for updating statistics (Words of Reading, Words of Writing, Hours of Listening, Hours of Speaking)

I’m joining to the Rasana’s request and would like to have some more API to read current value of Known Words, LingQs Created and LingQs Learned indicators. It would be enough to create more detailed and valuable statistics of my day by day work and progress. I love charts :wink:

I was thinking that some sort of output to excel of our LingQ activity statistics would be useful some day.I love charts too :wink:

For those of us who are familiar with .NET languages, here is a simple Rest client project written in C#: Simple REST Client – James Crisp The main benefit would be to learn how to create and consume http protocol messages if the python examples on the api page won’t help you.

Also, quick question on the apikey, since this key is tied to a specific account. Does it expire? Or is the generated apikey always going to be the same apikey for a specific account? I just ask because, since the login method of the api was removed, the user will have had to have physically logged into the LingQ website, and copied a giant GUID into their mobile device before they can use the software to interact with the API. There does not seem to be an eloquent way to acquire the apikey programmatically.

Other than that, it seems like you have a good foundation for an api which I certainly hope you will expand. I especially like that we can choose the format we wish to receive the data in (I’m a fan of xml myself).

As a feature enhancement perhaps you can add the lingq status as a parameter so instead of getting ALL LingQs back we can retrieve them per status?