Search code
curl --request POST \
--url https://api.example.com/api/search \
--header 'Authorization: Bearer <token>' \
--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,
"name": "<string>",
"displayName": "<string>",
"webUrl": "<string>"
}
],
"isSearchExhaustive": true
}Search & Navigation
Search code
Executes a blocking code search and returns all matching file chunks.
POST
/
api
/
search
Search code
curl --request POST \
--url https://api.example.com/api/search \
--header 'Authorization: Bearer <token>' \
--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,
"name": "<string>",
"displayName": "<string>",
"webUrl": "<string>"
}
],
"isSearchExhaustive": true
}Usage
Thequery field supports literal, regexp, and symbol searches with filters for repository, file, language, branch, and more. See the search syntax reference for the full query language.Authorizations
bearerTokenapiKeyHeader
Bearer authentication header of the form Bearer <token>, where <token> is your API key.
Body
application/json
Was this page helpful?
⌘I

