LingQ API

Machor mentioned in a thread about the Android app
“The “/api_v2/en/repetition-lingqs/” link just gives words added to the vocabulary in 5 last days.”
Are there other such new APIs?

Sorry, we have no new API’s at this time. We are taking note of all API requests and will look at them all the next time we have a chance to update the API. Keep the suggestions coming!

2 keke_eo: first you have to decide what do you want from your app exactly and then you just ask if there any way to get something you need. I don’t think such APIs that the one mentioned above have to be added to the list. They bring less information.
By the way, I missed the “http://www.lingq.com/api_v2/language/lingqs/” (without the content_id) in the list of APIs and that is the reason of my stupid question in the other topic.
Is you language level flips back and forth every day?
I think this API request would be enough for the app you want to implement. Are you afraid of the amount of traffic you have to download? If it is because of traffic - make a cache. If it is because of device’s memory - don’t worry, the linkqs in json format do not eat much memory. I have, for example, about 240 words in my vocabulary for now and it takes only 61 Kb in json format to download. And it is in UTF-8 ! Don’t pile the words into vocab, remember them from time to time :wink:
Let’s be realistic - people will never be satisfied with any amount of API features in any system, it’s a human nature )

If you find anything as abusive - I’m sorry. I had no intention to abuse anybody.

I have another suggestion: I think it is essential to add to the “http://www.lingq.com/api_v2/%language%/%lesson_id%/text/” API request the feature to reply with the text marked with “known/unknown”, so that at least the feature enabling users to mark unknown words as linqs can be implemented in mobile app as it is now implemented on the site.

Good points. I thinking of the filter mainly to minimise server load - some the users have tens of thousands of LingQs - but also for viewing on a mobile browser. But you’re right, the filtering can be done client side.

I’m sure my API key will be revoked if I start hammering the server too much :wink: I’ll do testing against a local cache…

I just got more familiar with the “Cloze” test and I have to admit that keke_eo was right about filtering upon the status of the words (the level we know them) regardless of the count of words in your vocabulary. It is a good point and it has to be implemented at least in the sake of your server load. The less words the server sends to client, the less load it will suffer.

So, summarizing all of our suggestions regarding the lingq API function, it would be great to implement the following features (which would reflect the same features on the site):

  1. parameter to set the number of words we want to get in one transaction (in one page)
  2. parameter to set the page number we want to get in current transaction
  3. parameter to set the sorting (alphabetically/status/date added/importance)
  4. parameter to set the filtering by status (words of what statuses we want to get)

Thank you.

Thanks machor. We’ll look into this when we have some time.

Hey guys, if you haven’t been following the “Firefox LingQ Addon” thread we are pretty much under way in the initial stages of creating the Firefox LingQ Addon. We already have proof of concept by using the Vocabulary Highlighter add-on in conjunction with a tool that I wrote to import LingQs into it, to show that we can work with a dictionary of 15,000+ LingQs through a Firefox addon with little effect on performance. Check it out, I think you’ll like it. Our idea is to beef up the vocabulary highlighter addon (or a clone of it) to interface directly with LingQ.

A few enhancements to the API to reduce server load would be a big benefit to both sides however. machors last post (at least 1,2, and 4) would be super beneficial for the add-on, as currently asking the API for all LingQs when there are tens of thousands can take a few minutes, and being able to ask for them in chunks would help avoid timeouts.

Also, please guys, a CreateLingQ method would be stupendous! All it needs is three parameters: term, hint, fragment. We can take care of helping the user get dictionary definitions.

What about a fourth parameter: hint language?

You want your lingqs filtered by what language the hint is in? That’s an interesting idea, what would the applications for such a filter?

Well, I’m only saying this because lingqs now contain this information.

Hey guys, so I’ve been successfully creating LingQs in the system, however I am running into a couple odd scenarios. When sending in the parameters term=sono+venuto+per+quell%60annuncio&hint=I+came+because+of+the+announcement&fragment=sono+venuto+per+quell%60annuncio&apikey=MYAPIKEY, the term cuts off at the apostrophe and I get “sono venuto per quell”, while the fragment, which is the same string shows up fine in its entirety in the phrase. I have my post content type set to “application/x-www-form-urlencoded; charset=utf-8” Its odd, it just seems to be that character that is messing up.

@odiernod - Apparently, the apostrophe symbol you are trying to submit is actually the backtick “`” which is causing the problem.

yeah, I figured that out. For some reason the article I highlighted this on used a backtick instead of an apostrophe. Odd…

Is there a jsonp format option for the json data? I’m facing same-origin policy restriction issues with a javascript app for reviewing vocab (handsfree). Scripts work ok with locally downloaded data.

Is there any news on API doc updates?

It seems the “/api_v2/(language)/repetition-lingqs/” link gives the SRS lists for today and previous 15 days. Not 5 days as previously mentioned.

@keke_eo - Our devs are tied up right now so we will not be updating our API any time soon. You will kind of have to work with what is there now. Yes, the SRS lists are for the last 15 days. That was changed from the previous 5 days.

OK, good to know.

@odiernod - how did you create lingqs?

The documentation for the CreateLingq method is here: http://www.lingq.com/apidocs/api.html#methods unless you had a more specific question in mind.

Thanks, I was looking at the old documentation from the first comment on this thread.

@Mark can you edit that link and/or add a link to the new docs from the old page?