This allows us to get labels in any language from a list of Wikidata IDs.
Parameters for call to https://wikidata.org/w/api.php :
action | wbgetentities |
props | labels, descriptions |
ids | [List of Wikidata IDs] |
languages | [List of Language codes] |
languagefallback | |
Use the | symbol to separate multiple values for all parameters
The languagefallback parameter with no value will use all available languages for a fallback. So you will always get a value for each language requested.
Example: get English and French labels for Q10884, Q527 and Q33767
https://www.wikidata.org/w/api.php?action=wbgetentities&props=labels|descriptions&ids=Q10884|Q527|Q33767&languages=en|fr&languagefallback=
Very simple results structure, with Wikidata ID as key to access label and description properties for each requested item