Apigithub
Search code with GitHub's native code search
Read operation: does not mutate upstream state.
curl -X GET "https://api.modernloop.dev/rest/v1/github/search/code?q=string" \ -H "Authorization: Bearer $MLOOP_INTERNAL_MCP_API_KEY"{ "totalCount": 0, "incompleteResults": true, "results": [ { "name": "string", "path": "string", "sha": "string", "html_url": "string", "repository": { "id": 0, "name": "string", "full_name": "string", "html_url": "string" }, "score": 0 } ]}{ "error": { "code": "string", "message": "string", "upstreamStatus": 0 }}{ "error": { "code": "string", "message": "string", "upstreamStatus": 0 }}{ "error": { "code": "string", "message": "string", "upstreamStatus": 0 }}{ "error": { "code": "string", "message": "string", "upstreamStatus": 0 }}Authorization
bearerAuth AuthorizationBearer <token>
In: header
Query Parameters
page?integer
Page number (1-based)
Range
1 <= valueDefault
1perPage?integer
Results per page (max 100)
Range
1 <= value <= 100Default
30q*string
GitHub code search query, e.g. 'registerGithubRoutes org:modernloop language:TypeScript'
Length
1 <= lengthsort?"indexed"
Sort field ('indexed' only)
Value in
- "indexed"
order?string
Sort order
Value in
- "asc"
- "desc"
Response Body
application/json
application/json
application/json
application/json
application/json