Search code examples
phpmediawikiwikipedia-apiwiktionary

How to query Wiktionary API and get part of speech


I'd like to get the part of speech and maybe the definition for English words.

I found a link like this: http://en.wikipedia.org/w/api.php?action=query&list=search&srwhat=text&srsearch=don%27t

but it doesn't seem to get me the results I see on Wiktionary for the word "don't".

Do you know any url where I can query the api to search for a word?


Solution

  • http://en.wiktionary.org/w/api.php?format=xml&action=query&titles=don%27t&rvprop=content&prop=revisions&redirects=1

    This is the right url to query.