使用 github API 搜索与主题对应的存储库时,您不能指定日期范围吗?



您将使用githubapi搜索具有注册主题的存储库。

然而,由于搜索结果限制为1000,我想搜索日期作为限制。如下图所示。

https://api.github.com/search/repositories?q=topic:AAA&创建日期:2020-10-11

自从我忽略了日期并搜索后,还有其他方法吗?

我想请你帮忙。非常感谢。

您的查询中有几个问题:

  • 正确的搜索查询项是created(不是createdat(

  • 搜索查询参数由如下空格分隔:

    topic:AAA created:2020-10-11
    

您的查询将是:https://api.github.com/search/repositories?q=topic:AAA%20created:2020-10-11

来自文档:

您可以搜索比其他日期早或晚的日期,或者通过使用>gt;=<lt;=,和范围查询。日期格式必须遵循ISO8601标准,即YYYY-MM-DD(年月日(。

几个例子:

  • 创建日期:

https://api.github.com/search/repositories?q=topic:AAA%20created:%3E2017-10-11

  • 创建日期:

https://api.github.com/search/repositories?q=topic:AAA%20created:2017-01-01.2018-01-01

最新更新