that works. Thnx.

Kalpa Gunaratna



----- Original Message -----
From: Prateek <prateek@knoesis.org>
Date: Friday, August 5, 2011 11:37 am
Subject: Re: [Mediawiki-api] How to search for results and get the title
To: mediawiki-api@lists.wikimedia.org

> Try using
>
> http://en.wikipedia.org/w/api.php?action=query&list=search&srsearch=Anatomical%20structure&format=xml
>
> 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.
>
> Prateek
>
> On 8/5/11 11:33 AM, Dalkandura Arachchige Gunaratna wrote:

Hi,
>    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 > Mediawiki-api@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-api 

>
> --  > Prateek Jain > Research Assistant, Kno.e.sis Center > Wright State University > Fairborn,Ohio 45435 > http://knoesis.wright.edu/students/prateek/

> _______________________________________________
> Mediawiki-api mailing list
> Mediawiki-api@lists.wikimedia.org
> https://lists.wikimedia.org/mailman/listinfo/mediawiki-api