REST Code Search API returns zero results for existing terms in some repositories #206247
Unanswered
vistar941
asked this question in
Apps, API and Webhooks
Replies: 1 comment
|
💬 Your Product Feedback Has Been Submitted 🎉 Thank you for taking the time to share your insights with us! Your feedback is invaluable as we build a better GitHub experience for all our users. Here's what you can expect moving forward ⏩
Where to look to see what's shipping 👀
What you can do in the meantime 💻
As a member of the GitHub community, your participation is essential. While we can't promise that every suggestion will be implemented, we want to emphasize that your feedback is instrumental in guiding our decisions and priorities. Thank you once again for your contribution to making GitHub even better! We're grateful for your ongoing support and collaboration in shaping the future of our platform. ⭐ |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
🏷️ Discussion Type
Bug
💬 Feature/Topic Area
API
Body
Since approximately August 29, 2026, the REST Code Search API has been returning zero results for terms that definitely exist in some repositories.
Reproduction
Repository:
https://github.com/vistar941/CustomNavigationTitle
The term
CustomNavigationTitleexists inPackage.swift,README.md, and other files:https://github.com/vistar941/CustomNavigationTitle/blob/main/Package.swift
Request:
gh api --method GET search/code \ -f q='CustomNavigationTitle repo:vistar941/CustomNavigationTitle' \ -f per_page=3Actual response:
{ "total_count": 0, "incomplete_results": false, "items": [] }The request returned HTTP 200. It was not rate-limited:
Expected result: at least
Package.swiftandREADME.mdshould be returned.Control query
The API is not failing for every repository. The following request, made seconds later with the same authentication and client, returned seven results:
gh api --method GET search/code \ -f q='"package main" repo:cli/cli' \ -f per_page=3Response summary:
{ "total_count": 7, "incomplete_results": false }Its request ID was:
A single-character query such as
a repo:vistar941/CustomNavigationTitlealso returns results, while longer terms that definitely exist return zero results.I have observed the same behavior with multiple other public and private repositories. This was working normally until approximately yesterday.
The GitHub web Code Search interface appears to be affected as well. I added the web-search reproduction details to this related report:
https://github.com/orgs/community/discussions/206192#discussioncomment-18204982
Could GitHub please investigate whether some REST Code Search indexes or shards have become inconsistent?
All reactions