2011/2/13 Mohamed Mahir Ahamed Ibrahim <mahi...@gmail.com>: > Hi > > I wish to have a querystring with sectionname=Name of the section. Is it > possible? or how can i acheive. > You can't do this directly, because there are all sorts of problems with section names (duplicate names, for one thing). However, you can retrieve the contents of a section by its number, by appending e.g. &rvsection=3 to the normal page content query to get the content of the 3rd section. You'd first have to look up the section number in the section tree though.
Example: http://en.wikipedia.org/w/api.php?action=parse&page=Barack_Obama&prop=sections <s toclevel="3" level="4" line="Health care reform" number="4.2.2" index="15" fromtitle="Barack_Obama" byteoffset="89649" anchor="Health_care_reform" /> So the section called "Heath care reform" (line field) has number 15 (index field). http://en.wikipedia.org/w/api.php?action=query&prop=revisions&titles=Barack_Obama&rvprop=content&rvsection=15 returns the content of the section on health care reform. Roan Kattouw (Catrope) _______________________________________________ Mediawiki-api mailing list Mediawiki-api@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-api