Board Thread:API Discussion/@comment-39119615-20190415222624

Hi!

So I'm making a bot atm that supposed to get an input name, type "Luffy", and get an article on the One Piece wiki accordingly. However, it seems to be extremely word for word dependent. For example, if someone sent in "Lucci" in order to get "Rob Lucci", they would instead get something like "Luci". Is there any way more precise of aquiring articles by name using the API other than "apfrom="?

Furthermore, I'm having problems getting article summaries, because a lot of the links I fetch are redirecting links, and hence contain no "body". I tried doing "redirects=", but it appearently doesn't work together with "allpages=".

My goal is from a name get an article, get an image and a summary. The summary and image are obviously based on the article, so hopefully that one would need to be cleaner. I get the image atm using "imageserving=", but I didn't find a function like it for text.

The current formula:

https://onepiece.fandom.com/api.php?format=json&action=query&prop=info&inprop=url&generator=allpages&gapfrom=Luffy

Any help appreciated! 