Difference between repositories listed in UI and API search result

I see some odd behavior regarding repositories search API.

Checking some random user, I can see that he has 29 repositories listed in his Github user page:https://github.com/adidi?tab=repositories

When trying to run a query that gets all of his repositories, I get only 14 (total count): https://api.github.com/search/repositories?q=user:adidi

Both requests were performed from the browser without any authentication, so there is no permission issue involved.

Do you know what can cause this?

Thanks,

Ilia

For whoever is interested, the issue is that forked repositories are filtered out by default.

From the documenation:

To include forks in the search results, you will need to add fork:true or fork:only to your query.
For more information, see “Searching in forks.”

1 Like

query for total repos

https://api.github.com/search/repositories?q=user:adidi+fork:true

and private repos are invisible.