---
title: "List and search assets"
method: GET
path: "/v1/files"
tags: ["Digital Asset Management (DAM)"]
---

# List and search assets

`GET /v1/files`

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

- `type` 'file' | 'file-version' | 'folder' | 'all'
- `sort` 'ASC_NAME' | 'DESC_NAME' | 'ASC_CREATED' | 'DESC_CREATED' | 'ASC_UPDATED' | 'DESC_UPDATED' | 'ASC_HEIGHT' | 'DESC_HEIGHT' | 'ASC_WIDTH' | 'DESC_WIDTH' | 'ASC_SIZE' | 'DESC_SIZE' | 'ASC_RELEVANCE' | 'DESC_RELEVANCE'
- `path` string
- `searchQuery` string
- `fileType` 'all' | 'image' | 'non-image'
- `limit` integer
- `skip` integer

## Response `200`

List of assets.

- union[]
  - union
    - FileDetails — Object containing details of a file or file version.
      - `fileId` string — Unique identifier of the asset.
      - `type` 'file' | 'file-version' — Type of the asset.
      - `name` string — Name of the asset.
      - `filePath` string — Path of the file. This is the path you would use in the URL to access the file. For example, if the file is at the root of the media library, the path will be `/file.jpg`. If the file is inside a folder named `images`, the path will be `/images/file.jpg`.
      - `tags` union — An array of tags assigned to the file. Tags are used to search files in the media library.
        - string[]
        - string[]
      - `AITags` union — Array of AI-generated tags associated with the image. If no AITags are set, it will be null.
        - AITag[]
          - `name` string — Name of the tag.
          - `confidence` number — Confidence score of the tag.
          - `source` string — Source of the tag. Possible values are `google-auto-tagging` and `aws-auto-tagging`.
        - AITag[]
          - `name` string — Name of the tag.
          - `confidence` number — Confidence score of the tag.
          - `source` string — Source of the tag. Possible values are `google-auto-tagging` and `aws-auto-tagging`.
      - `versionInfo` VersionInfo — An object containing the file or file version's `id` (versionId) and `name`.
        - `id` string — Unique identifier of the file version.
        - `name` string — Name of the file version.
      - `isPrivateFile` boolean — Specifies if the file is private or not.
      - `isPublished` boolean — Specifies if the file is published or not.
      - `customCoordinates` union — An string with custom coordinates of the file.
        - string
        - unknown
      - `url` string, uri — URL of the file.
      - `thumbnail` string, uri — URL of the thumbnail image. This URL is used to access the thumbnail image of the file in the media library.
      - `fileType` string — Type of the file. Possible values are `image`, `non-image`.
      - `mime` string — MIME type of the file.
      - `width` number — Width of the file.
      - `height` number — Height of the file.
      - `size` number — Size of the file in bytes.
      - `bitRate` integer — The bit rate of the video in kbps (only for video).
      - `duration` integer — The duration of the video in seconds (only for video).
      - `audioCodec` string — The audio codec used in the video (only for video/audio).
      - `videoCodec` string — The video codec used in the video (only for video).
      - `hasAlpha` boolean — Specifies if the image has an alpha channel.
      - `customMetadata` CustomMetadata — A key-value data associated with the asset.
      - `selectedFieldsSchema` SelectedFieldsSchema — This field is included in the response only if the Path policy feature is available in the plan. It contains schema definitions for the custom metadata fields selected for the specified file path. Field selection can only be done when the Path policy feature is enabled. Keys are the names of the custom metadata fields; the value object has details about the custom metadata schema.
      - `embeddedMetadata` EmbeddedMetadata — Consolidated embedded metadata associated with the file. It includes exif, iptc, and xmp data.
      - `description` string — Optional text to describe the contents of the file. Can be set by the user or the ai-auto-description extension.
      - `createdAt` string, date-time — Date and time when the file was uploaded. The date and time is in ISO8601 format.
      - `updatedAt` string, date-time — Date and time when the file was last updated. The date and time is in ISO8601 format.
    - FolderDetails
      - `type` 'folder' — Type of the asset.
      - `folderId` string — Unique identifier of the asset.
      - `name` string — Name of the asset.
      - `customMetadata` object — An object with custom metadata for the folder. Returns empty object if no custom metadata is set.
      - `folderPath` string — Path of the folder. This is the path you would use in the URL to access the folder. For example, if the folder is at the root of the media library, the path will be /folder. If the folder is inside another folder named images, the path will be /images/folder.
      - `createdAt` string, date-time — Date and time when the folder was created. The date and time is in ISO8601 format.
      - `updatedAt` string, date-time — Date and time when the folder was last updated. The date and time is in ISO8601 format.

## Other responses

- `400` — Bad Request.
- `401` — Unauthorized request.
- `403` — Forbidden.
- `429` — The request exceeded the rate limit. Contains headers indicating the limits and a message detailing the error.

---

[API](https://skmtc.dev/imagekit-developer/apis/imagekit-api.md) · [All operations](https://skmtc.dev/imagekit-developer/apis/imagekit-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/imagekit-developer/imagekit-api/revisions/bb3e9ff84b3e/schema)
