Skip to main content
query

Requires read_files access scope, read_themes access scope or read_images access scope.

Retrieves a paginated list of files that have been uploaded to a Shopify store. Files represent digital assets that merchants can upload to their store for various purposes including product images, marketing materials, documents, and brand assets.

Use the files query to retrieve information associated with the following workflows:

Files can include multiple content types, such as images, videos, 3D models, and generic files. Each file has properties like dimensions, file size, alt text for accessibility, and upload status. Files can be filtered by media type and can be associated with products, themes, and other store resources.

Anchor to Arguments

FileConnection arguments

•FileConnection!
•String

The elements that come after the specified cursor.

•String

The elements that come before the specified cursor.

•Int

The first n elements from the paginated list.

•Int

The last n elements from the paginated list.

•String

A filter made up of terms, connectives, modifiers, and comparators.

nametypedescriptionacceptable_valuesdefault_valueexample_use
defaultstringFilter by a case-insensitive search of multiple fields
in a document.- query=Bob Norman
- query=title:green hoodie
created_attime
filenamestring
ididFilter by id range.- id:1234
- id:>=1234
- id:<=1234
idsstring
media_typestring
original_upload_sizestringFilter by the file's original upload size
in bytes. This filter supports both exact values and ranges. It accepts an
optional unit of measurement as a suffix (B, KB, MB, GB, TB). When no unit
is provided, the value is interpreted as bytes. Units use binary
(1024-based) multipliers.- original_upload_size:1024
-
original_upload_size:1.5MB
- `original_upload_size:>=10MB
original_upload_size:<=100MB<br/> - original_upload_size:512KB`
product_idstring
statusstring
updated_attime
used_instring
You can apply one or more filters to a query. Learn more about [Shopify API
search syntax](https://shopify.dev/api/usage/search-syntax).
•Boolean
Default:false

Reverse the order of the underlying list.

•ID

The ID of a saved search. The search’s query string is used as the query argument.

•FileSortKeys
Default:ID

Sort the underlying list using a key. If your query is slow or returns an error, then try specifying a sort key that matches the field used in the search.


Was this section helpful?

•[FileEdge!]!
non-null

The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node.

•[File!]!
non-null

A list of nodes that are contained in FileEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve.

•PageInfo!
non-null

An object that’s used to retrieve cursor information about the current page.


Was this section helpful?