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
Try using
http://en.wikipedia.org/w/api.php?action=query&list=search&srsearch=...
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
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=...
>
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
Hi All,
I have started working on music project which uses data from wikipedia for Artist and Album related information. Wanted to know your opinion if this is the right way to do it.
Getting data for Artist - I am using http://en.wikipedia.org/w/api.php?action=query&prop=revisions&rvprop... API call to fetch data for Bio and baseball card information for the Artist.
Getting Album data for each artist - I will be using same API to fetch Discography information for the Artist.
Image Fetch - Open Items for me are to fetch images for artists and album art. Has anyone already done a similar kind of work, where we can download images related to particular category instead of getting complete wiki dump. In my case, I just want to have all images related to Artists and Album. Or if it’s possible I could query runtime to fetch image urls from wiki.
We have extensive caching in place to make sure we are not doing un-necessary wiki API hits. Any thoughts/feedback is appreciated.
Thanks Param
Hi All,
This is a follow up post on my previous question. How can I download images from wikimedia by title or category? Is there a way I can have delta updates after the initial dump.
Any pointers will be helpful.
Thanks Param
Hi All,
Can anyone please tell me what’s the throttling requirement for wikipedia API? I remember reading it somewhere it’s 100,000 per day. Also, is there per hour limit for accessing the API calls ?
Thanks for the help!
-param
On Tue, Aug 23, 2011 at 8:26 PM, Sethi, Parampreet parampreet.sethi@teamaol.com wrote:
Hi All,
Can anyone please tell me what’s the throttling requirement for wikipedia API? I remember reading it somewhere it’s 100,000 per day. Also, is there per hour limit for accessing the API calls ?
There are no hard and fast limits. We usually tell people that if you don't parallelize your requests but wait for one request to finish before you launch the next, you'll usually be fine. Also, you should always put some kind of identifying information or contact info in your User-Agent header so we can contact you if your client causes problems.
There are rate limits in MediaWiki, but they apply equally to the API and the UI. They're only for editing, moving and rolling back stuff though, not for retrieving information.
Roan
Thanks for the quick reply Roan.
We are retrieving data from mediawiki and wikipedia servers and have very good caching mechanism in place. Just wanted to make sure in case there is such limit we are respecting that.
Thanks Param
On 8/23/11 2:40 PM, "Roan Kattouw" roan.kattouw@gmail.com wrote:
On Tue, Aug 23, 2011 at 8:26 PM, Sethi, Parampreet parampreet.sethi@teamaol.com wrote:
Hi All,
Can anyone please tell me what¹s the throttling requirement for wikipedia API? I remember reading it somewhere it¹s 100,000 per day. Also, is there per hour limit for accessing the API calls ?
There are no hard and fast limits. We usually tell people that if you don't parallelize your requests but wait for one request to finish before you launch the next, you'll usually be fine. Also, you should always put some kind of identifying information or contact info in your User-Agent header so we can contact you if your client causes problems.
There are rate limits in MediaWiki, but they apply equally to the API and the UI. They're only for editing, moving and rolling back stuff though, not for retrieving information.
Roan
Mediawiki-api mailing list Mediawiki-api@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
mediawiki-api@lists.wikimedia.org