List and search assets
This API can list all the uploaded files and folders in your ImageKit.io media library. In addition, you can fine-tune your query by specifying various filters by generating a query string in a Lucene-like syntax and provide this generated string as the value of the searchQuery.
Query parameters
Filter results by asset type.
- file — returns only files
- file-version — returns specific file versions
- folder — returns only folders
- all — returns both files and folders (excludes file-version)
Sort the results by one of the supported fields in ascending or descending order.
Folder path if you want to limit the search within a specific folder. For example, /sales-banner/ will only search in folder sales-banner.
Note : If your use case involves searching within a folder as well as its subfolders, you can use path parameter in searchQuery with appropriate operator. Checkout Supported parameters for more information.
Query string in a Lucene-like query language e.g. createdAt > "7d".
Note : When the searchQuery parameter is present, the following query parameters will have no effect on the result:
- tags
- type
- name
Learn more from examples.
Filter results by file type.
- all — include all file types
- image — include only image files
- non-image — include only non-image files (e.g., JS, CSS, video)
The maximum number of results to return in response.
The number of results to skip before returning results.
Response
List of assets.