是否可以在Wikipedia API中查询包含特定模板的文章?该文档未描述将搜索结果过滤到包含模板的页面的任何操作.具体来说,我是在包含的页面之后Template:Persondata.之后,我希望能够检索该特定模板,以便为openancestry.org项目填充族谱数据.
下面的查询显示Albert Einstein页面包含Persondata模板,但它不返回模板的内容,我不知道如何获取包含模板的页面标题列表. http://en.wikipedia.org/w/api.php?action=query&prop=templates&titles=Albert%20Einstein&tlcontinue=736|10|ParmPart
返回:
<api>
<query>
<pages>
<page pageid="736" ns="0" title="Albert Einstein">
<templates>
...
<tl ns="10" title="Template:Persondata"/>
...
</templates>
</page>
</pages>
</query>
<query-continue>
<templates tlcontinue="736|10|Reflist"/>
</query-continue>
</api>
Run Code Online (Sandbox Code Playgroud)
我怀疑我无法从API获得我需要的东西,但我希望我错了,并且有人已经在这条道路上开辟了道路.