Documentation Index
Fetch the complete documentation index at: https://mintlify.com/better-auth/better-hub/llms.txt
Use this file to discover all available pages before exploring further.
Search Repositories
Search for repositories across GitHub.Query Parameters
Search query using GitHub search syntaxExamples:
tetris language:assembly- Assembly Tetris implementationsstars:>1000- Repositories with over 1000 starsuser:octocat- Repositories owned by octocatorg:github- Repositories in the GitHub organizationtopic:react- Repositories tagged with react
Filter by programming language (e.g., “javascript”, “python”, “typescript”)This parameter is automatically added to the query as
language:{value}Page number for pagination (minimum: 1)
Number of results per page (minimum: 1, maximum: 100)
Response
Total number of repositories matching the search
Whether the search results are incomplete
Array of repository objects
Example Request
Example Response
Search Code
Search for code across GitHub repositories.Query Parameters
Search query using GitHub code search syntaxExamples:
addClass in:file language:js repo:jquery/jqueryfunction path:app/public language:javascriptimport React extension:tsx
Filter by programming languageThis parameter is automatically added to the query as
language:{value}Page number for pagination (minimum: 1)
Number of results per page (minimum: 1, maximum: 100)
Response
Total number of code matches
Whether the search results are incomplete
Array of code match objects
Example Request
Example Response
Search Users
Search for users across GitHub.Query Parameters
Search query for GitHub usernames or user informationExamples:
tom- Users with “tom” in their usernamefullname:tom- Users with “tom” in their full namelocation:san francisco- Users in San Francisco
Organization name to prioritize in search resultsWhen provided, the endpoint performs two searches:
- Users in the specified organization matching the query
- Global users matching the query
Number of results per page (minimum: 1, maximum: 100)
Response
Total number of users matching the search
Array of user objects
Example Request
Example Response
Example Response (with org parameter)
When theorg parameter is provided, organization members appear first:
Common Error Responses
Rate Limiting
All search endpoints are subject to GitHub API rate limits:- Authenticated requests: 5,000 requests per hour
- Search API specific: 30 requests per minute
/lib/github.ts includes comprehensive rate limit handling:
GitHubRateLimitErrorexception withresetAt,limit, andusedproperties- Automatic detection via HTTP 403/429 status codes
- Rate limit headers parsed from
x-ratelimit-*headers
Notes
- All search endpoints require authentication via session cookies
- Maximum 100 results per page across all endpoints
- Page numbers start at 1 and are normalized (values < 1 become 1)
- The
/api/search-codeendpoint includes text match highlighting via theAccept: application/vnd.github.text-match+jsonheader - The
/api/search-usersendpoint supports organization-scoped search with fallback to global results - All timestamps are in ISO 8601 format (UTC)