Hitting the search API constantly provides incomplete results via timeout.

Hi all,

I’m trying to query code via the search API, and specifically trying to target markdown files within my own organization.

The query seems valid - “org:<org> language:markdown <query>” - but the results are extremely inconsistent.

Upon further investigation, it seems as though I’m running into an arbitrary “search timeout.”

Quite simply, I’m not finding the files I expect to find, and any “optimization” only seems to help minimally, I’ve tried:

  • More specific search terms
  • Less specific search terms
  • Switching to “extension:md” from “language:markdown”
  • Switching to “user:<org>” from “org:<org>”

Is there anything else I can try? Anything else I’m missing?

Thanks!

2 Likes

Are you searching anonymously? Or are you searching under a user account by way of a personal access token or other authentication method? Anonymous searches are subject to tighter restrictions.

Let us know!

I am searching under a personal access token.

In that case, I don’t have any other theories, you may want to contact private support at https://github.com/contact or via email at support@github.com so they can examine things a little more deeply.

Hi @willdrach-wk,

Did you get a solution?

I’m having the same problem, I’ve made several changes to the search filters, but I keep getting as a return to flag incomplete_results as true.

Best regards,

We ended up using webhooks to build our own search index. Was not a preferred method of doing this, but we didn’t have any other options.