Can't you specify a date range when searching the repository corresponding to topic using github api?

Viewed 1403
1 Answers

There are a few issues in your query :

  • the correct search query term is created (not createdat)

  • the search query parameters are delimited by spaces like this :

    topic:AAA created:2020-10-11
    

Your query would be : https://api.github.com/search/repositories?q=topic:AAA%20created:2020-10-11

From the doc :

You can search for dates that are earlier or later than another date, or that fall within a range of dates, by using >, >=, <, <=, and range queries. Date formatting must follow the ISO8601 standard, which is YYYY-MM-DD (year-month-day).

A few examples:

  • created after date:

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

  • created between date:

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

Related