ModernLoop Internal API
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)

Range1 <= value
Default1
perPage?integer

Results per page (max 100)

Range1 <= value <= 100
Default30
q*string

GitHub code search query, e.g. 'registerGithubRoutes org:modernloop language:TypeScript'

Length1 <= length
sort?"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