Skip to main content

Muse Amazon Shopping Bypass

This is a direct response to Amazon's block of AI agent shopping traffic on 9/20/2026.

Amazon product search and add-to-cart API for Muse. Run it on the machine Muse can already SSH into, then point Muse at http://127.0.0.1:8792.

One connection covers two carts, personal and business. Each cart is a Netscape cookie jar exported from a normal browser. This package does not include anyone's cookies, hostname, or API key.

Search does not require a login. Add to cart does. Adding an item does not check out or pay.

Set up

You need Python 3.11+.

python -m venv .venv
source .venv/bin/activate
pip install git+https://github.com/aasper03/muse-amazon-bypass.git
mkdir -p ~/.amazon-cart
chmod 700 ~/.amazon-cart
openssl rand -hex 32 > ~/.amazon-cart/api-key
chmod 600 ~/.amazon-cart/api-key

Sign in to Amazon in a normal browser. Amazon blocks automated login windows. Export cookies for each account (chmod 600):

Account File
personal ~/.amazon-cart/cookies-personal.txt
business ~/.amazon-cart/cookies-business.txt

A business session includes a b2b cookie. A personal add is refused when that cookie is present, and a business add is refused when it is missing.

export AMAZON_API_KEY="$(cat ~/.amazon-cart/api-key)"
export HOST=127.0.0.1
export PORT=8792
amazon-cart

MUSE_API_KEY is accepted as an alias of AMAZON_API_KEY.

Confirm the server is up:

curl -sS http://127.0.0.1:8792/health

Expect {"ok":true,"service":"amazon-cart"}.

Use from Muse over SSH

When Muse has a shell on the machine running amazon-cart, it calls the API on localhost. Leave the process bound to 127.0.0.1. A public hostname and TLS are not part of this setup.

Tell Muse the SSH host, the base URL http://127.0.0.1:8792, and to send Authorization: Bearer with AMAZON_API_KEY. Keep the key out of chat. A prompt you can paste is in MUSE.md.

After SSH, Muse can run:

curl -sS -H "Authorization: Bearer $AMAZON_API_KEY" \
  'http://127.0.0.1:8792/search?query=usb-c+cable&max_results=5'

curl -sS -H "Authorization: Bearer $AMAZON_API_KEY" \
  'http://127.0.0.1:8792/cart/add?asin=B000000000&quantity=1&account=personal'
Method Path Purpose
GET /health Liveness, no auth
GET /search?query=… Search products
GET /product/{asin} Product details
GET /product/{asin}/variations Variants
GET /cart?account=personal|business Read that cart
GET /cart/add?asin=…&quantity=1&account=… Add to that cart

POST /cart accepts {"asin","quantity","region","account"}. A missing login returns HTTP 409. An Amazon block page returns HTTP 503.

Use account=personal or account=business on cart routes. One key covers both carts.

Optional: public HTTPS provider

Muse can also register this API with credentials.request_api_access. That connector stores api_hosts as a bare public hostname and calls it over HTTPS. Put TLS in front of port 8792 first. See Caddyfile.example and the registration steps in MUSE.md.

For that connector, the hostname has no https:// and no path. placement is bearer_header and cannot be changed later.

Use without Muse

The same server is a normal HTTP API. Skip Muse and call it yourself with the Bearer key:

curl -sS -H "Authorization: Bearer $AMAZON_API_KEY" \
  'http://127.0.0.1:8792/search?query=usb-c+cable&max_results=5'

X-Api-Key is also accepted. Search accepts max_results (default 16) and region (default us): us, uk, ca, de, fr, es, it, nl, jp, au, mx, in, ae, sa, ie, be. /regions and /products are also available. /products is an alias for search.

Metadata

Release files for amazon-cart 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for amazon-cart 0.1.1
File Size Uploaded
amazon_cart-0.1.1.tar.gz 13.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for amazon-cart 0.1.1
File Interpreter ABI Platform
amazon_cart-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 26.8 kB

Release files / amazon_cart-0.1.1.tar.gz

Download URL amazon_cart-0.1.1.tar.gz
Size 13.9 kB
Tags Source
SHA-256 checksum
How to use checksums
ea47ca7616db09118fef0c2e0e70f85c59551f3ecca8a4fd229acae3261eae81
BLAKE2b-256 checksum
How to use checksums
cd901b74c04323d05828da1226cecdcfb92a3133f2500ac83cb387421e02cafa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 7, 2026.

Transparency log

Release files / amazon_cart-0.1.1-py3-none-any.whl

Download URL amazon_cart-0.1.1-py3-none-any.whl
Size 12.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2dd8a10beb6a55213b494f4394e3eaceecd50da56309866578ab13871a97cb18
BLAKE2b-256 checksum
How to use checksums
0872b78de3ba79de11cf582bad51b2849c6ac62cec8b275f6fe31360723245a1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 7, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page