FWIW, PRs labelled with
hacktoberfest-accepted are also eligible even without the
hacktoberfest repository tag (retroactively labeling already merged PRs doesn’t work though).
The repository search API does support topics:
But a request like yours to find pull requests:
… is an issue search, with doesn’t support
topic:hacktoberfest - the context is issues, not repositories, and the results don’t include any repository information other than a URL to the repo.
You could make secondary requests however to determine the topics of the respective repositories:
cmd you can get the unique repositories like so:
curl "https://api.github.com/search/issues?q=created:2020-09-30T00:00:00-12:00..2020-10-31T23:59:59-12:00+type:pr+is:public+draft:false+author:freak4pc" | jq "[.items.repository_url] | unique_by(.) | ."
And test for the Hacktoberfest topic like:
curl -H "Accept: application/vnd.github.mercy-preview+json" "https://api.github.com/repos/GettEngineering/Prism/topics" | jq ".names | contains([\"hacktoberfest\"])"