# Add a product to the Vitacost cart

Automatically add a product to the Vitacost cart on vitacost.com. Add a vitacost.com product to the cart of this browser, from its id, Vitacost item number or product page link, in the quantity you give, and return the cart after the add.

- Site: vitacost.com
- Address: `reduck/vitacost.com/add_to_cart`
- Updated: 2026-11-25 (v1)
- Author: Reduck AI (reduck)

## Run it

Ask an AI agent connected to Reduck over MCP (`https://mcp.reduck.ai/mcp`) to run `reduck/vitacost.com/add_to_cart`, or run it from a terminal:

```bash
npx @reduck-ai/cli@latest run --script reduck/vitacost.com/add_to_cart
```

## Input

- `product` (string, required): Product id (from search-products), Vitacost item number, or a vitacost.com product page link.
- `quantity` (integer, optional)
- `variant_id` (string, optional): Variant id from get-product. Needed only when the product has more than one variant.

## Output

- `name` (string | null, required)
- `added` (boolean, required)
- `count` (integer, required)
- `lines` (array, required)
- `total` (number | null, required): Item subtotal after the store's automatic discounts, without tax or shipping.
- `offerId` (string, required): The variant id that was added.
- `productId` (string, required)

## FAQ

### What does "Add a product to the Vitacost cart" do?

Add a vitacost.com product to the cart of this browser, from its id, Vitacost item number or product page link, in the quantity you give, and return the cart after the add.

### How do I automatically add a product to the Vitacost cart on vitacost.com?

Ask an AI agent connected to Reduck to run reduck/vitacost.com/add_to_cart, or run it from a terminal with the Reduck CLI: npx @reduck-ai/cli@latest run --script reduck/vitacost.com/add_to_cart

### Is there a vitacost.com API to add a product to the Vitacost cart?

You do not need one. "Add a product to the Vitacost cart" drives the real vitacost.com pages in a browser, so it works whether or not vitacost.com offers an API for this.

### What information do I need to provide?

Required: product. Optional: quantity, variant_id.

### What does it return?

It returns name, added, count, lines, total, offerId, productId.

### Do I need to be logged in to vitacost.com?

No. It only uses pages of vitacost.com that are reachable without signing in.

### Does it change anything on vitacost.com, or only read data?

It makes changes on vitacost.com, like sending, posting, booking or buying something.

### How do I run it?

Ask an AI agent connected to Reduck to run reduck/vitacost.com/add_to_cart, or run it from a terminal with the Reduck CLI: npx @reduck-ai/cli@latest run --script reduck/vitacost.com/add_to_cart

### Who maintains it?

It is one of Reduck's official scripts.

Source: https://reduck.ai/explore/scripts/reduck/vitacost.com/add_to_cart
