{
  "openapi": "3.0.1",
  "info": {
    "title": "Mercado Livre, Shopee & TikTok Shop Fee Calculator (Brazil)",
    "description": "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.",
    "version": "0.1",
    "x-build-id": "YyBDckiKwQ1rpSqQ2"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/tiagobquadros~brazil-marketplace-fee-calculator/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-tiagobquadros-brazil-marketplace-fee-calculator",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/tiagobquadros~brazil-marketplace-fee-calculator/runs": {
      "post": {
        "operationId": "runs-sync-tiagobquadros-brazil-marketplace-fee-calculator",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/tiagobquadros~brazil-marketplace-fee-calculator/run-sync": {
      "post": {
        "operationId": "run-sync-tiagobquadros-brazil-marketplace-fee-calculator",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "required": [
          "products"
        ],
        "properties": {
          "products": {
            "title": "Products",
            "type": "array",
            "description": "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": {
            "title": "Marketplaces",
            "type": "array",
            "description": "Which marketplaces to calculate. Default: all three.",
            "items": {
              "type": "string",
              "enum": [
                "mercado_livre",
                "shopee",
                "tiktok_shop"
              ],
              "enumTitles": [
                "Mercado Livre",
                "Shopee",
                "TikTok Shop"
              ]
            },
            "default": [
              "mercado_livre",
              "shopee",
              "tiktok_shop"
            ]
          },
          "targetMarginPercent": {
            "title": "Target net margin (%)",
            "maximum": 99,
            "type": "number",
            "description": "Optional. If set, each result includes the minimum price that reaches this net margin (e.g. 20 for 20%)."
          },
          "mlListingType": {
            "title": "Mercado Livre: listing type",
            "enum": [
              "classico",
              "premium"
            ],
            "type": "string",
            "description": "Clássico (10–14% commission) or Premium (15–19%, installments without interest).",
            "default": "classico"
          },
          "mlCommissionPercent": {
            "title": "Mercado Livre: category commission (%)",
            "minimum": 0,
            "maximum": 99,
            "type": "number",
            "description": "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": {
            "title": "Mercado Livre: shipping mode",
            "enum": [
              "coleta",
              "agencia",
              "full",
              "flex"
            ],
            "type": "string",
            "description": "Coleta, Agência and Full pay the official shipping cost table (24 Aug 2026). Flex pays the fixed fee below R$79 instead.",
            "default": "coleta"
          },
          "mlReputation": {
            "title": "Mercado Livre: seller reputation",
            "enum": [
              "verde",
              "amarela",
              "vermelha"
            ],
            "type": "string",
            "description": "Green includes MercadoLíder and no reputation. Yellow and red pay higher shipping tables. Ignored for used products.",
            "default": "verde"
          },
          "mlCondition": {
            "title": "Mercado Livre: product condition",
            "enum": [
              "novo",
              "usado"
            ],
            "type": "string",
            "description": "Used products (and free listings) have their own shipping rules.",
            "default": "novo"
          },
          "mlFastShippingBelow79": {
            "title": "Mercado Livre: offer fast free shipping below R$79",
            "type": "boolean",
            "description": "Optional 'frete grátis e rápido' for items under R$79, which costs more than standard.",
            "default": false
          },
          "mlOffersFreeShipping": {
            "title": "Mercado Livre: used item offers free shipping (R$79+)",
            "type": "boolean",
            "description": "Only for used items from R$79. Without free shipping the buyer pays and the seller's shipping cost is zero.",
            "default": false
          },
          "shopeeSellerType": {
            "title": "Shopee: seller type",
            "enum": [
              "cnpj",
              "cpf"
            ],
            "type": "string",
            "description": "CNPJ or CPF. CPF sellers with more than 450 orders in 90 days pay R$3 more per item.",
            "default": "cnpj"
          },
          "shopeeCpfOver450Orders": {
            "title": "Shopee: CPF seller with more than 450 orders in 90 days",
            "type": "boolean",
            "description": "Adds R$3 per item (CPF sellers only).",
            "default": false
          },
          "tiktokShippingFeeProgram": {
            "title": "TikTok Shop: in the Shipping Fee Program (SFP)",
            "type": "boolean",
            "description": "SFP charges 6% of the price, capped at R$50 per product. It is on by default for sellers.",
            "default": true
          },
          "tiktokAffiliatePercent": {
            "title": "TikTok Shop: affiliate commission (%)",
            "minimum": 0,
            "maximum": 99,
            "type": "number",
            "description": "Optional. Commission you pay when the sale comes from an affiliate."
          },
          "taxMode": {
            "title": "Tax estimate",
            "enum": [
              "none",
              "mei",
              "simples_anexo_1",
              "manual"
            ],
            "type": "string",
            "description": "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 %.",
            "default": "none"
          },
          "taxPercent": {
            "title": "Manual tax rate (%)",
            "minimum": 0,
            "maximum": 99,
            "type": "number",
            "description": "Used when tax estimate = Manual %."
          },
          "taxRbt12": {
            "title": "Simples Nacional: revenue in the last 12 months (BRL)",
            "minimum": 1,
            "type": "number",
            "description": "Used when tax estimate = Simples Nacional, Anexo I (RBT12)."
          },
          "meiUnitsPerMonth": {
            "title": "MEI: units sold per month",
            "minimum": 1,
            "type": "integer",
            "description": "Used when tax estimate = MEI. The monthly DAS is divided by this number."
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}