Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Shopify Products Image Exporter

A lightweight Python tool to export your Shopify store’s products with all image URLs into a CSV.
Perfect for backups, analysis, or migrating content.

✨ Features

  • Fetches all products with pagination
  • Extracts every image per product (not just the featured image)
  • Outputs a clean CSV you can open in Excel/Google Sheets
  • Basic error handling and retries for transient network/rate-limit issues

🚀 Quick Start

1) Prerequisites

  • Python 3.9+
  • A Shopify Admin API access token
  • Your store’s myshopify.com domain (e.g., example-store.myshopify.com)

2) Install dependencies

pip install requests python-dotenv urllib3

3) Set environment variables

Create a .env file in the project root:

SHOPIFY_SHOP=your-store.myshopify.com
SHOPIFY_ACCESS_TOKEN=shpat_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
SHOPIFY_API_VERSION=2024-07

4) Run

python export_products.py

When it finishes, you’ll get products_with_all_images.csv next to the script.

📄 CSV Schema

Columns:

  • handle
  • title
  • image_urls — all image URLs joined by ;

Example row:

my-product-handle, "Premium Seat Cover", "https://cdn.shopify.com/s/files/.../1.jpg;https://cdn.shopify.com/s/files/.../2.jpg"

🛠 Configuration

  • Change API version in .env via SHOPIFY_API_VERSION.
  • For large stores, consider adding small delays between requests to avoid rate limits.

🔐 Security Notes

  • .env is included in .gitignore (do not commit it).
  • If you previously committed a token:
    1. Remove it from the code and commit
    2. (If needed) scrub history (e.g., git filter-repo)
    3. Revoke the exposed token in Shopify and create a new one

🧪 Quick Connectivity Test (optional)

Create a tiny test.py that loads .env and hits a simple Shopify endpoint to verify your credentials. Keep the token only in environment variables.

🗺️ Roadmap Ideas

  • Filters (by publish status, tags, collections)
  • JSON output alongside CSV
  • CLI with argparse and more flags
  • Dockerfile for reproducible runs

Made with ❤️ to make Shopify exports painless.

About

Export Shopify products with all image URLs to CSV (Python, requests, dotenv)

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages