# BizTrend AI Analyst (`ib4ngz/biztrend-ai-analyst`) Actor

Evidence-backed Amazon product, keyword, score, history, and semantic analysis.

- **URL**: https://apify.com/ib4ngz/biztrend-ai-analyst.md
- **Developed by:** [Iqbal R](https://apify.com/ib4ngz) (community)
- **Categories:** AI, Agents, E-commerce
- **Stats:** 2 total users, 1 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $5.00 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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

### What does BizTrend AI Analyst do?

**BizTrend AI Analyst turns natural-language questions into actionable Amazon product research.** Ask about products, keywords, organic or sponsored positions, prices, ratings, review counts, Best Sellers Rank, historical changes, comparisons, and BizTrend Scores.

The Actor returns a concise answer together with the products and dates that support it. Run it manually in Apify Console or connect it to your workflows through the Apify API, schedules, webhooks, and integrations.

### Why use BizTrend AI Analyst?

- Research product opportunities without writing code or queries.
- Find products by keyword, attributes, or a real-world use case.
- Compare multiple ASINs using consistent product data.
- Review keyword positions and ranking changes over time.
- Explore product history and Best Sellers Rank history.
- Discover high-scoring or fast-moving products.
- Receive clear warnings when data is missing or incomplete.
- Use your own OpenAI API key to control AI usage and billing.

The Actor answers only from available product data. It reports gaps instead of inventing unavailable prices, rankings, scores, or history.

### How to use BizTrend AI Analyst

1. Open the Actor's **Input** tab.
2. Enter one question in **Question**.
3. Paste your OpenAI API key into the protected **OpenAI API key** field.
4. Optionally select a marketplace and adjust the maximum number of results.
5. Click **Start** and open the **Output** tab when the run finishes.

Example questions:

- `Find 20 organic products for the keyword wireless mouse on amazon.co.uk`
- `Compare B0EXAMPLE1 and B0EXAMPLE2 on amazon.com`
- `Find products under $30 with at least a 4.5 rating on amazon.com`
- `Which products are useful for organizing cables while traveling?`
- `Show the 30-day Best Sellers Rank history for B0EXAMPLE1`
- `Which products currently have the strongest momentum?`

When a supported Amazon hostname such as `amazon.co.uk` appears in the question, the Actor uses it automatically. A marketplace selected in the Input tab takes priority. If neither is provided, the default marketplace is `amazon.com`.

### Input

The simplest input contains a question and your OpenAI API key:

```json
{
    "query": "Find products for a minimalist desk on amazon.co.uk",
    "openAIApiKey": "YOUR_OPENAI_API_KEY"
}
```

| Field                 | Type    | Required | Description                                                                                   |
| --------------------- | ------- | -------- | --------------------------------------------------------------------------------------------- |
| `query`               | string  | Yes      | One natural-language Amazon product research question.                                        |
| `openAIApiKey`        | string  | Yes      | Your OpenAI API key. It is handled as a protected secret input.                               |
| `region`              | string  | No       | Amazon marketplace override. It takes priority over a hostname in the question.               |
| `limit`               | integer | No       | Maximum returned products, from 1 to 50. Default: 10.                                         |
| `includeEvidence`     | boolean | No       | Include source labels supporting the answer. Default: `true`.                                 |
| `includeNearMatches`  | boolean | No       | Allow explicitly labelled near matches without relaxing structured filters. Default: `false`. |
| `forceRefreshKeyword` | boolean | No       | Request one fresh collection for an explicit keyword question. Default: `false`.              |
| `autoEnrich`          | object  | No       | Controls bounded collection of missing or insufficient product data.                          |

The number written in the question does not override `limit`. For example, a request for 100 products still returns no more than the configured maximum of 50.

#### Advanced data collection

The default `autoEnrich` settings are suitable for most users:

```json
{
    "missingAsins": true,
    "missingKeywords": true,
    "refreshStaleKeywords": false,
    "keywordFreshnessHours": 168,
    "noResultRetryHours": 168,
    "maxRuns": 1,
    "maxKeywordsPerRun": 1,
    "maxPages": 10,
    "maxProducts": 50
}
```

Reduce these limits when you want a faster, lower-cost run. Set `maxRuns` to `0` to use only currently available data. Forced refresh and larger collection budgets can increase run duration and cost.

### Output

Each run writes one analysis to the default Dataset and the `OUTPUT` record:

```json
{
    "status": "success",
    "query": "Find products for a minimalist desk on amazon.co.uk",
    "answer": "Here are the most relevant products available for this request...",
    "products": [
        {
            "asin": "B0EXAMPLE1",
            "title": "Example desk accessory",
            "brand": "Example Brand",
            "price": 24.99,
            "currency": "GBP",
            "rating": 4.6,
            "reviewCount": "1250",
            "productUrl": "https://www.amazon.co.uk/dp/B0EXAMPLE1"
        }
    ],
    "evidence": {
        "dataAsOf": "2026-08-14T08:00:00.000Z",
        "historyCoverageDays": null
    },
    "dataGaps": [],
    "clarification": null,
    "errors": []
}
```

You can download the Dataset in formats such as **JSON, CSV, Excel, XML, RSS, or HTML**, or consume it directly through the Apify API.

### Data table

| Field                          | Description                                                                                     |
| ------------------------------ | ----------------------------------------------------------------------------------------------- |
| `status`                       | Completeness of the result, such as `success`, `partial`, `no_results`, or `insufficient_data`. |
| `query`                        | The original question.                                                                          |
| `answer`                       | A concise, evidence-based response.                                                             |
| `products`                     | Products and attributes supporting the answer. Available fields vary by question.               |
| `evidence.dataAsOf`            | Most recent timestamp among the data used.                                                      |
| `evidence.historyCoverageDays` | Available historical coverage when the question requires history.                               |
| `dataGaps`                     | Missing, limited, or unavailable information that affects the answer.                           |
| `clarification`                | A follow-up question when more detail is required.                                              |
| `errors`                       | Sanitized run errors, without credentials or raw stack traces.                                  |

Common status values:

- `success` — the available data supports the answer.
- `partial` — useful results exist, but some requested data is incomplete.
- `no_results` — no matching products or observations were found.
- `insufficient_data` — data exists, but there is not enough history or coverage for the requested analysis.
- `clarification_required` — the question needs an ASIN, keyword, marketplace, or other detail.
- `unsupported` — the request falls outside the Actor's product-analysis capabilities.
- `error` — the run could not complete because a required service or configuration was unavailable.

### How much does it cost to analyze Amazon products?

Cost depends on Apify compute usage, OpenAI usage billed to your API key, the requested result limit, and whether additional product data must be collected. Your available credits and free usage depend on your current Apify and OpenAI plans.

For lower cost and faster runs:

- Keep the result limit close to the number of products you actually need.
- Ask one focused question per run.
- Use an ASIN for product-specific questions.
- Avoid requesting long historical periods unless they are necessary.

### Tips and advanced options

- Use the full marketplace hostname, for example `amazon.co.uk`, when you do not select a marketplace override.
- Include the word `keyword` and specify `organic` or `sponsored` for search-result questions.
- Use valid 10-character ASINs for product details, comparisons, and history.
- State numeric filters explicitly, such as `under $25`, `rating at least 4.5`, or `more than 500 reviews`.
- Describe the intended use when searching conceptually, such as `products for organizing charging cables in a backpack`.
- Smaller ranking numbers are better. Sponsored results do not have an organic position.
- Recently discovered products may not yet have complete scores or historical coverage.
- Strict filters are not silently relaxed. Fewer products may be returned when only a limited number satisfy the request.

### FAQ, privacy, disclaimers, and support

#### Is my OpenAI API key included in the output?

No. The key is submitted through a protected secret input and is not included in the Actor's Dataset, `OUTPUT` record, or application logs. Do not place API keys or other credentials inside the question itself.

#### Why did I receive fewer products than requested?

The Actor respects the `limit` setting and only returns products supported by the available data and requested filters. Amazon may provide fewer matching results, and the Actor does not add unrelated products just to fill the requested count.

#### Why is product history or a score missing?

Some products do not yet have enough observations for historical analysis or a complete score. In those cases, the Actor returns `partial` or `insufficient_data` and explains the limitation in `dataGaps`.

#### Can the Actor answer general questions unrelated to Amazon products?

No. It is designed for Amazon product research, keyword positions, rankings, history, comparisons, and BizTrend analytics. Unrelated questions return an `unsupported` status.

#### Is scraping Amazon legal?

You are responsible for complying with Amazon's terms, robots policies, applicable laws, and data-use restrictions. Do not use this Actor to collect personal data, protected content, or prohibited information.

For bugs, feature requests, or questions, use the **Issues** tab on the Actor page. Custom workflows and output formats may be available as a custom solution.

# Actor input Schema

## `query` (type: `string`):

Ask one natural-language question about Amazon products, keywords, rankings, history, scores, comparisons, or product ideas. A marketplace hostname mentioned in the question is used automatically unless Marketplace is set below.

## `openAIApiKey` (type: `string`):

Your OpenAI API key for this run. It is handled as a protected secret and is never included in Actor output or logs.

## `region` (type: `string`):

Optional canonical Amazon hostname. When omitted, a hostname such as amazon.co.uk is read from the question; otherwise amazon.com is used. An explicit value here always wins.

## `limit` (type: `integer`):

Maximum number of products returned.

## `includeEvidence` (type: `boolean`):

Include source labels used to support the answer.

## `includeNearMatches` (type: `boolean`):

Allow explicitly labelled near matches; structured filters are never relaxed silently.

## `forceRefreshKeyword` (type: `boolean`):

Request one fresh collection for an explicit keyword question.

## `autoEnrich` (type: `object`):

Collection budgets. The Actor targets the effective result limit and selects pages adaptively without exceeding these maximums.

## Actor input object example

```json
{
  "query": "Find organic products for the keyword wireless mouse on amazon.com",
  "limit": 10,
  "includeEvidence": true,
  "includeNearMatches": false,
  "forceRefreshKeyword": false,
  "autoEnrich": {
    "missingAsins": true,
    "missingKeywords": true,
    "refreshStaleKeywords": false,
    "keywordFreshnessHours": 168,
    "noResultRetryHours": 168,
    "maxRuns": 1,
    "maxKeywordsPerRun": 1,
    "maxPages": 10,
    "maxProducts": 50
  }
}
```

# Actor output Schema

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

No description

## `output` (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 = {
    "query": "Find organic products for the keyword wireless mouse on amazon.com"
};

// Run the Actor and wait for it to finish
const run = await client.actor("ib4ngz/biztrend-ai-analyst").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 = { "query": "Find organic products for the keyword wireless mouse on amazon.com" }

# Run the Actor and wait for it to finish
run = client.actor("ib4ngz/biztrend-ai-analyst").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 '{
  "query": "Find organic products for the keyword wireless mouse on amazon.com"
}' |
apify call ib4ngz/biztrend-ai-analyst --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,ib4ngz/biztrend-ai-analyst"
        }
    }
}

```

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/45gREYonK5P3BZis7/builds/trOpU6WMslAsIPyjb/openapi.json
