# Amazon FBA Profit Analyzer: Margin, ROI & Break-even (`badr_xba/amazon-fba-profit-analyzer`) Actor

Works with the output of any Amazon scraper: FBA profit per unit, margin, ROI, break-even price and ROAS, opportunity score and price history, with the fees you enter or your own SP-API fee estimates. Never requests an Amazon web page.

- **URL**: https://apify.com/badr_xba/amazon-fba-profit-analyzer.md
- **Developed by:** [Badr Bouargan](https://apify.com/badr_xba) (community)
- **Categories:** E-commerce
- **Features:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.70 / 1,000 fba profit calculation

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/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

### What is Amazon FBA Profit Analyzer?

**Amazon FBA Profit Analyzer** calculates profit per unit, margin, ROI and break-even price for Amazon products you already scraped, so you can decide which products are worth selling with FBA. It reads the dataset of any Amazon scraper or your own file, and computes every number from the fees and costs you type. It never requests an Amazon web page.

- **Import any Amazon scraper's output**: pick an Apify dataset or paste a JSON, JSON Lines or CSV file URL.
- **Compute full FBA unit economics**: referral, FBA, storage, inbound placement and closing fees, plus unit cost, shipping to Amazon, prep, packaging, import, ads and other costs.
- **Get break-even numbers**: break-even price, break-even ROAS, and profit for 100 and 1,000 units.
- **Use a per-ASIN costs file**: one CSV with your real purchase price (and fees) per ASIN.
- **Sort with an opportunity score**: 0-100, with every signal and its evidence (margin, ROI, demand shown in your data, reviews, rating, sellers).
- **Track price changes between runs**: each product shows its previous price and profit.
- **Optional fees from Amazon**: with your own Selling Partner API keys, the fees come from Amazon's Product Fees API.

All amounts are estimates computed from your inputs, not official Amazon amounts. Who uses it: Amazon FBA sellers screening product ideas, wholesale and online-arbitrage buyers checking a supplier list, and agencies preparing product research for clients.

> This Actor is not affiliated with, endorsed by or sponsored by Amazon.

### What data does Amazon FBA Profit Analyzer calculate?

One dataset row per unique product. Values that are not in your data stay `null`: nothing is guessed.

| Field | Description | Example |
| --- | --- | --- |
| 💰 `profitPerUnit` | Price − Amazon fees − landed cost − ads | `6.94` |
| 📊 `marginPercent`, `roiPercent` | Profit ÷ price, and profit ÷ landed cost | `27.8`, `99.2` |
| ⚖️ `breakEvenPrice`, `breakEvenRoas` | The price that makes 0, and the lowest ROAS your ads can have | `16.82`, `2.79` |
| 📦 `profitFor100`, `profitFor1000` | Profit for a batch of 100 or 1,000 units | `6941.5` |
| 🧾 `fees` | Referral, FBA, storage, inbound placement, closing, total, and `source` (`entered`, `sp-api` or `missing`) | `{"referral": 3.75, "fba": 5, "total": 9.05}` |
| 🏭 `costs` | Unit cost, shipping to Amazon, prep, packaging, import, ads, other, landed cost | `{"unitCost": 6, "landedCost": 7}` |
| 🎯 `opportunityScore`, `opportunity` | 0-100 and each signal with points and evidence | `91` |
| 🏷️ `asin`, `marketplace`, `title`, `brand`, `category`, `price`, `currency` | As found in your data | `US`, `24.99`, `USD` |
| ⭐ `rating`, `reviewsCount`, `bsr`, `boughtPastMonth` | As found in your data; "bought in past month" only when shown, never estimated | `4.6`, `412`, `2350` |
| 🛒 `soldByAmazon`, `fulfilledByAmazon`, `sellersCount` | Seller signals, when your data shows them | `false`, `2` |
| 📝 `assumptions`, `missing`, `history` | Every assumption, what is missing, and the change since the last run | `price_change` |

The formula:

```
referral        = price × referralFeePercent / 100
Amazon fees     = referral + FBA + storage + inbound placement + closing
landed cost     = unit cost + shipping to Amazon + prep + packaging + import + other
profit per unit = price − Amazon fees − landed cost − ads
break-even      = (Amazon fees − referral + landed cost + ads) ÷ (1 − referral %)
break-even ROAS = price ÷ (price − Amazon fees − landed cost)
```

Example: price $20.00, referral 15 %, FBA $5.00, unit cost $6.00 → fees $8.00, profit $6.00, margin 30 %, ROI 100 %, break-even $12.94, break-even ROAS 3.33.

### How to calculate Amazon FBA profit

1. Click Try for free on this page, or create a free Apify account.
2. Run an Amazon scraper first, for example [Amazon Product Scraper](https://apify.com/badr_xba/amazon-product-scraper) or [Amazon Best Sellers + Profit](https://apify.com/badr_xba/amazon-bestsellers-profit).
3. Open this Actor and pick that run's dataset in *Apify dataset ids*, or paste a file URL in *File URLs*.
4. Enter your referral fee %, FBA fee and unit cost (from your Seller Central fee schedule), plus any other cost, or add a per-ASIN costs file.
5. Click *Start*, then open the visual report or download your data as JSON, CSV, Excel or HTML.

Try it free: run it with an empty input. It analyzes 3 fictional demo products with example fees to show the output format. They are marked `demo: true` and "\[DEMO]", are not Amazon data, and are never charged.

#### Optional: your own Amazon SP-API keys

If you have a Selling Partner API app for your own seller account, add its LWA client id, client secret and refresh token. The fees then come from Amazon's Product Fees API (`getMyFeesEstimateForASIN`), at most 1 request per second. The three fields are secret inputs: encrypted by Apify, never shown in logs or outputs. This path follows Amazon's documentation and was tested with mocked answers, not yet with a live seller account. Without these keys, the Actor uses the fees you type.

### How much does it cost to calculate Amazon FBA profit?

You pay per product with a computed profit. There is no start fee.

| Apify plan | Price per FBA profit calculation | Per 1,000 |
| --- | --- | --- |
| Free | $0.001 | $1.00 |
| Starter | $0.0009 | $0.90 |
| Scale | $0.0008 | $0.80 |
| Business | $0.0007 | $0.70 |

One FBA profit calculation is one product delivered with profit, margin, ROI and break-even computed.

The Apify Free plan gives you $5 of platform credit each month. That covers about 5,000 profit calculations a month on the Free plan.

Examples:

- 1,000 products from one scraper run: $1.00 on the Free plan, $0.70 on Business.
- 200 products where 50 lack a fee or a price: 150 are charged ($0.15 on Free), and the 50 others are delivered free with `missing` explaining what to add.

Never charged: products without a computable profit, duplicates, filtered products, failed inputs and demo rows. Nothing is charged twice if the platform moves the run. Set *Maximum cost per run* in the run options: the Actor stops cleanly at that limit and never saves more rows than it can charge.

### ⬇️ Input

A run on a scraper's dataset, with example fees (use the fees of your own category and size tier):

```json
{
  "datasetIds": ["YOUR_AMAZON_SCRAPER_DATASET_ID"],
  "referralFeePercent": 15,
  "fbaFeePerUnit": 5.0,
  "storageFeePerUnit": 0.3,
  "unitCost": 6.0,
  "shippingToAmazonPerUnit": 1.0,
  "adCostPerUnit": 2.0,
  "costCurrency": "USD",
  "minMarginPercent": 20,
  "sortBy": "opportunityScore"
}
```

A per-ASIN costs file (`costsFileUrl`); a value in the file replaces the run-wide value for that ASIN only. Column names are matched loosely (`Unit Cost`, `unit_cost`, `cogs`, `fba fee`…):

```csv
asin,unitCost,fbaFeePerUnit,referralFeePercent
B0D14N2QZF,18.40,6.12,15
B079JLY5M5,4.10,3.86,8
```

| Field | What it does |
| --- | --- |
| `datasetIds`, `fileUrls` | Your Amazon data: Apify datasets (read only) or JSON / JSONL / CSV URLs. Amazon page URLs are refused. |
| `marketplace` | Used only for rows without a marketplace. |
| `referralFeePercent`, `fbaFeePerUnit`, `storageFeePerUnit`, `inboundPlacementFeePerUnit`, `closingFeePerUnit` | Amazon fees typed by you. Referral and FBA fees are required unless SP-API keys are given. |
| `unitCost`, `shippingToAmazonPerUnit`, `prepPerUnit`, `packagingPerUnit`, `importPerUnit`, `adCostPerUnit`, `otherPerUnit` | Your costs per unit. Unit cost is required; the others count as 0 when empty. |
| `costsFileUrl`, `costCurrency` | Per-ASIN costs, and the currency of your numbers (mixed currencies are refused). |
| `lwaClientId`, `lwaClientSecret`, `refreshToken` | Optional SP-API keys of your own seller account (secret inputs). |
| `onlyComputed`, `minProfitPerUnit`, `minMarginPercent`, `minRoiPercent`, `minOpportunityScore`, `sortBy`, `maxItems` | Filters, sorting and the limit (100 by default). |
| `useHistory`, `failRunOnError` | Price history between runs, and how input errors end the run. |

Accepted data: the fields of Amazon Product Scraper and Amazon Best Sellers + Profit are mapped one by one, plus generic `asin`, `title`, `price` (`19.99`, `"$19.99"` or `{amount, currency}`), `rating`, `reviews`, `bsr`, `category`, `brand`, `url`, `image`, `sellersCount` and "bought in past month" fields. The profit columns of Amazon Best Sellers + Profit are not reused: the profit is computed again from your inputs.

The input form of the demo run shown below (empty input):

![Amazon FBA Profit Analyzer input form in Apify Console: Your Amazon data section with dataset ids, file URLs and marketplace, then the fee and cost sections](https://api.apify.com/v2/key-value-stores/R1P4OnWyoV0LnGBin/records/amazon-fba-profit-analyzer-top200-1-input.png)

*Real run A9SkrlkkbzvnKUgwn · Nov 29, 2026 · empty input · Demo mode (fictional products and example fees generated by the Actor)*

### ⬆️ Output

Each run saves a dataset with the views *Overview*, *Profit & fees*, *Market signals* and *History*, and a visual report. You can download your data as JSON, CSV, Excel or HTML. The first row of the demo run, shortened:

```json
{
  "asin": "DEMO000001",
  "marketplace": "US",
  "title": "[DEMO] Insulated steel water bottle 750 ml (fictional demo)",
  "price": 24.99,
  "currency": "USD",
  "demo": true,
  "fees": { "referral": 3.75, "referralPercent": 15, "fba": 5, "storage": 0.3, "total": 9.05, "source": "entered" },
  "costs": { "unitCost": 6, "shippingToAmazon": 1, "ads": 2, "landedCost": 7 },
  "profitPerUnit": 6.94,
  "marginPercent": 27.8,
  "roiPercent": 99.2,
  "breakEvenPrice": 16.82,
  "breakEvenRoas": 2.79,
  "profitFor1000": 6941.5,
  "opportunityScore": 91,
  "estimate": true,
  "assumptions": ["EXAMPLE fees of the fictional demo (not Amazon's fee schedule, not your fees)."]
}
```

The product cards of the visual report:

![Amazon FBA Profit Analyzer visual report cards: 3 fictional demo products with profit per unit, margin, ROI, fees, landed cost and break-even price](https://api.apify.com/v2/key-value-stores/R1P4OnWyoV0LnGBin/records/amazon-fba-profit-analyzer-top200-2-output.jpg)

*Real run A9SkrlkkbzvnKUgwn · Nov 29, 2026 · empty input: report cards · Demo mode (fictional products and example fees generated by the Actor)*

The top of the same report, with the median profit and the margin and score charts:

![Amazon FBA Profit Analyzer visual report header: fictional demo data notice, 3 products, median profit per unit and margin charts](https://api.apify.com/v2/key-value-stores/R1P4OnWyoV0LnGBin/records/amazon-fba-profit-analyzer-top200-3-report.jpg)

*Real run A9SkrlkkbzvnKUgwn · Nov 29, 2026 · empty input: report header · Demo mode (fictional products and example fees generated by the Actor)*

The key-value store also holds `REPORT` (HTML), `RUN_SUMMARY` (totals, inputs, charged events, never a credential) and `FAILED_INPUTS`. The named store `amazon-fba-profit-history` keeps the snapshots used for the price history.

### Integrations and API

You can start runs and read results from code with the `apify-client` package ([npm](https://www.npmjs.com/package/apify-client), [PyPI](https://pypi.org/project/apify-client/)). The full reference is in the [Apify API docs](https://docs.apify.com/api/v2).

**Python:**

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("badr_xba/amazon-fba-profit-analyzer").call(run_input={
    "datasetIds": ["YOUR_AMAZON_SCRAPER_DATASET_ID"],
    "referralFeePercent": 15, "fbaFeePerUnit": 5.0, "unitCost": 6.0,
    "minMarginPercent": 20,
})
for row in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(row["asin"], row["profitPerUnit"], row["marginPercent"])
```

**JavaScript:**

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

const client = new ApifyClient({ token: 'YOUR_APIFY_TOKEN' });
const run = await client.actor('badr_xba/amazon-fba-profit-analyzer').call({
    fileUrls: ['https://example.com/my-products.csv'],
    referralFeePercent: 15, fbaFeePerUnit: 5.0, unitCost: 6.0,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
```

**cURL** (runs the Actor and returns the rows in one call):

```bash
curl -X POST "https://api.apify.com/v2/acts/badr_xba~amazon-fba-profit-analyzer/run-sync-get-dataset-items?token=YOUR_APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"datasetIds": ["YOUR_DATASET_ID"], "referralFeePercent": 15, "fbaFeePerUnit": 5, "unitCost": 6}'
```

Other ways to connect it:

- **Chain it after a scraper**: in the scraper's *Integrations* tab, connect this Actor with `{"datasetIds": ["{{resource.defaultDatasetId}}"]}` and your fees.
- **Make, n8n and Zapier**: send the products above your margin to Google Sheets, Slack or Airtable.
- **Webhooks**: trigger an action when a run ends ([docs](https://docs.apify.com/platform/integrations/webhooks)).
- **Schedules**: run it after a weekly scrape to follow price changes ([docs](https://docs.apify.com/platform/schedules)).
- **MCP**: add `https://mcp.apify.com/?actors=badr_xba/amazon-fba-profit-analyzer` to Claude, ChatGPT or Cursor ([docs](https://docs.apify.com/platform/integrations/mcp)).

### Other Amazon scrapers

More Actors by the same developer:

- [Amazon Product Scraper](https://apify.com/badr_xba/amazon-product-scraper): product pages, prices, ratings and best-seller ranks to analyze here.
- [Amazon Best Sellers + Profit](https://apify.com/badr_xba/amazon-bestsellers-profit): Best Sellers lists with a first profit estimate.
- [Amazon Reviews Analyzer](https://apify.com/badr_xba/amazon-review-insights): complaint and praise themes, star trends and review signals from reviews you already scraped.
- [AliExpress Scraper](https://apify.com/badr_xba/aliexpress-scraper): supplier prices to use as your unit cost.
- [Temu Products Scraper](https://apify.com/badr_xba/temu-products-scraper): more product prices to compare.
- [Shopify Trending Products Scraper](https://apify.com/badr_xba/shopify-trending-products-scraper): trending products from Shopify stores.
- [Competitor Ads Spy](https://apify.com/badr_xba/competitor-ads-spy): the ads of brands you compete with.

### ❓ FAQ

#### Is it legal to analyze Amazon product data?

This Actor does not scrape Amazon: it reads data you already have, in your own Apify storage or file. You are responsible for how that data was collected and for your use of the results. With SP-API keys, it calls Amazon's API only for your own seller account. The Apify blog explains the general rules in [Is web scraping legal?](https://blog.apify.com/is-web-scraping-legal/). This is not legal advice.

#### Can I use Amazon FBA Profit Analyzer through an MCP server?

Yes. Add `https://mcp.apify.com/?actors=badr_xba/amazon-fba-profit-analyzer` to your MCP client (Claude, ChatGPT, Cursor), then ask it to compute the FBA profit of a dataset with your fees.

#### Can I integrate Amazon FBA Profit Analyzer with other apps?

Yes. It works with Make, n8n, Zapier, Google Sheets, Slack and any tool that accepts webhooks, and it reads the dataset of any Amazon scraper on Apify.

#### Can I use Amazon FBA Profit Analyzer with the Apify API or in Python?

Yes. Use `apify-client` for Python or JavaScript, or call the REST API directly. The examples above show all three.

#### How much does it cost to calculate Amazon FBA profit?

$1.00 per 1,000 products with a computed profit on the Free plan, down to $0.70 on Business. Products without a profit, duplicates and demo rows are free.

#### Do I need proxies?

No. The Actor never requests an Amazon web page, so no proxy is used. It reads your dataset with your run's own token, your file URLs, and Amazon's SP-API only when you give your own keys.

#### Is there an official Amazon API for FBA fees?

Yes: the Selling Partner API (Product Fees API), for registered sellers with a developer app. This Actor uses it only with your own keys, and that path is not yet verified with a live seller account. Without keys, the fees are the ones you type from your Seller Central fee schedule or Amazon's Revenue Calculator; the Actor never invents a fee.

#### Why is a product delivered without a profit?

A required value is missing (price, referral fee, FBA fee or unit cost), or the price is in another currency than your costs. These rows are free, and `missing` says what to add. There is no currency conversion.

#### What can't it do?

- **No scraping**: it never reads Amazon pages, so the data is as fresh as your last scrape.
- **No sales estimates**: demand signals are only what your data shows ("bought in past month", best-seller rank).
- **Limits**: up to 100,000 records per input; the report shows up to 5,000 products (the dataset keeps them all).
- **Marketplaces**: amazon.com and 22 other Amazon marketplaces, read from your data or the *Marketplace* field.

#### Amazon FBA Profit Analyzer not working?

When no input can be used (unknown dataset, a file that is not JSON / JSONL / CSV, no Amazon-like record, an Amazon page instead of data), the run ends *Succeeded* with the reason in the status message, `RUN_SUMMARY.status` = `FAILED_INPUT`, and nothing is charged. Set `failRunOnError` to true if your schedules must see such runs as *Failed*. Network or server errors on your file host end *Failed*. Every input that could not be used is listed in `FAILED_INPUTS`.

### Your feedback

Found a bug, a missing feature or an idea? Open an issue on the [Issues tab](https://apify.com/badr_xba/amazon-fba-profit-analyzer/issues) with your run ID. A short review on the [Store page](https://apify.com/badr_xba/amazon-fba-profit-analyzer/reviews) also helps other users find the Actor.

# Actor input Schema

## `datasetIds` (type: `array`):

Pick (or paste the ID of) one or more datasets: the output of ANY Amazon scraper on Apify. The formats of <code>badr_xba/amazon-product-scraper</code> and <code>badr_xba/amazon-bestsellers-profit</code> are mapped field by field, plus generic asin / title / price / currency / rating / reviewsCount / bsr / category / brand / url / image fields. Read only.

## `fileUrls` (type: `array`):

http(s) URLs of your own Amazon product data: a JSON array (or an object with <code>items</code> / <code>data</code> / <code>products</code>), JSON Lines, or CSV with a header row. Amazon web pages are refused: give the data a scraper produced, not the Amazon page.

## `marketplace` (type: `string`):

Used only for rows without a marketplace (country code, Amazon domain or URL). Needed for the SP-API and to read an ambiguous "$" price.

## `referralFeePercent` (type: `number`):

Amazon's referral fee for your category, in % of the selling price, as shown in <b>your</b> Seller Central fee schedule. <b>Required</b> to compute the profit, unless your own SP-API keys are given. Never invented by this Actor.

## `fbaFeePerUnit` (type: `number`):

Amazon's FBA fulfilment fee for this size / weight tier. <b>Required</b> to compute the profit, unless your own SP-API keys are given.

## `storageFeePerUnit` (type: `number`):

Monthly storage fee per unit (your estimate for the months the unit stays in stock). Added on top of SP-API estimates too.

## `inboundPlacementFeePerUnit` (type: `number`):

Amazon's inbound placement service fee per unit, if any. Added on top of SP-API estimates too.

## `closingFeePerUnit` (type: `number`):

Variable closing fee (media categories). Not used when SP-API estimates are received (Amazon includes it).

## `unitCost` (type: `number`):

What you pay per unit to your supplier. <b>Required</b> to compute the profit (or give it per ASIN in the costs file).

## `shippingToAmazonPerUnit` (type: `number`):

Freight from your supplier / warehouse to the Amazon fulfilment centre.

## `prepPerUnit` (type: `number`):

Labelling, poly-bagging, prep service.

## `packagingPerUnit` (type: `number`):

Boxes, inserts, branded packaging.

## `importPerUnit` (type: `number`):

Customs duties, import taxes, broker fees per unit.

## `adCostPerUnit` (type: `number`):

Average advertising (PPC) spend per unit sold. Excluded from the landed cost and from the break-even ROAS.

## `otherPerUnit` (type: `number`):

Anything else per unit (returns allowance, software, etc.).

## `costsFileUrl` (type: `string`):

A CSV / JSON / JSONL file with one row per ASIN: <code>asin</code> plus any of the cost fields above (e.g. <code>asin,unitCost,fbaFeePerUnit,referralFeePercent</code>). A value in the file replaces the run-wide value for that ASIN only.

## `costCurrency` (type: `string`):

When set, products priced in another currency get no profit (it would mix currencies) and say so in <code>missing</code>. Empty: your amounts are read in each product's own currency.

## `lwaClientId` (type: `string`):

Optional. With your <b>own</b> Selling Partner API credentials, the fees come from Amazon's Product Fees API (getMyFeesEstimateForASIN, 1 request per second at most). <b>Implemented from Amazon's documentation, not yet verified with a live seller account.</b> Stored encrypted by Apify, never shown in logs or outputs.

## `lwaClientSecret` (type: `string`):

Secret of your SP-API app (Login with Amazon). Never shown in logs or outputs.

## `refreshToken` (type: `string`):

Refresh token from authorising your own seller account (it starts with Atzr|). Never shown in logs or outputs.

## `onlyComputed` (type: `boolean`):

By default, products whose profit cannot be computed (missing fee or cost) are still delivered, free, with <code>missing</code> explaining why. Switch on to leave them out.

## `minProfitPerUnit` (type: `number`):

Keep only products with at least this profit per unit (unknown profit is left out when set).

## `minMarginPercent` (type: `number`):

Keep only products with at least this margin (profit / price).

## `minRoiPercent` (type: `number`):

Keep only products with at least this ROI (profit / landed cost).

## `minOpportunityScore` (type: `integer`):

0-100. Keep only products with at least this score.

## `sortBy` (type: `string`):

Order of the saved products. Missing values go last.

## `maxItems` (type: `integer`):

Saved after filters and sorting (also the maximum number of SP-API requests). <code>0</code> = no limit.

## `useHistory` (type: `boolean`):

Keeps a snapshot of each product (price, profit) in a named key-value store, so the next run shows price changes.

## `historyStoreName` (type: `string`):

Named key-value store for the snapshots (letters, digits and dashes).

## `requestTimeoutSecs` (type: `integer`):

Per request, for your file URLs and the SP-API.

## `failRunOnError` (type: `boolean`):

By default, a run where no input can be used (unknown dataset, unreadable file, no Amazon-like record) ends <i>Succeeded</i> with the reason in the status message and nothing charged. Switch on if your schedules or webhooks must see such runs as <i>Failed</i>.

## Actor input object example

```json
{
  "onlyComputed": false,
  "sortBy": "opportunityScore",
  "maxItems": 100,
  "useHistory": true,
  "historyStoreName": "amazon-fba-profit-history",
  "requestTimeoutSecs": 30,
  "failRunOnError": false
}
```

# Actor output Schema

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

ASIN, title, price, profit per unit, margin, ROI and opportunity score.

## `profit` (type: `string`):

Fee breakdown, landed cost, break-even price and ROAS, profit for 100 / 1,000 units.

## `market` (type: `string`):

Rating, reviews, BSR, bought in past month, seller signals and the opportunity score.

## `history` (type: `string`):

Price changes between runs.

## `allFields` (type: `string`):

Every field as JSON, CSV or Excel.

## `report` (type: `string`):

Product cards with profit, filters, sorts, compare (4), charts, CSV/JSON export and run details.

## `runSummary` (type: `string`):

Totals, inputs by status, SP-API counts, charged events, performance.

## `failedInputs` (type: `string`):

Inputs that could not be used, with the reason.

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("badr_xba/amazon-fba-profit-analyzer").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 = {}

# Run the Actor and wait for it to finish
run = client.actor("badr_xba/amazon-fba-profit-analyzer").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 '{}' |
apify call badr_xba/amazon-fba-profit-analyzer --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,badr_xba/amazon-fba-profit-analyzer"
        }
    }
}
```

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/ajYtnMlU25LjQNqDR/builds/ZxZrJdAlZakVhsBxn/openapi.json
