On Sat, Dec 31, 2011 at 5:53 PM, kracekumar ramaraju <kracethekingma...@gmail.com> wrote: > http://en.wiktionary.org/w/api.php?format=json&action=query&titles=murky&rvprop=content&prop=revisions&redirects=1 > > yields json contents for the word 'murky'. > [snip] > content['query']['pages']['54377']['revisions][0]['*'] yields meaning and > other related contents. > > > I am interested to retrieve the meaning of the word. how can I do it? > > In this scenario I find api to be unusable since pageid is dynamically > generated which is required to access the contents. > If you pass the &indexpageids=1 parameter, the API will output an array containing the page IDs used in the response. http://en.wiktionary.org/w/api.php?format=json&action=query&titles=murky&rvprop=content&prop=revisions&redirects=1&indexpageids=1
> Yes I can use xml and find contents inside <rev></rev> tag, but how will > some one fetch synonym alone and part of speech alone? > The API does not provide a way to get just the IPA pronunciation, or just the synonyms, or fetch any other semantic information. The only thing that is offered is separation into sections using ==Headers== , for anything else you'll have to extract the information yourself AFAIK. Roan _______________________________________________ Mediawiki-api mailing list Mediawiki-api@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-api