# Marketplace Fee & Profit Calculator (`trovevault/marketplace-fee-calculator`) Actor

Calculates Amazon, eBay, and Etsy seller fees, fulfillment costs, net profit, margin, breakeven price, and pricing recommendations for marketplace products.

- **URL**: https://apify.com/trovevault/marketplace-fee-calculator.md
- **Developed by:** [Trove Vault](https://apify.com/trovevault) (community)
- **Categories:** E-commerce
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.85 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Marketplace Fee & Profit Calculator

Estimate Amazon, eBay, and Etsy seller fees before a product quietly eats your margin.

Marketplace Fee & Profit Calculator turns product price, category, shipping, product cost, and optional package dimensions into a clean margin table. For each product, it compares supported marketplace and fulfillment scenarios, then returns estimated fees, net revenue, profit, margin, breakeven price, recommended minimum price, and the best-ranked selling scenario.

Use it when you are deciding whether to list a product, raise the price, change shipping, move from merchant fulfillment to FBA, or compare Amazon against eBay and Etsy before buying inventory.

### What You Can Decide

- Whether a product is still profitable after marketplace fees and fulfillment costs.
- Which channel gives the strongest margin for the same item.
- Whether shipping charged to the buyer is helping or hurting profit.
- The minimum sale price needed to hit your target margin.
- Whether Amazon FBA looks better or worse than seller fulfillment for a product.
- Which marketplace scenarios deserve manual review before listing or repricing.

It is strongest as a batch planning tool: send several product candidates and get a comparable table for CSV, Excel, BI tools, repricing workflows, or downstream Apify Actors.

### Supported Scenarios

| Marketplace | Fulfillment | Current scope |
| --- | --- | --- |
| Amazon US | FBA estimate and seller fulfilled | Referral fee by category. FBA estimated from supplied package size and weight. |
| eBay US | Seller fulfilled | Final value fee estimate, including the common per-order fee. |
| Etsy US | Seller fulfilled | Listing fee, transaction fee, and US payment processing estimate. |

Set `fulfillmentScenario` to `compare` to generate all supported scenarios for each selected marketplace. For Amazon, that means FBA and seller fulfilled. For eBay and Etsy, this version returns seller-fulfilled rows.

### Why Shipping Fields Matter

Shipping is where fee calculators often become misleading. This Actor separates two numbers:

- `shippingCharged`: what the buyer pays.
- `shippingCostToSeller`: what you pay to ship or fulfill the order.

For seller-fulfilled Amazon, eBay, and Etsy scenarios, shipping charged can increase both revenue and fee basis. A product sold for `$24.99 + $4.99 shipping` may have percentage fees calculated on `$29.98`.

For Amazon FBA, `buyerPaidTotal` stays visible but margin uses `sellerGrossRevenue`, because FBA shipping economics are not merchant-paid postage.

### Input

```json
{
  "country": "US",
  "marketplaces": ["amazon", "ebay", "etsy"],
  "fulfillmentScenario": "compare",
  "desiredMarginPercent": 30,
  "products": [
    {
      "sku": "ceramic-mug-12oz",
      "productName": "12 oz ceramic mug",
      "category": "home_kitchen",
      "salePrice": 24.99,
      "productCost": 6.25,
      "shippingCharged": 4.99,
      "shippingCostToSeller": 5.65,
      "weightOz": 14,
      "lengthIn": 5,
      "widthIn": 4,
      "heightIn": 4
    }
  ]
}
```

#### Input Fields

| Field | Required | Purpose |
| --- | --- | --- |
| `country` | Yes | Fee schedule country. Current version supports `US`. |
| `marketplaces` | Yes | Marketplaces to compare: `amazon`, `ebay`, `etsy`. |
| `fulfillmentScenario` | Yes | `compare`, `seller_fulfilled`, or `marketplace_fulfilled`. |
| `desiredMarginPercent` | No | Target margin for `recommendedMinPrice`. Defaults to `30`. |
| `products` | Yes | Product rows to calculate. |

Product objects support `sku`, `productName`, `category`, `salePrice`, `productCost`, `shippingCharged`, `shippingCostToSeller`, `otherUnitCosts`, `weightOz`, `lengthIn`, `widthIn`, and `heightIn`.

Useful category values include `most_categories`, `home_kitchen`, `electronics_accessories`, `grocery`, `beauty`, `apparel`, `footwear`, `furniture`, `jewelry`, `books`, `art`, `craft_supplies`, `musical_instruments`, and `watches`.

### Output

One product with all marketplaces and `compare` fulfillment returns four rows: Amazon marketplace fulfilled, Amazon seller fulfilled, eBay seller fulfilled, and Etsy seller fulfilled.

Example row:

```json
{
  "sku": "ceramic-mug-12oz",
  "productName": "12 oz ceramic mug",
  "marketplace": "etsy",
  "country": "US",
  "category": "home_kitchen",
  "fulfillmentMethod": "seller_fulfilled",
  "salePrice": 24.99,
  "shippingCharged": 4.99,
  "buyerPaidTotal": 29.98,
  "sellerGrossRevenue": 29.98,
  "feeBasisAmount": 29.98,
  "feeBasisIncludesShipping": true,
  "productCost": 6.25,
  "shippingCostToSeller": 5.65,
  "marketplaceFees": 3.3,
  "fulfillmentFees": 0,
  "totalEstimatedFees": 3.3,
  "netRevenue": 26.68,
  "shippingProfitOrLoss": -0.66,
  "estimatedProfit": 14.78,
  "marginPercent": 49.3,
  "feeBurdenPercent": 11.01,
  "breakEvenPrice": 8.66,
  "recommendedMinPrice": 15.42,
  "desiredMarginPercent": 30,
  "marginStatus": "healthy",
  "scenarioRankForProduct": 1
}
```

Key output fields include `marketplaceFees`, `fulfillmentFees`, `totalEstimatedFees`, `feeBasisAmount`, `feeBasisIncludesShipping`, `shippingProfitOrLoss`, `estimatedProfit`, `marginPercent`, `feeBurdenPercent`, `breakEvenPrice`, `recommendedMinPrice`, and `scenarioRankForProduct`.

### API Usage

```bash
curl -X POST "https://api.apify.com/v2/acts/trovevault~marketplace-fee-calculator/runs" \
  -H "Authorization: Bearer YOUR_APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "country": "US",
    "marketplaces": ["amazon", "ebay", "etsy"],
    "fulfillmentScenario": "compare",
    "desiredMarginPercent": 30,
    "products": [
      {
        "sku": "ceramic-mug-12oz",
        "productName": "12 oz ceramic mug",
        "category": "home_kitchen",
        "salePrice": 24.99,
        "productCost": 6.25,
        "shippingCharged": 4.99,
        "shippingCostToSeller": 5.65,
        "weightOz": 14,
        "lengthIn": 5,
        "widthIn": 4,
        "heightIn": 4
      }
    ]
  }'
```

Use `datasetId` to append rows to an existing dataset and `runId` to carry your own pipeline identifier into the output.

### Common Workflows

- **Product sourcing:** sort candidates by `estimatedProfit`, `marginPercent`, and `scenarioRankForProduct`.
- **Repricing:** compare the current price with `recommendedMinPrice`.
- **Shipping review:** inspect `shippingCharged`, `shippingCostToSeller`, `shippingProfitOrLoss`, and `feeBasisIncludesShipping`.
- **Channel comparison:** run the same product across Amazon, eBay, and Etsy before listing or repricing.

### Limitations

This Actor estimates marketplace economics. It is not accounting advice, tax advice, or a guarantee of exact account fees.

- Current fee schedules are US-only.
- Amazon FBA is estimated from public size-tier rules and supplied dimensions, not authenticated Seller Central fee preview.
- Amazon subscription fees, storage, inbound placement, returns, removal, aged inventory, ads, Vine, coupons, and promotions are not included.
- eBay Store discounts, promoted listings, insertion fees beyond common free allowances, seller performance surcharges, optional upgrades, Motors, and international site differences are not included.
- Etsy offsite ads, VAT, regulatory fees, currency conversion, Pattern, regional payment processing differences, and ads are not included.
- Category mapping is normalized and may not match every marketplace subcategory exactly.

Use `otherUnitCosts` to include costs this version does not model directly.

### Troubleshooting

| Problem | What to check |
| --- | --- |
| Amazon FBA looks too low or too high | Add accurate packaged weight and dimensions. |
| Profit looks too optimistic | Add ads, returns, prep, packaging, storage, or other costs to `otherUnitCosts`. |
| Shipping hurts margin | Check `shippingCharged`, `shippingCostToSeller`, and `feeBasisIncludesShipping`. |
| Category fees look too generic | Use the closest supported normalized category and review the result before pricing. |
| You need exact Amazon account fees | Use Seller Central fee preview or SP-API fee estimates and treat this Actor as a planning layer. |

### FAQ

**Is this an Amazon FBA calculator?** Partly. It estimates Amazon FBA fees, but the stronger use case is comparing Amazon FBA, Amazon seller fulfilled, eBay, and Etsy in one table.

**Can it process multiple products?** Yes. Add multiple objects to `products`; the Actor returns one row for each product and supported marketplace scenario.

**Does it monitor fee changes?** Not yet. The current version is a calculator; a later monitor mode could compare stored rules against public fee pages.

**Can this feed spreadsheets, MCP, or repricing systems?** Yes. The output is structured for CSV, Excel, dashboards, agents, MCP workflows, or downstream Apify Actors.

**Is it legal to use?** This Actor performs rule-based calculations from public fee structures and user-provided product economics. Review marketplace terms, seller agreements, taxes, and account-specific fees before pricing decisions.

### Changelog

- `0.1.0`: Initial US Amazon, eBay, and Etsy fee calculator with FBA estimates, shipping impact fields, breakeven price, recommended minimum price, and batch product input.

### Feedback and Support

Open an issue with the marketplace, category, example input, and row you want reviewed. Fee schedules change, so include the date and relevant marketplace documentation when asking for a rule update.

# Actor input Schema

## `country` (type: `string`):

Country fee schedule to use. The current version supports US marketplace rules only.

## `marketplaces` (type: `array`):

Marketplaces to compare. Select one for a focused estimate or several to compare fee burden and margin side by side.

## `fulfillmentScenario` (type: `string`):

Choose seller fulfilled, marketplace fulfilled where supported, or compare both. Amazon supports FBA and seller fulfilled. eBay and Etsy are calculated as seller fulfilled in this version.

## `desiredMarginPercent` (type: `number`):

Target profit margin used to calculate the recommended minimum sale price. Example: use 30 to target 30% margin after marketplace fees, fulfillment, shipping cost, and product cost.

## `products` (type: `array`):

Products to estimate. Include price, category, product cost, shipping charged to the buyer, shipping cost paid by the seller, and physical size when comparing Amazon FBA.

## `datasetId` (type: `string`):

Optional existing Apify dataset ID to append the same fee calculation rows to, in addition to the default run dataset.

## `runId` (type: `string`):

Optional identifier copied to output rows for downstream tracing in repricing, sourcing, or catalog workflows.

## Actor input object example

```json
{
  "country": "US",
  "marketplaces": [
    "amazon",
    "ebay",
    "etsy"
  ],
  "fulfillmentScenario": "compare",
  "desiredMarginPercent": 30,
  "products": [
    {
      "sku": "ceramic-mug-12oz",
      "productName": "12 oz ceramic mug",
      "category": "home_kitchen",
      "salePrice": 24.99,
      "productCost": 6.25,
      "shippingCharged": 4.99,
      "shippingCostToSeller": 5.65,
      "weightOz": 14,
      "lengthIn": 5,
      "widthIn": 4,
      "heightIn": 4
    }
  ]
}
```

# Actor output Schema

## `dataset` (type: `string`):

No description

## `summary` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "marketplaces": [
        "amazon",
        "ebay",
        "etsy"
    ],
    "products": [
        {
            "sku": "ceramic-mug-12oz",
            "productName": "12 oz ceramic mug",
            "category": "home_kitchen",
            "salePrice": 24.99,
            "productCost": 6.25,
            "shippingCharged": 4.99,
            "shippingCostToSeller": 5.65,
            "weightOz": 14,
            "lengthIn": 5,
            "widthIn": 4,
            "heightIn": 4
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("trovevault/marketplace-fee-calculator").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "marketplaces": [
        "amazon",
        "ebay",
        "etsy",
    ],
    "products": [{
            "sku": "ceramic-mug-12oz",
            "productName": "12 oz ceramic mug",
            "category": "home_kitchen",
            "salePrice": 24.99,
            "productCost": 6.25,
            "shippingCharged": 4.99,
            "shippingCostToSeller": 5.65,
            "weightOz": 14,
            "lengthIn": 5,
            "widthIn": 4,
            "heightIn": 4,
        }],
}

# Run the Actor and wait for it to finish
run = client.actor("trovevault/marketplace-fee-calculator").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "marketplaces": [
    "amazon",
    "ebay",
    "etsy"
  ],
  "products": [
    {
      "sku": "ceramic-mug-12oz",
      "productName": "12 oz ceramic mug",
      "category": "home_kitchen",
      "salePrice": 24.99,
      "productCost": 6.25,
      "shippingCharged": 4.99,
      "shippingCostToSeller": 5.65,
      "weightOz": 14,
      "lengthIn": 5,
      "widthIn": 4,
      "heightIn": 4
    }
  ]
}' |
apify call trovevault/marketplace-fee-calculator --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,trovevault/marketplace-fee-calculator"
        }
    }
}

```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/dr8HRjCer7jV9a637/builds/M07YQJMS3J2psEqpw/openapi.json
