Try using

Note you can change the parameter (srwhat) to search for the words only in the Title of the article or the text or near match.

Parse it to get the element called title.

That should work.


On 8/5/11 11:33 AM, Dalkandura Arachchige Gunaratna wrote:
   I want to search Wikipedia and get first search result (in fact only the title of the result). Could someone tell me what is the API call that I need to use in MediaWiki API?

  I tried "query" and "opensearch" calls but they didn't return the results I expected. They didn't return any search result. The title I used was "Anatomical structure". The requirement is that I need to access (get) the title of the first search result.

Kalpa Gunaratna

Mediawiki-api mailing list

Prateek Jain
Research Assistant, Kno.e.sis Center
Wright State University
Fairborn,Ohio 45435