[{"data":1,"prerenderedAt":7},["ShallowReactive",2],{"docs-entities\u002Ffolders\u002Fsearch":3,"docs-tabs-entities\u002Ffolders\u002Fsearch":6},{"content":4,"lastmod":5},"## Folder search\n\n`POST \u002Fv1\u002Ffolders\u002Fsearch`\n\nLists folder contents via a POST request with a filter in the body. It behaves the same as [`GET \u002Fv1\u002Ffolders`](.\u002Flist.md), except that parameters are passed in the body rather than in the query string. The folder ID goes in `filter.parentId` or in a top-level `parentId` field of the body.\n\n## Request fields (body)\n\n| Field | Type | Required | Description |\n|------|-----|:-----:|---------|\n| `filter` | object | no | Selection conditions. `parentId` — the ID of the folder whose contents are listed. Required here or at the top level of the body.\u003Cbr>[Filtering syntax](\u002Fdocs\u002Ffiltering). Example: `{\"parentId\":27,\"type\":\"folder\"}` |\n| `parentId` | number | no | The folder ID at the top level of the body — instead of `filter.parentId`. If both are passed, this value is used. A single value only: arrays, objects and `null` are rejected |\n| `select` | array | no | List of fields to return. Example: `[\"id\",\"name\"]` |\n| `order` | object | no | Sort by field. Example: `{\"name\":\"asc\"}` |\n| `limit` | number | no | How many records to return. Default 50, maximum 5000 |\n| `offset` | number | no | Offset for pagination |\n\n## Examples\n\n### curl — personal key\n\n```bash\ncurl -X POST \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Ffolders\u002Fsearch\" \\\n  -H \"X-Api-Key: YOUR_API_KEY\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"filter\":{\"parentId\":27,\"type\":\"folder\"},\"limit\":10}'\n```\n\n### curl — OAuth application\n\n```bash\ncurl -X POST \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Ffolders\u002Fsearch\" \\\n  -H \"X-Api-Key: YOUR_APP_KEY\" \\\n  -H \"Authorization: Bearer USER_SESSION_TOKEN\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"filter\":{\"parentId\":27,\"type\":\"folder\"},\"limit\":10}'\n```\n\n### JavaScript — personal key\n\n```javascript\nconst res = await fetch('https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Ffolders\u002Fsearch', {\n  method: 'POST',\n  headers: {\n    'X-Api-Key': 'YOUR_API_KEY',\n    'Content-Type': 'application\u002Fjson',\n  },\n  body: JSON.stringify({ filter: { parentId: 27, type: 'folder' }, limit: 10 }),\n})\n\nconst { success, data, meta } = await res.json()\nconsole.log('Found:', data.length)\n```\n\n### JavaScript — OAuth application\n\n```javascript\nconst res = await fetch('https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Ffolders\u002Fsearch', {\n  method: 'POST',\n  headers: {\n    'X-Api-Key': 'YOUR_APP_KEY',\n    'Authorization': 'Bearer USER_SESSION_TOKEN',\n    'Content-Type': 'application\u002Fjson',\n  },\n  body: JSON.stringify({ filter: { parentId: 27, type: 'folder' }, limit: 10 }),\n})\n\nconst { success, data, meta } = await res.json()\n```\n\n## Response fields\n\n| Field | Type | Description |\n|------|-----|---------|\n| `success` | boolean | Always `true` on success |\n| `data` | array | Array of records — subfolders and files. All fields — see [Folder fields](.\u002Ffields.md) |\n| `data[].type` | string | Record type: `\"folder\"` or `\"file\"` |\n| `meta.total` | number | Number of records matching the filter |\n| `meta.hasMore` | boolean | Whether more records exist beyond `limit` |\n| `meta.durationMs` | number | Request duration in milliseconds |\n\nThe `meta` fields sit next to `data`, not inside it. Paginate using `meta.hasMore`: a `data` length equal to `limit` does not rule out this being the last page.\n\n## Response example\n\n```json\n{\n  \"success\": true,\n  \"data\": [\n    {\n      \"id\": 9301,\n      \"name\": \"Documents\",\n      \"code\": null,\n      \"storageId\": 1,\n      \"type\": \"folder\",\n      \"realObjectId\": 9301,\n      \"parentId\": 27,\n      \"deletedType\": 0,\n      \"createdAt\": \"2026-06-25T12:10:00.000Z\",\n      \"updatedAt\": \"2026-06-25T12:10:00.000Z\",\n      \"deletedAt\": null,\n      \"createdBy\": 1,\n      \"updatedBy\": 1,\n      \"deletedBy\": null,\n      \"detailUrl\": \"https:\u002F\u002F\u003Cportal>.bitrix24.com\u002Fcompany\u002Fpersonal\u002Fuser\u002F1\u002Fdisk\u002Fpath\u002FDocuments\"\n    }\n  ],\n  \"meta\": { \"total\": 1, \"hasMore\": false, \"durationMs\": 125 }\n}\n```\n\n## Error response example\n\n403 — no `disk` scope:\n\n```json\n{\n  \"success\": false,\n  \"error\": {\n    \"code\": \"SCOPE_DENIED\",\n    \"message\": \"This endpoint requires 'disk' scope\"\n  }\n}\n```\n\n## Errors\n\n| HTTP | Code | Description |\n|------|-----|---------|\n| 400 | `MISSING_REQUIRED_PARAMS` | The folder ID is passed in neither `filter.parentId` nor `parentId`. Arrays, objects and `null` are treated as missing. The same code is returned when one of the fields is an empty string, even if the other one carries an ID. `message` lists the missing fields |\n| 400 | `INVALID_FILTER_OPERATOR` | One of `parentId` and `filter.parentId` holds a single ID, and the other holds an array, an object or `null`. The request is rejected before Bitrix24 Drive is called |\n| 403 | `SCOPE_DENIED` | The API key does not have the `disk` scope |\n| 401 | `TOKEN_MISSING` | The API key has no configured portal tokens |\n| 429 | `RATE_LIMITED` | Rate limit exceeded: 300 requests per minute per portal. All API keys of the portal share one limit. The current limit is returned in the `x-ratelimit-limit` header. Retry after the delay in the `Retry-After` header |\n\nFor the full list of common API errors, see [Errors](\u002Fdocs\u002Ferrors).\n\n## Known specifics\n\nSearch lists the contents of a single folder specified via `parentId`, rather than searching across the whole storage. For one-off queries it is simpler to use [`GET \u002Fv1\u002Ffolders`](.\u002Flist.md) with the same set of parameters in the query string.\n\n## See also\n\n- [List folder contents](\u002Fdocs\u002Fentities\u002Ffolders\u002Flist)\n- [Folder fields](\u002Fdocs\u002Fentities\u002Ffolders\u002Ffields)\n- [Folders](\u002Fdocs\u002Fentities\u002Ffolders)\n- [Filtering syntax](\u002Fdocs\u002Ffiltering)\n","2026-10-23",{},1794739380025]