Hi, On 11/20/2015 08:16 AM, [email protected] wrote: > Much of the app will be implemented as REST services in the cloud, and > one item of functionality required will be a REST service that returns > the Q id given a Wikipedia URL (in any language). Another REST service > required will return a Wikipedia URL given a Wikidata Q id and language > code (e.g. "en" or "pt-br"). > > Does anything like this currently exist?
Kind of. <https://en.wikipedia.org/w/api.php?action=query&titles=Douglas%20Adams&prop=pageprops&formatversion=2> maps a page title on the English Wikipedia to its Wikidata Q id. <https://www.wikidata.org/w/api.php?action=wbgetentities&ids=Q42&props=sitelinks> will do the reverse. I'm not aware of anything that converts direct URLs, you'll have to modify the output a little. -- Legoktm _______________________________________________ Wikidata mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/wikidata
