لوكلاء AI: ملف markdown لهذه الصفحة — /docs-content-en/entities/files/fulltext-search.md فهرس التوثيق — /llms.txt
مقالات التوثيق متاحة حاليًا باللغة الإنجليزية فقط.
Full-text Disk search
POST /v1/files/fulltext-search
Searches the index across all accessible Disk storage. Single-folder search accepts filters, while this route accepts a search string. Requires disk scope. READONLY keys are allowed.
Request fields
| Field | Type | Required | Description |
|---|---|---|---|
Fieldquery |
Typestring | Requiredyes | DescriptionRequired. Whitespace is collapsed and trimmed, then length must be 3..255 characters |
Fieldtype |
Typestring | Requiredno | Descriptionfile, folder, all. Default file |
Fieldfilter.storageId |
Typenumber | Requiredno | DescriptionPositive integer ID from storage listing |
Fieldfilter.folderId |
Typenumber | Requiredno | DescriptionPositive integer ID from folder listing |
Fieldfilter.fileType |
Typestring or array | Requiredno | DescriptionOnly with type=file: document, image, video, audio, archive, pdf, vector_image, board, known, unknown. Arrays must be nonempty |
Fieldoffset |
Typenumber | Requiredno | DescriptionInteger 0..1000, default 0 |
Unknown fields are refused. limit is not accepted: the native Bitrix24 page size is fixed at 50 records.
Examples
curl — personal key
curl -X POST 'https://vibecode.bitrix24.com/v1/files/fulltext-search' \
-H 'X-Api-Key: YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{"query":"report","filter":{"fileType":"document"},"offset":0}'
curl — OAuth application
curl -X POST 'https://vibecode.bitrix24.com/v1/files/fulltext-search' \
-H 'X-Api-Key: YOUR_APP_KEY' \
-H 'Authorization: Bearer USER_SESSION_TOKEN' \
-H 'Content-Type: application/json' \
-d '{"query":"report","filter":{"fileType":"document"},"offset":0}'
JavaScript — personal key
const response = await fetch('https://vibecode.bitrix24.com/v1/files/fulltext-search', {
method: 'POST',
headers: {"X-Api-Key": "YOUR_API_KEY", "Content-Type": "application/json"},
body: JSON.stringify({"query": "report", "filter": {"fileType": "document"}, "offset": 0}),
})
const result = await response.json()
console.log(result)
JavaScript — OAuth application
const response = await fetch('https://vibecode.bitrix24.com/v1/files/fulltext-search', {
method: 'POST',
headers: {"X-Api-Key": "YOUR_APP_KEY", "Authorization": "Bearer USER_SESSION_TOKEN", "Content-Type": "application/json"},
body: JSON.stringify({"query": "report", "filter": {"fileType": "document"}, "offset": 0}),
})
const result = await response.json()
console.log(result)
Response fields
| Field | Type | Description |
|---|---|---|
Fieldsuccess |
Typeboolean | DescriptionSuccessful request |
Fielddata.items |
Typearray | DescriptionFiles and folders — fields as in Get file and Get a folder |
Fielddata.meta.nextOffset |
Typenumber | null | DescriptionNext offset; null at the end |
Fielddata.meta.maxOffset |
Typenumber | DescriptionMaximum offset: 1000 |
{"success":true,"data":{"items":[{"id":42,"type":"file","name":"report.pdf","folderId":9,"downloadUrl":"https://vibecode.bitrix24.com/v1/files/42/download"}],"meta":{"nextOffset":null,"maxOffset":1000}}}
data.items contains files in the files projection and folders in the folders projection. Follow downloadUrl with the same API key. data.meta.nextOffset is the next page offset or null; use it in the next request. There is no total: Bitrix24 does not return the match count.
Trash is excluded. Empty results do not prove absence: the index updates asynchronously, and not every format has its content indexed. Name search is more reliable. You cannot continue past offset 1000; narrow the query.
Errors
Example refusal (400):
{"success":false,"error":{"code":"INVALID_PARAMS","message":"query must contain 3..255 characters after whitespace normalization."}}
| HTTP | Code | Description |
|---|---|---|
| HTTP400 | CodeINVALID_PARAMS |
DescriptionInvalid query, type, filter or offset, unknown fields |
| HTTP403 | CodeSCOPE_DENIED |
DescriptionMissing disk scope |
| HTTP403 | CodeBITRIX_ACCESS_DENIED |
DescriptionBitrix24 denied access |
| HTTP404 | CodeENTITY_NOT_FOUND |
DescriptionStorage or folder not found or inaccessible. These causes are intentionally indistinguishable |
| HTTP422 | CodeBITRIX_ERROR |
DescriptionBitrix24 business refusal or response without a result |
| HTTP422 | CodeOPERATION_FAILED |
DescriptionBitrix24 business refusal or response without a result |
Common refusals: Errors.