Export Collections to CSV

Export Collections to CSV

Kerri_Bennett
Shopify Partner
31 0 9

Seems like its possible to export all product. but I cannot find the same function to export all collection. Is it even  possible to export all collections including with SEO Title, Meta Description and URL. We'd like to tidy up our Collections and I'd find it easier to manage in CSV format, however I cannot find a way to export the data out.

Replies 4 (4)

Kudosi-Carlos
Excursionist
125 9 39

Hi @Kerri_Bennett,

Unfortunately, Shopify doesn’t offer a built-in way to export all your collections in CSV format including their SEO details (like SEO title, meta description, and URL handles). The native export feature is pretty solid for products, but collections are a different story. Here are a couple of options you might consider:

1. Third-Party Apps:
Apps like Matrixify allow you to export collection data with a lot more detail, including SEO fields. This is probably the easiest option if you're not into coding. For most merchants looking to tidy up collection data, a third-party app is the way to go.

 

2. Use the Shopify API:
If you’re comfortable with a bit of development, you can use the Shopify API (or GraphQL API) to fetch your collections and their SEO details, then export that data to CSV. This method gives you full control but does require some technical know-how.

- Was my answer helpful? Please hit Like or Mark it as solution!
- Kudosi Product Reviews - The must-have Shopify app that empowers you to effortlessly collect, display, and manage product reviews.
- Start your FREE trial today!

lora785frink
Visitor
1 0 0

Hello,

there isn't a built-in function to directly export all collections, including SEO Title, Meta Description, and URL, like you can with products. However, you can achieve this using Velo (Wix's coding platform) and the Wix Data API to extract the collection data and export it as a CSV file.

Solution: Export All Collections with SEO Data
To export all collections, including SEO Title, Meta Description, and URL, follow these steps:

Step 1: Create a Backend Function to Fetch Collections
Wix stores collections as database collections in the Content Manager. You can use the wixData API to retrieve them.

Backend Code (backend/data.jsw)
javascript
Copy
Edit
import wixData from 'wix-data';
import { ok, notFound, serverError } from 'wix-http-functions';

export async function getCollections(request) {
try {
// Fetch all collections
const results = await wixData.query("Stores/Collections").find();

if (results.items.length === 0) {
return notFound({ message: "No collections found" });
}

// Extract required fields
const collectionsData = results.items.map(collection => ({
id: collection._id,
name: collection.name,
seoTitle: collection.seoData?.title || "",
metaDescription: collection.seoData?.description || "",
url: collection.slug ? `https://yourwixsite.com/${collection.slug}` : ""
}));

return ok({ collections: collectionsData });
} catch (error) {
console.error("Error fetching collections:", error);
return serverError({ message: "An error occurred" });
}
}
Step 2: Create a Button to Trigger the Export
Add a button on your Wix page to fetch the collections and export them as a CSV.

Frontend Code (Page Code)
javascript
Copy
Edit
import { getCollections } from 'backend/data.jsw';

$w.onReady(function () {
$w("#exportButton").onClick(async () => {
try {
const response = await getCollections();

if (response.collections.length > 0) {
// Convert data to CSV format
let csvContent = "data:text/csv;charset=utf-8,";
csvContent += "ID,Name,SEO Title,Meta Description,URL\n";

response.collections.forEach(row => {
csvContent += `"${row.id}","${row.name}","${row.seoTitle}","${row.metaDescription}","${row.url}"\n`;
});

// Create download link
const encodedUri = encodeURI(csvContent);
const link = document.createElement("a");
link.setAttribute("href", encodedUri);
link.setAttribute("download", "collections.csv");
document.body.appendChild(link);
link.click(); e-zpassri
document.body.removeChild(link);
} else {
console.log("No collections found.");
}
} catch (error) {
console.error("Error exporting collections:", error);
}
});
});

Best Regard,

lora

K_Br4
Pathfinder
115 6 19

There is a spreadsheet app, where you can use Excel formulas, sorting, find-replace, etc.

For meta description, the CONCAT function is very useful.

And then you sync back to Shopify with one click.

 

 

concat function shopify.png

Ieva
Shopify Partner
46 3 70

Hi @Kerri_Bennett ! 

Thank you @Kudosi-Carlos  for the mention! 

Matrixify is able to Export Collections with SEO data. Shopify stores this data in Metafields, so the idea would be to Export your Custom (manual) or Smart Collections using Matrixify making sure the Metafields checkbox is checked. Your Exported file would then contain the SEO data you are looking for for each Collection. We actually also offer a great tutorial on how you can update this data as well (the tutorial is written for Products but works the exact same way for Collections as well). 

 

If you have any specific questions about the process or would like a more guidance on how to achieve what you are looking to do with the Matrixify app, please do not hesitate to reach out to our support, we would be more than happy to help!