Skip to main content
POST
/
api
/
search
Run a blocking code search
curl --request POST \
  --url https://api.example.com/api/search \
  --header 'Content-Type: application/json' \
  --data '
{
  "query": "<string>",
  "matches": 123,
  "contextLines": 123,
  "whole": true,
  "isRegexEnabled": true,
  "isCaseSensitivityEnabled": true
}
'
{
  "stats": {
    "actualMatchCount": 123,
    "totalMatchCount": 123,
    "duration": 123,
    "fileCount": 123,
    "filesSkipped": 123,
    "contentBytesLoaded": 123,
    "indexBytesLoaded": 123,
    "crashes": 123,
    "shardFilesConsidered": 123,
    "filesConsidered": 123,
    "filesLoaded": 123,
    "shardsScanned": 123,
    "shardsSkipped": 123,
    "shardsSkippedFilter": 123,
    "ngramMatches": 123,
    "ngramLookups": 123,
    "wait": 123,
    "matchTreeConstruction": 123,
    "matchTreeSearch": 123,
    "regexpsConsidered": 123,
    "flushReason": "<string>"
  },
  "files": [
    {
      "fileName": {
        "text": "<string>",
        "matchRanges": [
          {
            "start": {
              "byteOffset": 123,
              "lineNumber": 123,
              "column": 123
            },
            "end": {
              "byteOffset": 123,
              "lineNumber": 123,
              "column": 123
            }
          }
        ]
      },
      "webUrl": "<string>",
      "repository": "<string>",
      "repositoryId": 123,
      "language": "<string>",
      "chunks": [
        {
          "content": "<string>",
          "matchRanges": [
            {
              "start": {
                "byteOffset": 123,
                "lineNumber": 123,
                "column": 123
              },
              "end": {
                "byteOffset": 123,
                "lineNumber": 123,
                "column": 123
              }
            }
          ],
          "contentStart": {
            "byteOffset": 123,
            "lineNumber": 123,
            "column": 123
          },
          "symbols": [
            {
              "symbol": "<string>",
              "kind": "<string>",
              "parent": {
                "symbol": "<string>",
                "kind": "<string>"
              }
            }
          ]
        }
      ],
      "externalWebUrl": "<string>",
      "branches": [
        "<string>"
      ],
      "content": "<string>"
    }
  ],
  "repositoryInfo": [
    {
      "id": 123,
      "codeHostType": "github",
      "name": "<string>",
      "displayName": "<string>",
      "webUrl": "<string>"
    }
  ],
  "isSearchExhaustive": true
}

Body

application/json
query
string
required
matches
number
required
contextLines
number
whole
boolean
isRegexEnabled
boolean
isCaseSensitivityEnabled
boolean

Response

Search results.

stats
object
required
files
object[]
required
repositoryInfo
object[]
required
isSearchExhaustive
boolean
required