Answers for "wikipedia api"

4

wikipedia api

to search for hell you use hell at the end as a search query.
to set the number of results use thet srlimit , here it is equal to 20
https://en.wikipedia.org/w/api.php?action=query&list=search&prop=info&inprop=url&utf8=&format=json&origin=*&srlimit=20&srsearch=hell
Posted by: Guest on May-08-2021
0

python wikipedia api search

#pip install wikipedia
import wikipedia
question = input("What is your question? ")
print(wikipedia.summary(question))
Posted by: Guest on December-06-2020

Browse Popular Code Answers by Language