I'm probably not the best to answer this question (perhaps others who are active in this area could chime in?), but to start the ball rolling:

a) Consider the licencing.

Would your use of the official API code be considered more than mere aggregation? If so, the resulting work is likely to be under the GPL. If this is not acceptable to you, you probably want the MIT-licensed wikibase-sdk/-edit.

b) Does one offer functionality that others don't, which is of use to you?

I *suspect* the official API is oriented primarily towards tasks performed by the UI and other components developed by WMDE. That may mean it is available as part of a MediaWiki site, but it may not cover the use-case you require, or deliver it in a way that you'd like to consume it.

wikibase-sdk seems to support "simplify" functionality as shown in https://github.com/maxlath/wikibase-sdk/tree/main/docs - conversely, if you want to edit, you need https://github.com/maxlath/wikibase-edit instead (but maybe you don't?). Similarly, it looks to have features for returning JSON from SPARQL, if you have a query service. As this is not part of the MediaWiki side of things, it looks like this is not covered in the official API. Some of this is covered in its grant application - https://meta.wikimedia.org/wiki/Grants:Project/Maxlath/WikidataJS

If you can share some aspect of your use-case and/or the expected execution environment (a gadget on a site? A node.js web-app accessing Wikidata remotely? Video game client?) it might help people offer more specific advice.

Best regards,
--
Laurence 'GreenReaper' Parry

From: jm <zauron.subs@gmail.com>
Sent: Monday, October 11, 2021 8:39:57 PM
To: wikibaseug@lists.wikimedia.org <wikibaseug@lists.wikimedia.org>
Subject: [Wikibase] Looking for a Javascript client
 
Hi all,

I'm looking for a javascript client to connect to a wikibase. I've found:
1) Official wikibase javascript client: https://github.com/wikimedia/wikibase-javascript-api
2) Wikibase sdk: https://github.com/maxlath/wikibase-sdk

Which is more recommended? or another library?