3

I already see similar topics, but no one solve my problem.

How to filter and fetch GitHub repositories by topics

Github API: Getting topics of a Github repository

The problem is: When I request for https://api.github.com/search/repositories?q=topic:${TOPIC} they give me the repositories form the whole world, so well, I just want to get from a unique user or organization.

I know about https://api.github.com/users/{user}

but it doesn't seem to filter by topics, so I would have to search through a hundred repositories to match the topic I need.

Is there any API feature that helps me?

1 Answers1

2

I just want to get from a unique user or organization.

You need to add to the q parameter what you are looking for:

By user:

q=user:Foo topic:Bar

By org:

q=org:Acme topic:Bar

(remember to URL encode the q parameter)

Here you can find all the GH supported parameters

Manuel Spigolon
  • 11,003
  • 5
  • 50
  • 73