wikipedia api search titles generator

2019-04-09 10:39发布

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?

1条回答
We Are One
2楼-- · 2019-04-09 11:32

"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

查看更多
登录 后发表回答