Thank you all for the fast reply.
We also enrich wikidata-items but in our particular use case they are not that helpful. We want to enrich our data semantically using the categories given to Wikipedia articles. Unluckily these category pages have no quivalent in wikidata (e.g. "Category:German poets" [1] is attributed to Goethe). Therefore, we need to collect those category pages directly from Wikipedia and so need a persistent URI from there.
Using the mediawiki API in the form of [2] it is easy to extract the page ID for various category pages.
[1] https://en.wikipedia.org/wiki/Category:German_poets [2] https://en.wikipedia.org/w/api.php?action=query&generator=categories&...
Am Dienstag, den 14.04.2020, 13:38 +0100 schrieb Andy Mabbett:
Better still would be to use the Wikidata URI instead:
https://www.wikidata.org/entity/Q5879
with more human-readable equivalent at:
https://www.wikidata.org/wiki/Q5879
You could if you wish simply store the UID, "Q5879".
Given one of the above, the Wikidata API will always return the current Wikipedia URI, in German or any other preferred (or other available, as a fallback) language.