Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

wikipedia api search titles generator

Trying to search tiles through the api using a generator. I notice that there are two possible generators, with both I have problems:

  • prefix search - doesn't work well if I have multiple words and the order is reversed in the query (for example "brian adams" would return an answer, however "adams brian" does not
  • search - seems to not allow searching by titles, only by text which returns low-quality results.

Anyone knows of a way around this?

like image 328
Ilan lewin Avatar asked Mar 18 '23 13:03

Ilan lewin


1 Answers

"srwhat=title" is disabled, so you should use "intitle:" in your search query:

https://en.wikipedia.org/w/api.php?action=query&list=search&srnamespace=0&srprop=timestamp&&srsearch=intitle:adams%20brian

for more info please check this page:

https://www.mediawiki.org/wiki/API:Search

like image 196
Arash Avatar answered Mar 23 '23 10:03

Arash