API Github - Search repositories - sort updated - Format timestamp

Guys,

I need to make a request ordering by “updated” and that the “updated” is greater than X.

I tried to put in place of “X” several types of timestamp / date and none got success.

Format:

“2019-03-31T00:45:57Z”

2019-03-31T00:45:57Z

31/03/2019

31.03.2019

Request:

https://api.github.com/search/repositories?q=topic:data-science+updated:>=X&sort=updated&order=desc&page=1&per_page=100

The documentation shows that I can sort by “updated”, but it doesn’t show how to search for “updated”.

Search - GitHub Docs

1 Like

@gabrieldeoliveiraestevam

Kindly have a look at this

If you are using repository type in a search query you can use pushed instead of updated.

The query which you were expecting should be something like this

https://api.github.com/search/repositories?q=topic:data-science+pushed:>2019-03-31&sort=updated&order=desc&page=1&per_page=10

PFA

1 Like

@ parithiban

I need to put the same question in both the query and the sort. That is, I need to put.

pushed:>=X&sort=pushed

or

updated:>=X&sort=updated

However, I am not able to do this.

My idea is as follows. API limits 1000 records per request correct? then, after going through the 10 pages with 100 records each. I’m going to lose the information from the last record (updated OR pushed) and do a new search with the timestamp of that last record.