You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In addition, you can fine-tune your query by specifying various filters by generating a query string in a Lucene-like syntax and providing this generated string as the value of the `search_query`.
492
+
493
+
```Python
494
+
from imagekitio.models.ListAndSearchFileRequestOptions import ListAndSearchFileRequestOptions
495
+
496
+
options = ListAndSearchFileRequestOptions(
497
+
search_query="createdAt >= '2d' OR size < '2mb' OR format='png'",
498
+
)
499
+
500
+
result = imagekit.list_files(options=options)
501
+
502
+
# Final Result
503
+
print(result)
504
+
505
+
# Raw Response
506
+
print(result.response_metadata.raw)
507
+
508
+
# print the first file's ID
509
+
print(result.list[0].file_id)
510
+
```
511
+
Detailed documentation can be found here for [advance search queries](https://docs.imagekit.io/api-reference/media-api/list-and-search-files#advanced-search-queries).
512
+
488
513
**2. Get File Details**
489
514
490
515
Accepts the file ID and fetches the details as per
0 commit comments