Monthly category export to S3

Land a whole category's SKU rows in your S3 bucket every month as Parquet — estimate first (free), then submit, poll and download, on a GitHub Actions schedule.

The problem

I want the full SKU-level dataset for my categories in my own object store, refreshed when Magpie refreshes.

How it works
  1. Estimate the export first — estimates are free and return exact rows and credit cost.
  2. Submit the export with a hard credit ceiling (max_credits) so a fat-fingered scope can't overspend.
  3. Poll until ready, then stream the signed URLs straight into s3:// without landing locally.
A taste of the code
from magpie_data import MagpieClient, Exports

exports = Exports(MagpieClient())
print(exports.estimate(country="ID", category_3=["Facial Serum"],
                       date_from="2026-05", date_to="2026-05"))  # free

job = exports.submit(country="ID", category_3=["Facial Serum"],
                     date_from="2026-05", date_to="2026-05",
                     format="parquet", max_credits=5_000)
job.download_to("s3://my-bucket/magpie/")

The full, runnable pipeline — argument parsing, retries, partial-result handling, delivery to S3/GCS — is in the repo: open on GitHub →

What it costs

Billed per exported row. The free estimate shows the exact price before you commit; max_credits refuses to run if the scope grew.

Estimates are always free — see how credits work.