I would like a script to query my Mendeley Desktop for a list of articles. Is this possible (in any scripting language, including shell)? I know there is an API I could use over http, but I need a local query for when I am not connected to the internet.
2 Answers
No, there's no API for that, I'm afraid.
You'd have to pick apart the local database that Mendeley Desktop uses. But this would be precarious, and would break if Desktop changed its internal database format.
A better option might be for you to run a query against the REST API periodically when you're online (perhaps even automatically), and cache the results so that you have them available when you're offline.

- 20,430
- 4
- 39
- 67
-
But, be afraid not! As +lib wrote below, Mendeley Desktop runs HTTP endpoint at port 50002! If you open it in the browser it offers links for the complete list of commands. Once you click on the command - you get web form for parameters of each. This is great! :) – hardyVeles Apr 06 '18 at 11:13
-
@hardyVeles ah cool! Be careful, though: that's not supposed to be a public API, so it might get changed or removed at any time, and it might not do what you expect. – chiastic-security Apr 07 '18 at 14:19
-
@hardyVeles could you please detail your idea in an answer, what is the URL ? can you write a demo on how to use at least on command as an example ? i will be so thankful – KADEM Mohammed Apr 28 '18 at 20:43
-
I have no idea if this is cool by the stackoverflow rules but I made small post on my blog to answer your request: http://blog.veles.rs/mendeley-desktop-http-api/ since it is too big for a comment, and not answer for the main question for sure -- so, feel free to comment there or here if you think I can help you further (as you'll see: I made zero practical tests so far, just wrote some directions/ideas what to look and try) – hardyVeles May 02 '18 at 23:52
In the local folder there is something called Mendeley Desktop API, which you can see used in the OpenOffice plugin https://github.com/Mendeley/openoffice-plugin/blob/master/src/MendeleyDesktopAPI.py . Open the Mendeley client and open http://localhost:50002/ . I have no idea if using it is supported and how stable the API is, I am just looking around myself.

- 2,918
- 3
- 27
- 53