The MediaWiki REST API does not support wikidata.org for all endpoints. Here's a summary:
- https://www.wikidata.org/w/rest.php/v1/page/Q1/bare
- Works
- https://www.wikidata.org/w/rest.php/v1/page/Q1/html
- Returns something weird that is not the page HTML
- https://www.wikidata.org/w/rest.php/v1/page/Q1/with_html
- Same issue as /html
- https://www.wikidata.org/w/rest.php/v1/page/Q1
- 400 content type unsupported
- https://www.wikidata.org/w/rest.php/v1/page/Q1/links/language
- Returns empty array
- https://www.wikidata.org/w/rest.php/v1/page/Q1/links/media
- Works
- https://www.wikidata.org/w/rest.php/v1/page/Q1/history
- Works
- https://www.wikidata.org/w/rest.php/v1/search/page?q=dog
- Works
- https://www.wikidata.org/w/rest.php/v1/search/title?q=dog
- Returns empty pages array. This seems like the expected behavior considering that the page titles on Wikidata are "Q...".
To do: Add a subsection to the Accessing Wikimedia projects using the REST API section of the REST API docs that notes that wikidata.org is not fully supported by the REST API. I don't think it's necessary to describe exactly which endpoints are supported; a general statement should be sufficient to advise users.