Is there any API by which one can get all the categories of a page using the title or page id or url of that page? I tried searching on net but all I could find was getting dumps for specific categories. Any sort of help will be highly appreciated.
Thanks
Is there any API by which one can get all the categories of a
Share
The API you are looking for is here https://en.wikipedia.org/w/api.php
This is the media wiki API and has lots of documentation.
As said above you are looking for prop=categories
so… ?format=xml&action=query&prop=categories&titles=Google for example
https://en.wikipedia.org/w/api.php?format=xml&action=query&prop=categories&titles=Google
If you are looking to use this in a program it may be worth looking at the following Wikipedia page that has a series of classes and libraries for various languages to deal with handling the Wikipedia API e.t.c
Wikipedia:Creating_a_bot#Programming_languages_and_libraries