EndpointsStoresSearch
Search Files
POST/v1/stores/files/search
Authorization
Authorizationstringrequired
Bearer token for API authentication. Format: `Bearer YOUR_API_KEY`
Request Body
querystringrequired
Search query text
Constraints
•Minimum length: 1
store_identifiersarray | null
IDs or names of stores to search
top_kintegerdefault:
10Number of results to return
Constraints
•Minimum: 1
file_idsarray | array
Optional list of file IDs to filter chunks by (inclusion filter)
Constraints
•Minimum items: 2•Maximum items: 2
Response Body
objectstringdefault:
listThe object type of the response
Request
POST/v1/stores/files/search
from mixedbread import Mixedbread
mxbai = Mixedbread(api_key="YOUR_API_KEY")
response = mxbai.stores.files.search(
query="API documentation",
store_identifiers=["my-knowledge-base"],
top_k=3,
)
for file in response.data:
print(file)Response
JSON
{
"object": "list",
"data": [
{
"id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"object": "store.file",
"filename": "api_reference.pdf",
"metadata": {
"category": "documentation"
},
"status": "completed",
"last_error": null,
"store_id": "c3d4e5f6-a7b8-9012-cdef-345678901234",
"created_at": "2025-01-15T10:00:00.000Z",
"version": 1,
"usage_bytes": 1048576,
"score": 0.9155,
"chunks": null
},
{
"id": "b2c3d4e5-f6a7-8901-bcde-f23456789012",
"object": "store.file",
"filename": "api_examples.md",
"metadata": {
"category": "examples"
},
"status": "completed",
"last_error": null,
"store_id": "c3d4e5f6-a7b8-9012-cdef-345678901234",
"created_at": "2025-01-14T15:30:00.000Z",
"version": 1,
"usage_bytes": 524288,
"score": 0.889,
"chunks": null
},
{
"id": "file_ghi789",
"object": "store.file",
"filename": "authentication_guide.pdf",
"metadata": {
"category": "guides"
},
"status": "completed",
"last_error": null,
"store_id": "c3d4e5f6-a7b8-9012-cdef-345678901234",
"created_at": "2025-01-13T09:15:00.000Z",
"version": 1,
"usage_bytes": 786432,
"score": 0.8234,
"chunks": null
}
]
}Last updated: March 13, 2026