# Mercado Livre, Shopee & TikTok Shop Fee Calculator (Brazil) (`tiagobquadros/brazil-marketplace-fee-calculator`) Actor

Exact 2026 seller fees and net profit for Mercado Livre, Shopee and TikTok Shop Brasil: commission, shipping cost tables, fixed fees, taxes and minimum price for a target margin. Official sources on every line.

- **URL**: https://apify.com/tiagobquadros/brazil-marketplace-fee-calculator.md
- **Developed by:** [tiago quadros](https://apify.com/tiagobquadros) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 fee calculations

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/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## 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.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Mercado Livre, Shopee & TikTok Shop Fee Calculator (Brazil)

Calculate the **exact seller fees and net profit** of a sale on **Mercado Livre, Shopee and TikTok Shop Brasil**, using the official 2026 fee tables. Send a list of products and get, for each marketplace:

- commission, fixed fees and shipping cost, line by line;
- what the marketplace pays you (payout) and your net profit and margin;
- the **minimum price** to reach a target margin;
- which marketplace is the most profitable for each product;
- a one-line summary in English and Portuguese, the fee table version and links to the official sources.

No scraping and no logins: pure, deterministic math on public fee rules and the numbers you send.

### What it covers

| Marketplace | Rules included | Effective from |
|---|---|---|
| Mercado Livre | Clássico / Premium commission, shipping cost tables for green, yellow and red reputation (Coleta, Agência, Full), fast free shipping below R$79, half-price cap below R$19, Flex fixed fee, used products, Full storage | 24 Aug 2026 |
| Shopee | Commission bands for CNPJ sellers (20% + R$4.50 up to R$79.99; 14% + R$16/20/26 above), half-price fixed fee below R$9, CPF surcharge, own-logistics freight co-payment | 1 Oct 2026 |
| TikTok Shop | Commission by price band (10% + R$4 below R$50; 6% + R$6 from R$50), Shipping Fee Program (6%, capped at R$50), affiliate commission | 15 Jul 2026 |
| Taxes (estimate) | MEI (monthly DAS spread over units), Simples Nacional Anexo I (effective rate from RBT12) or a manual % | 2026 |

Every number was checked against the official help pages and, for Mercado Livre, against the official *Simulador de custos*. Each result tells you which fee table was used (`feeTableId`) and when it was verified (`feeTableVerifiedOn`).

### Input

The only required field is `products`. Example:

```json
{
  "products": [
    { "sku": "FONE-01", "price": 89.9, "productCost": 35, "weightKg": 0.3 },
    { "sku": "TENIS-42", "price": 249.9, "productCost": 110, "weightKg": 1.2, "mlCommissionPercent": 14 }
  ],
  "targetMarginPercent": 20,
  "mlListingType": "classico",
  "mlLogistics": "coleta",
  "taxMode": "simples_anexo_1",
  "taxRbt12": 300000
}
```

- `price` is in BRL. `weightKg` is the billable package weight and is required for Mercado Livre (except Flex).
- Mercado Livre's commission depends on the category. Send yours in `mlCommissionPercent` (per product or for all). Without it we use 12% (Clássico) or 17% (Premium) and flag the line as an estimate.
- All other options are in the input form, with defaults.

### Output

One dataset item per product and marketplace:

```json
{
  "sku": "FONE-01",
  "marketplace": "shopee",
  "status": "ok",
  "price": 89.9,
  "marketplaceFees": 28.59,
  "payout": 61.31,
  "netProfit": 26.31,
  "marginPercent": 29.26,
  "minimumPriceForTarget": 65.84,
  "bestForProduct": false,
  "summaryEn": "Shopee: sale at R$ 89.90, marketplace fees R$ 28.59, net profit R$ 26.31 (29.26%).",
  "lines": [
    { "label": "Comissão Shopee (14%)", "amount": 12.59, "estimate": false, "sourceUrl": "https://seller.shopee.com.br/..." },
    { "label": "Valor fixo por item", "amount": 16, "estimate": false, "sourceUrl": "https://seller.shopee.com.br/..." }
  ],
  "warnings": [],
  "feeTableId": "shopee-2026-10-01",
  "feeTableVerifiedOn": "2026-10-26"
}
```

If a product has a problem (for example, no weight for Mercado Livre), you get an item with `status: "error"` and a message, and **that item is not charged**. The other products are calculated normally.

### Pricing

Pay per event: you pay per successful calculation (one product in one marketplace). Items with errors are free.

### For AI agents

- **Purpose:** compute Brazilian marketplace seller fees, payout, net profit and minimum price for a target margin.
- **Minimal input:** `{ "products": [{ "price": 100, "weightKg": 0.3 }] }`.
- **Read first:** `summaryEn`, `netProfit`, `marginPercent`, `minimumPriceForTarget`, `bestForProduct`, `warnings`.
- **Runs in seconds**, so `call-actor` returns within its wait time.
- Use with the Apify MCP server: `https://mcp.apify.com?tools=<username>/brazil-marketplace-fee-calculator`.

### Limitations

- Mercado Livre: Full Super, Livros, special categories and pet food have their own shipping tables, not applied yet (a warning is shown). Flex shipping bonus and ME1 are not included. The category commission reduction between R$150 and R$699.99 is not applied automatically.
- Shopee: CPF sellers below R$12 have a regressive fee with no public table; those lines are flagged as estimates.
- Taxes are estimates, not tax advice.

***

### Em português

Calcula as **tarifas e o lucro líquido** de uma venda no **Mercado Livre, Shopee e TikTok Shop**, com as tabelas oficiais de 2026: comissão, custo dos Envios, valores fixos, imposto estimado (MEI, Simples Anexo I ou %), repasse, margem, **preço mínimo para a margem que você quer** e o marketplace mais lucrativo para cada produto. Cada linha traz o link da fonte oficial. Sem scraping e sem login.

Envie `products` com `price` (em reais) e, para o Mercado Livre, `weightKg` (peso do pacote) e, de preferência, `mlCommissionPercent` (a comissão da sua categoria). Itens com erro não são cobrados.

# Actor input Schema

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

List of products. Each needs `price` (BRL). Optional: `sku`, `title`, `productCost`, `weightKg` (package weight, required for Mercado Livre except Flex), `packagingCost`, `adsPercent`, `otherCosts`, `invoiceValue`, `mlCommissionPercent` (your category's commission).

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

Which marketplaces to calculate. Default: all three.

## `targetMarginPercent` (type: `number`):

Optional. If set, each result includes the minimum price that reaches this net margin (e.g. 20 for 20%).

## `mlListingType` (type: `string`):

Clássico (10–14% commission) or Premium (15–19%, installments without interest).

## `mlCommissionPercent` (type: `number`):

Your category's commission. If empty, uses 12% (Clássico) or 17% (Premium) and flags it as an estimate. A product's own `mlCommissionPercent` wins.

## `mlLogistics` (type: `string`):

Coleta, Agência and Full pay the official shipping cost table (24 Aug 2026). Flex pays the fixed fee below R$79 instead.

## `mlReputation` (type: `string`):

Green includes MercadoLíder and no reputation. Yellow and red pay higher shipping tables. Ignored for used products.

## `mlCondition` (type: `string`):

Used products (and free listings) have their own shipping rules.

## `mlFastShippingBelow79` (type: `boolean`):

Optional 'frete grátis e rápido' for items under R$79, which costs more than standard.

## `mlOffersFreeShipping` (type: `boolean`):

Only for used items from R$79. Without free shipping the buyer pays and the seller's shipping cost is zero.

## `shopeeSellerType` (type: `string`):

CNPJ or CPF. CPF sellers with more than 450 orders in 90 days pay R$3 more per item.

## `shopeeCpfOver450Orders` (type: `boolean`):

Adds R$3 per item (CPF sellers only).

## `tiktokShippingFeeProgram` (type: `boolean`):

SFP charges 6% of the price, capped at R$50 per product. It is on by default for sellers.

## `tiktokAffiliatePercent` (type: `number`):

Optional. Commission you pay when the sale comes from an affiliate.

## `taxMode` (type: `string`):

How to estimate Brazilian taxes: none, MEI (fixed monthly DAS spread over units sold), Simples Nacional Anexo I (effective rate from last-12-month revenue) or a manual %.

## `taxPercent` (type: `number`):

Used when tax estimate = Manual %.

## `taxRbt12` (type: `number`):

Used when tax estimate = Simples Nacional, Anexo I (RBT12).

## `meiUnitsPerMonth` (type: `integer`):

Used when tax estimate = MEI. The monthly DAS is divided by this number.

## Actor input object example

```json
{
  "products": [
    {
      "sku": "FONE-01",
      "title": "Fone bluetooth",
      "price": 89.9,
      "productCost": 35,
      "weightKg": 0.3
    },
    {
      "sku": "TENIS-42",
      "title": "Tênis corrida",
      "price": 249.9,
      "productCost": 110,
      "weightKg": 1.2,
      "mlCommissionPercent": 14
    }
  ],
  "marketplaces": [
    "mercado_livre",
    "shopee",
    "tiktok_shop"
  ],
  "mlListingType": "classico",
  "mlLogistics": "coleta",
  "mlReputation": "verde",
  "mlCondition": "novo",
  "mlFastShippingBelow79": false,
  "mlOffersFreeShipping": false,
  "shopeeSellerType": "cnpj",
  "shopeeCpfOver450Orders": false,
  "tiktokShippingFeeProgram": true,
  "taxMode": "none"
}
```

# Actor output Schema

## `overview` (type: `string`):

Table with price, fees, payout, net profit, margin, minimum price for the target margin and the best channel per product.

## `results` (type: `string`):

Every result with itemized fee lines, warnings, fee table version and source links. Items with status "error" were not charged.

# 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 = {
    "products": [
        {
            "sku": "FONE-01",
            "title": "Fone bluetooth",
            "price": 89.9,
            "productCost": 35,
            "weightKg": 0.3
        },
        {
            "sku": "TENIS-42",
            "title": "Tênis corrida",
            "price": 249.9,
            "productCost": 110,
            "weightKg": 1.2,
            "mlCommissionPercent": 14
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("tiagobquadros/brazil-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 = { "products": [
        {
            "sku": "FONE-01",
            "title": "Fone bluetooth",
            "price": 89.9,
            "productCost": 35,
            "weightKg": 0.3,
        },
        {
            "sku": "TENIS-42",
            "title": "Tênis corrida",
            "price": 249.9,
            "productCost": 110,
            "weightKg": 1.2,
            "mlCommissionPercent": 14,
        },
    ] }

# Run the Actor and wait for it to finish
run = client.actor("tiagobquadros/brazil-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 '{
  "products": [
    {
      "sku": "FONE-01",
      "title": "Fone bluetooth",
      "price": 89.9,
      "productCost": 35,
      "weightKg": 0.3
    },
    {
      "sku": "TENIS-42",
      "title": "Tênis corrida",
      "price": 249.9,
      "productCost": 110,
      "weightKg": 1.2,
      "mlCommissionPercent": 14
    }
  ]
}' |
apify call tiagobquadros/brazil-marketplace-fee-calculator --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,tiagobquadros/brazil-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/XAg7EzgYK10hejqfg/builds/YyBDckiKwQ1rpSqQ2/openapi.json
