Newsletter
TechAnV Blog
Get updates on security engineering, Rust, eBPF, and DevSecOps. No spam, unsubscribe anytime.
Check your inbox and click the confirmation link to complete your subscription.
Searching for repositories by topic using the GitHub GraphQL API#
I wanted to use the GitHub GraphQL API to return all of the repositories on the https://github.com/topics/git-scraping page.
At first glance there isn’t a GraphQL field for that page - but it turns out you can access it using a GitHub search:
1topic:git-scraping sort:updated-descAn oddity of GitHub search is that sort order can be defined using tokens that form part of the search query!
Here’s a GraphQL query tested here that returns the most recent 100 git-scraping tagged repos, sorted by most recently updated.
1{2 search(query: "topic:git-scraping sort:updated-desc", type: REPOSITORY, first: 100) {3 repositoryCount4 nodes {5 ... on Repository {6 nameWithOwner7 description8 updatedAt9 createdAt10 diskUsage11 }12 }13 }14}Newsletter
TechAnV Blog
Get updates on security engineering, Rust, eBPF, and DevSecOps. No spam, unsubscribe anytime.
Check your inbox and click the confirmation link to complete your subscription.