Export recipe

Export Shopify collections and their conditions to a CSV

Already have the file?

Drop it into the converter. It reads it in your browser and gives you a CSV.

Runs in your browser. Your file is never uploaded.

Convert my file

What the admin can’t do

Products > Collections has no import or export, and the product CSV has no collection conditions.

A bulk query asks Shopify to collect everything in the background and hand you one file to download. It reads data only; it can’t change your store. Shopify keeps the download link for 7 days.

Run it with Shopify CLI (recommended)

You need Shopify CLI installed on your computer. shopify store auth asks you to approve access in your browser, then shopify store bulk execute runs the export.

  1. Save the query below in a file named collections.graphql.
  2. Run the two commands. The first opens your browser to approve access (scopes: read_products). The second waits for the export and saves it as collections.jsonl.
collections.graphql
{
  collections {
    edges {
      node {
        id
        handle
        title
        updatedAt
        sortOrder
        templateSuffix
        descriptionHtml
        seo {
          title
          description
        }
        ruleSet {
          appliedDisjunctively
          rules {
            column
            relation
            condition
          }
        }
      }
    }
  }
}
Terminal
shopify store auth --store your-store.myshopify.com --scopes read_products
shopify store bulk execute --store your-store.myshopify.com --version 2026-10 \
  --query-file collections.graphql --watch --output-file collections.jsonl

Or with Shopify’s GraphiQL app

  1. Install Shopify’s GraphiQL app on your store and tick these scopes: read_products. Choose API version 2026-10.
  2. Paste the mutation below and run it. Copy the id it returns.
  3. Paste the status query, put the id in it, and run it every minute or so until status is COMPLETED.
  4. Open the url it returns to download the .jsonl file.
Start the export
mutation {
  bulkOperationRunQuery(
    query: """
    {
      collections {
        edges {
          node {
            id
            handle
            title
            updatedAt
            sortOrder
            templateSuffix
            descriptionHtml
            seo {
              title
              description
            }
            ruleSet {
              appliedDisjunctively
              rules {
                column
                relation
                condition
              }
            }
          }
        }
      }
    }
    """
  ) {
    bulkOperation {
      id
      status
    }
    userErrors {
      field
      message
      code
    }
  }
}
Check the status
query {
  bulkOperation(id: "PASTE_THE_ID_HERE") {
    status
    errorCode
    objectCount
    url
    partialDataUrl
  }
}

Turn it into a CSV

  1. Open the JSONL to CSV converter.
  2. Drop in collections.jsonl. It’s read in your browser; nothing is uploaded.
  3. Choose One row per collection, then click Download CSV.

Columns you get

ruleSet.appliedDisjunctively
true = products match ANY condition; false = products must match ALL conditions. Empty for manual collections.
rules.column / rules.relation / rules.condition
Each condition, joined with |. For example TAG | EQUALS | summer.
rules count
How many conditions the collection has.
sortOrder
BEST_SELLING, MANUAL, PRICE_ASC and so on.

Also need which products are in each collection?

Add a products connection to the bulk query. It counts as a second connection (the limit is five). Then choose "one row per Product" in the converter.

collection-products.graphql
{
  collections {
    edges {
      node {
        id
        handle
        title
        products {
          edges {
            node {
              id
              handle
              title
            }
          }
        }
      }
    }
  }
}

Run it like the main query: with the CLI command below, or wrapped in the same bulkOperationRunQuery mutation in GraphiQL.

Terminal
shopify store auth --store your-store.myshopify.com --scopes read_products
shopify store bulk execute --store your-store.myshopify.com --version 2026-10 \
  --query-file collection-products.graphql --watch --output-file collection-products.jsonl

Limits

  • In API version 2026-10 Shopify marks Collection.ruleSet as deprecated in favor of a newer sources field, but ruleSet is still in 2026-10. Run the query on version 2026-10 (the CLI command above pins it). If a later version removes ruleSet, the query will return an error naming the field.
  • Manual collections have an empty ruleSet.
  • Every type and field in these queries was checked against Shopify’s GraphQL Admin API reference for version 2026-10. We haven’t run them on a live store. If Shopify returns an error, the message names the field or scope it’s missing.
  • Bulk queries allow up to five connections, two levels deep (Shopify bulk operation limits).

More recipes

Sources: collections query, Collection, CollectionRuleSet, CollectionRule. Not affiliated with, endorsed by, or sponsored by Shopify Inc. Shopify is a trademark of Shopify Inc.