> ## Documentation Index
> Fetch the complete documentation index at: https://docs.shopsniffer.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Downloads

Download exported CSV, JSON, and screenshot files for any completed ShopSniffer report via the website or API.

## Overview

Every completed job produces a set of downloadable files stored on Cloudflare R2 and served from a single `GET /api/downloads` endpoint. Files are available immediately on job completion and are retained for 90 days before the [cleanup workflow](/monitoring-workflows#cleanupsnapshotsworkflow) prunes them.

## Output structure

Every report produces the same set of files, all keyed by job ID:

**R2 layout per job**

r2://shopsniffer-exports/
    /
      /
        products.csv
        products.json
        collections.json
        pages.json
        screenshot.png

## File reference

| File | Format | Description |
| --- | --- | --- |
| `products.csv` | CSV | Shopify-compatible CSV with all products and variants. Import directly into another Shopify store via Admin → Products → Import. |
| `products.json` | JSON array | Raw Shopify product JSON — full variant detail, metafields, all images. |
| `collections.json` | JSON array | All collections with titles, handles, images, body HTML, and associated product handles. |
| `pages.json` | JSON array | Static pages with titles, handles, and body HTML content. |
| `screenshot.png` | PNG | Homepage screenshot captured during the store audit step. |

## Downloading via API

```bash
# Get the job to see what's available
curl https://shopsniffer.com/api/jobs/a1b2c3d4-e5f6-7890-abcd-ef1234567890
# → { "job": { "downloads": { "csv": "products.csv", "productsJson": "products.json", … } } }

# Download a specific file
curl "https://shopsniffer.com/api/downloads?jobId=a1b2c3d4-…&key=products.csv" -o products.csv
```

See [`GET /api/downloads`](/api/reports#get-downloads) for the full reference including error responses and content types.

## Retention

Export files are kept on R2 for **90 days** after the job completes. After that, the `CleanupSnapshotsWorkflow` (runs weekly on Sundays at 03:00 UTC) deletes the files to control storage costs. The job metadata itself is kept indefinitely — fetching an expired file returns a `410 Gone`.

If you need longer retention:

- Download the files immediately after the job completes and store them yourself.
- Upgrade to [Pro Monthly](/pricing) for extended retention (coming soon — contact [support](https://shopsniffer.com/support) if needed sooner).
- Re-run the job periodically with [monitoring](/monitoring) to keep snapshots fresh.

## Use cases

**Store migration**

Import the CSV directly into a new Shopify store.
  **Competitor analysis**

Analyze a full catalog, pricing strategy, and vendor mix.
  **Market research**

Export products from multiple stores to study niche trends.
  **Data analysis**

Load JSON into a notebook or spreadsheet for custom analysis.
  **Backup**

Keep an offline copy of your own store's product data.
  **AI training**

Build datasets for retail / ecommerce ML models.

## Next steps

**[Product export reference](/product-export)**

CSV schema and Shopify import compatibility.
  **[Reports API](/api/reports)**

`GET /api/downloads` full reference.
  **[How it works](/how-it-works)**

How files are generated and uploaded to R2.
  **[Monitoring workflows](/monitoring-workflows)**

Retention and cleanup schedule.