Jump to content

Manual talk:Pywikibot/Create your own script

About this board

Any way to make an API request easily?

5
Automatik (talkcontribs)

Hi, I know there is a pywikibot.data.api module, but could not figure out yet how to use it... Do you have any tip on making an API request to a Wikimedia site? (Looks like the Request class in the data.api module could be used—but how?)

Framawiki (talkcontribs)
Automatik (talkcontribs)

Excellent! Thanks

Xqt (talkcontribs)

pywikibot as multiple tier Levels. Try to get the information from Page or Site object first instead of using the low level api. All the api calls in pywikibot are made by Site objects (with few exceptions I guess)

Automatik (talkcontribs)

Thanks as well; this solution works also well in a similar manner-the difference is that one has to browse site.py instead of browsing xx.yyy.org/w/api.php

Reply to "Any way to make an API request easily?"
There are no older topics