For finding all repositories that meet some criteria you should limit the results based on when the repositories were created. That is a stable criterion supported. I suggest using the GraphQL version for making it a lot more feasible. What I have found to be quite useful is to use a preconditioner such as making the intervals large for earlier dates (e.g., 2018) and then smaller for more recent periods (e.g., 2017). You can do daily queries as well. Identify how many counts there are in each period and then merge those with fewer than 1,000 and split the ones that have higher than 1,000. If close enough, you can probably split those based on the count (e.g., if 3000 results, split the interval in four equal parts and most likely each will have fewer than 1,000). After you have all the intervals, collect the repositories. See this example Manual · GHOST
In terms of searching the code, you could search by user for instance or user/repo in case some users give more than 1,000 results.