On Tue, Dec 1, 2015 at 5:13 PM, Dan Garry <dga...@wikimedia.org> wrote:

> An often-cited complaint to me about the Wikidata API is that it's obscure
> and hard to use. Simple things, like needing the QID of a page rather than
> being able to give it a URL of a page from a client wiki, can make a big
> difference to third parties that aren't super familiar with Wikidata.
>

You can use the URL of a page on a client wiki with action=wbgetentities.
Just specify sites and titles parameters, e.g.

https://www.wikidata.org/w/api.php?action=wbgetentities&format=jsonfm&sites=enwiki&titles=Impression%2C%20Sunrise&formatversion=2
or from Special:ApiSandbox,
https://www.wikidata.org/wiki/Special:ApiSandbox#action=wbgetentities&format=json&sites=enwiki&titles=Impression%2C%20Sunrise

I didn't mention this in
https://www.mediawiki.org/wiki/API:Presenting_Wikidata_knowledge because
it's my understanding that entity IDs are more universal.

Cheers,
-- 
=S Page  WMF Tech writer
_______________________________________________
Wikidata mailing list
Wikidata@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata

Reply via email to