3

我不确定是否真的可以这样做,因为我只能找出如何搜索这样的标题:

/api.php?action=query&rvlimit=10&rvprop=content&format=xml&titles=searchterm
4

1 回答 1

5

搜索包含单词 'wikipedia' 的 10 个页面

api.php ? action=query & list=search & srsearch=wikipedia & srprop=timestamp

结果是

<?xml version="1.0"?>
<api>
  <query>
    <searchinfo totalhits="40085" />
    <search>
      <p ns="0" title="Wikipedia" timestamp="2011-02-26T16:43:03Z" />
      <p ns="0" title="French Wikipedia" timestamp="2011-02-27T00:11:59Z" />
      <p ns="0" title="Main Page" timestamp="2011-01-19T19:49:11Z" />
      <p ns="0" title="Regent" timestamp="2011-02-24T03:45:02Z" />
      <p ns="0" title="Blocking of Wikipedia by the People&#039;s Republic of China" timestamp="2011-02-25T03:12:52Z" />
      <p ns="0" title="Nemzeti Bajnokság I" timestamp="2011-02-02T23:27:44Z" />
      <p ns="0" title="Teller–Ulam design" timestamp="2011-02-06T21:54:56Z" />
      <p ns="0" title="Norwegian Wikipedia" timestamp="2011-01-06T18:43:32Z" />
      <p ns="0" title="List of countries and outlying territories by total area" timestamp="2011-02-26T17:31:44Z" />
      <p ns="0" title="2009–2010 ISU Junior Grand Prix" timestamp="2011-02-19T04:24:52Z" />
    </search>
  </query>
  <query-continue>
    <search sroffset="10" />
  </query-continue>
</api>

更多在这里

于 2012-09-08T16:04:36.360 回答