I have noticed that for some articles despite Wikidata link appears when viewing article, API results returns no Wikidata ID.
<?xml version="1.0"?> <api batchcomplete=""> <query> <pages> <page _idx="8198125" pageid="8198125" ns="0" title="100 км ж/д"> <pageprops wikibase_item="Q17121960" /> </page> <page _idx="9042787" pageid="9042787" ns="0" title="Бекет (Курская область)" /> </pages> </query> </api>
In this example, page #8198125 returns correct result (Q17121960), page #9042787 returns nothing, while should return Q19685645.
Of course, to catch this bug you should act quickly because any change to article or item can ruin glitch state.
This report may be related to T233520.