Topic on Help talk:Linksearch

OlafJanssen (talkcontribs)

I was wondering if it possible

1) to call a Linksearch query programmatically via the API and

2 get the results back in json (or even XML) format.

Couldn't find it on this page...

Thanks !

OlafJanssen (talkcontribs)

I found the answer: it can be done via the API: https://www.wikidata.org/w/api.php?action=help&modules=query%2Bexturlusage

For instance on Wikidata, looking for Q-items (namespace=0) that contain URLs with the pattern "https://resolver.kb.nl", max 500 results, as json

https://www.wikidata.org/w/api.php?action=query&eulimit=500&eunamespace=0&euprotocol=https&euquery=resolver.kb.nl&list=exturlusage&format=json

In the External links search webinterface this woud be https://www.wikidata.org/w/index.php?title=Special:LinkSearch&limit=500&offset=0&target=https%3A%2F%2Fresolver.kb.nl

Reply to "API access (json)"