# Buy Leads: AI Lead Scoring for go4WorldBusiness & Alibaba RFQ (`rich_minds/buy-leads-ai`) Actor

First 10 buy leads free. Buy leads for exporters from go4WorldBusiness, ExportersIndia, Alibaba RFQ and TradeKey, scored 0–100: tonnes, broker flag and a reply in English — only on-product leads billed. Works with MCP & AI agents. Free demo on any plan.

- **URL**: https://apify.com/rich_minds/buy-leads-ai.md
- **Developed by:** [Rich Minds](https://apify.com/rich_minds) (community)
- **Categories:** Lead generation, E-commerce, Agents
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $4.00 / 1,000 qualified buy lead (rules only)s

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

## Buy Leads: AI Lead Scoring for go4WorldBusiness & Alibaba RFQ

**New export buy leads from four B2B boards, in Telegram or Slack every week.**

⚡ First **10 buy leads free** · 💵 **$0.004** per qualified buy lead · 🤖 AI on by default (optional): **≈ $0.0177** per lead incl. tokens, on plans with model access or your own key · ⏱️ live search on Apify: ≈ 39–65 s for 5 leads (2 runs, 2026-11-24), AI ≈ 2–3.9 s a lead

![Rice and spice buy leads ranked by score, with tonnes and board](https://api.apify.com/v2/key-value-stores/ahs0ThiuR5ZIF8FOT/records/shortlist.svg)

> Click **Try it** — five sample buy leads, free. Then type your products and press Start: a live read of go4WorldBusiness,
> ExportersIndia, TradeKey and Alibaba's newest RFQs, any plan (Alibaba keyword search: the opt-in Store fallback).
> AI: Apify Starter and up, or free with your own Gemini key — otherwise the rules row at $0.004.
> → [What a run costs](#-pricing--what-a-run-really-costs) · [What the AI adds](#-what-the-ai-tier-adds) · [Run it weekly](#-run-it-weekly)

### ⚡ At a glance

| | |
|---|---|
| **What you get** | One row per buy request, scored 0–100: product, country, tonnes, Incoterm, date, board, link, a reply — with the AI, every request in English, ready to quote |
| **You provide** | Your products (rice, turmeric, cotton yarn …), optionally countries and tonnage |
| **Typical run** | Rice + spices: 265 read → 100 qualified (default cap); on Apify 5 leads: ≈ 39–65 s (2 runs, 2026-11-24) |
| **Cost of that run** | First run: 100 − 10 free = 90 × $0.004 = $0.36 rules only · ≈ $1.62 with the AI · repeat: $0.40 · ≈ $1.77; + $0.04 digest a week (first 4 free) |
| **Keys / setup** | Starter plan and up: no key. Not yet measured on Apify's model access. Other plans: your own key — a free Gemini key = 1–5 AI verdicts per run |
| **Which plan** | Any plan: live search, demo, your own rows ([list template](https://api.apify.com/v2/key-value-stores/ahs0ThiuR5ZIF8FOT/records/list-template.json)); e-mail digest: a plan that runs Store Actors |
| **Works with** | Schedules, webhooks, Sheets, Slack, Teams, Telegram, Make, n8n, Zapier, API, MCP |

### 🎯 What this Actor does

- **Four boards, one sheet** — a request on two boards is one row.
- **Only fresh, on-product leads billed** — old, off-country, undersized or off-product: dropped free.
- **Tonnes, not text** — "25 Tons", "10,000 Kilogram" become one `quantityMt` column.
- **Reply-able first, brokers marked** — free-reply leads first; names and phones removed.

### 🚀 How to use it

1. **Click Try it** — five sample rice and spice buyers, free.
2. **Type your products** — anything the boards carry.
3. **Press Start** — best first; the **Reply sheet** has a reply per lead.
4. **Schedule it weekly** with **Send alerts to** or **E-mail me** — only new buy leads arrive.

![Reply sheet — importer or broker, questions, a reply](https://api.apify.com/v2/key-value-stores/ahs0ThiuR5ZIF8FOT/records/outreach.svg)

📚 **Learn more:** [Tutorial — export buy leads for rice and spices](https://api.apify.com/v2/key-value-stores/ahs0ThiuR5ZIF8FOT/records/tutorial.html)

### 🆚 Why not run blueskyscraper/alibaba-rfq-scraper yourself?

| | blueskyscraper/alibaba-rfq-scraper ($0.002 a row) | Each board's own search | Paid board membership | **This Actor** |
|---|---|---|---|---|
| **Your time per 100 buy leads** | ≈ 7 h (≈ 4 min a lead on 6 sample leads, 2026-11-23) | 7 h | 7 h | one run |
| **Same 100 buy leads, all in (list price)** | ≈ 80 junk rows billed: $0.36 for 180 rows | $0 + your time | ≈ $200–600 a year | junk $0: $0.40 rules only · ≈ $1.77 with the AI (100 ranked) |

#### vs other buy-lead scrapers on the Store

| Actor (Store price, 2026-11-23) | 100 clean buy leads, all in (list price) | Boards | Your time per 100 buy leads |
|---|---|---|---|
| **This Actor** | **$0.40** · ≈ $1.77 with the AI | 4 | seconds |
| scrapers_lat/tradeindia-buyers-scraper ($0.02 a row; #1 for 'buy leads') | $2.00 | 1 (TradeIndia) | ≈ 7 h |
| datamole/tradeindia-buyers-scraper ($0.01 + $0.003 a start) | $1.00 | 1 (TradeIndia) | ≈ 7 h |
| other alibaba-rfq-scrapers (3) | $0.72–$5.40 (180 rows) | 1 | ≈ 7 h |

### 💵 Pricing — what a run really costs

| Event | When it is charged | Price |
|---|---|---|
| `free-tier` | your first 10 qualified buy leads | **$0.00** |
| `qualified-buy-lead-basic` | AI off or failed — row, tonnes, flags, score, rule reply | **$0.004** |
| `qualified-buy-lead-ai` | AI answered — plus importer / broker verdict, wanted spec, questions | **$0.015** |
| `digest-delivered` | a run's digest of new leads reached you; first 4 free | **$0.04** |

**Never charged:** reading the boards, old / off-product / off-country / undersized leads, duplicates, leads below
`minScore` or delivered before.

**How that compares** — $0.004 is 1.0× a raw Alibaba RFQ row ($0.00399), and one qualified lead replaces ≈ 1.8 raw
rows: ≈ $0.0022 per raw-row equivalent; 0.4× the $0.01 median of the 'buy leads' Store search (TradeIndia, B2Brazil scrapers).

**Worked example** — rice + spices, 4 boards (2026-11-23): 265 read → 100 qualified (the default cap). First run:
100 − 10 free = 90 billed — rules only 90 × $0.004 = $0.36; AI on 90 × $0.015 + 100 × ≈ $0.0027 tokens = ≈ $1.62.

**At volume** — a trader with 10 products (≈ 300 new leads a week): ≈ $1.20 + $0.04 digest = $1.24 rules only, ≈ $5.35
with the AI.

**AI tier, all in:** ≈ $0.0177 per buy lead = $0.015 + ≈ $0.0027 tokens (1,447 in / 248 out, gemini-3.5-flash-lite,
own Gemini key, measured 2026-11-24).

### 🤖 What the AI tier adds

A go4WorldBusiness lead (live run 2026-11-23), AI **off**:

```json
{"name": "Rice Like Basmati Rice 1121, Golden Rice — Oman, 25 Tons", "ruleScore": 83, "label": "hot", "assessedBy": "rules",
 "generatedText": "We can supply Rice Like Basmati Rice 1121, Golden Rice for your 25 Tons to Sohar, Oman on FOB/CIF …"}
```

AI **on** (own-key live run, 2026-11-23, `aiModel` verbatim):

```json
{"name": "Rice Like Basmati Rice 1121, Golden Rice — Oman, 25 Tons", "score": 90, "label": "hot",
 "buyerType": "importer_distributor", "aiModel": "google:gemini-3.5-flash-lite",
 "wantedSpec": "White Sella Basmati Rice 1121, Golden Rice; 25 Ton/Tons; Destination: Sohar, Oman; Terms: FOB/CIF; Payment: LC",
 "questionsToAsk": ["What specific packaging and bag sizes do you require?", …],
 "generatedText": "We can supply White Sella Basmati Rice 1121 and Golden Rice for shipment to Sohar, Oman …"}
```

A commission pepper request: `broker_reseller`, 30. A Spanish or Arabic request comes back as an English `wantedSpec`
and reply. ≈ 4 min saved per lead (on 6 sample leads, 2026-11-23).

### ⚙️ Input

| Field | What it does | Default |
|---|---|---|
| Start from a ready search (`preset`) | a niche's products, countries, boards | `custom` |
| Products you sell (`products`) | one per line; one starts the live read | `["rice", "spices"]` in the form |
| What do you sell, and to whom? (`goalDescription`) | brief for the AI; alone, its products are searched | empty |
| Minimum score (`minScore`) | leads below it are dropped, never charged | 40 |
| Max qualified (`maxQualified`) | cap on rows and charges | 100 |
| AI assessment (`enableAi`) | importer / broker, wanted spec, questions, reply | on |
| Buyer countries (`countries`) | ISO-2 codes: buyer or destination | empty = all |
| Posted within (`postedWithinDays`) | days | 14 |
| Minimum quantity (`minQuantityMt`) | tonnes; leads with no weight kept | 0 |

The mode that runs = `sourceMode` (`{}` = the demo), named in the status. Also: `sendAlertsTo`, `notifyEmail`, `boards`,
`maxPagesPerBoard`, `targetFlags`, `dedupeTtlDays`; API-only inputs: the API reference.

**Alibaba RFQ Store fallback** (`useStoreFallback`): robots.txt bars Alibaba's search, so a default run filters its
newest RFQs only; this searches via blueskyscraper/alibaba-rfq-scraper on your account (≈ $0.002 an RFQ, capped).

### 📤 Output

A go4WorldBusiness row (live run 2026-11-23):

```json
{"name": "Rice Like Basmati Rice 1121, Golden Rice — Oman, 25 Tons", "board": "go4worldbusiness", "country": "OM",
 "quantityMt": 25.0, "incoterm": "FOB/CIF", "postedOn": "2026-11-23", "score": 90,
 "label": "hot", "dedupeKey": "lead:go4worldbusiness:1336183"}
```

Sort by `score` (`ruleScore` = the rule part, `fitScore` = the AI's; trend on `ruleScore`). **Upsert key:**
`dedupeKey`. AI fields are `null` where the AI did not assess. `OUTPUT` = the run record.
`RUN_SUMMARY` = a deprecated copy of `OUTPUT`, removed in 0.3 (2027-03-01).

Found it useful? A review on the Store helps others find it.

<details><summary>Every field</summary>

Also: itemId, fetchedAt, deadline, matchedProduct, countryName, postedOnText, companyKey, howToReply,
contactRoute, alsoOn, feedUrl, targetFlagsMatched, scoreReasons, recommendedNextStep, chargedEvent, billedAs, source,
scrapedAt — a full row is in the API reference.

</details>

### 🔁 Run it weekly

1. Open the task your first live run links → **Schedule** weekly; add **Send alerts to** or **E-mail me**.
2. Keep `dedupeAcrossRuns` on: only new leads are delivered — ≈ 60 a week for rice + spices (estimate from the
   2026-11-23 posting dates): ≈ $0.24 + $0.04 digest = $0.28 a week rules only, ≈ $1.10 with the AI (first 4 digests free).
3. Rows into a webhook or Google Sheets — the [tracker sheet](https://api.apify.com/v2/key-value-stores/ahs0ThiuR5ZIF8FOT/records/tracker.csv).

**First to reply** — RFQs close after a few quotes: schedule it hourly with `{"products": ["basmati rice"],
"postedWithinDays": 1, "minScore": 75, "maxQualified": 10}` and **Send alerts to** — fresh, hot leads only.

**Deliver a lead again after** (`dedupeTtlDays`): 0 = never; 30 = a repost returns after 30 days.

#### 🎯 Try it for your niche: spice buyers, cashews, pulses

**Start from a ready search** (live, AI off, 1 page a board, measured 2026-11-23):

| Niche (preset) | Measured |
|---|---|
| [Rice buyers in the Gulf](https://api.apify.com/v2/key-value-stores/ahs0ThiuR5ZIF8FOT/records/preset-rice-gulf.json) | 167 read → 21 qualified, 11 s |
| [Spice buyers in Europe](https://api.apify.com/v2/key-value-stores/ahs0ThiuR5ZIF8FOT/records/preset-spices-europe.json) | 222 read → 12 qualified, 11 s |
| [Pulses: lentils + chickpeas](https://api.apify.com/v2/key-value-stores/ahs0ThiuR5ZIF8FOT/records/preset-pulses-lentils.json) | 127 read → 39 qualified, 14 s |
| [Cashew kernels, 1 MT and up](https://api.apify.com/v2/key-value-stores/ahs0ThiuR5ZIF8FOT/records/preset-cashew-nuts.json) | 50 read → 20 qualified, 12 s |
| [Indian domestic buyers](https://api.apify.com/v2/key-value-stores/ahs0ThiuR5ZIF8FOT/records/preset-india-buyers.json) | 63 read → 22 qualified, 8 s |

### 🔌 Integrations, automation and API

#### Run outcomes — what your integration sees

<details><summary>The table</summary>

| Outcome | Run status | Dataset | `OUTPUT` | Charged? |
|---|---|---|---|---|
| Free demo | SUCCEEDED | samples | `mode: demo` | no |
| Success | SUCCEEDED | buy leads | `outcome: ok` | per lead |
| One board refused / read 0 | SUCCEEDED | other boards' rows | `refused[]`, `boards.<board>.state` | per lead |
| Nothing matched | SUCCEEDED | empty | `outcome: empty` | not by us |
| Every board refused | FAILED | empty | `outcome: source_failed` | no |
| Plan cannot run the Store Actor | SUCCEEDED, `ok: false` | Console: the sample; schedule / API: empty, alerts told | `outcome: source_refused` | no |
| Source partial | SUCCEEDED | rows read | `sourceStatus.partial` | per lead |
| Invalid input | FAILED | empty | `statusMessage` | no |
| AI unavailable | SUCCEEDED | rule rows | `aiError` | basic price |

</details>

#### Which call runs what

| API call | `OUTPUT.mode` | Charged? |
|---|---|---|
| `{}` (Apify's daily test, an agent's first call) | `demo` | no |
| `{"products": ["turmeric"]}` or a `goalDescription` | `live` | per lead |
| `{"sourceMode": "list", …}` | `list` | per lead |
| `{"sourceMode": "dataset", …}` | `dataset` | per lead |
| A Console input copied into a schedule, saved task or API call | its `sourceMode`, no auto-switch | per lead unless `demo` |

**Webhook** — `webhookUrl` POSTs `{"event": "buy_lead.qualified", "item": {…}, "runId"}`; batch body
(`webhookBatchSize` > 1): `{"event": "buy_leads.qualified", "items": […], "runId"}`; retried once on 429 / 5xx; failed rows
(`OUTPUT.webhook.failedKeys`) are re-POSTed next run. Every URL is posted once;
`webhookUrl` gets the rows, the others the digest. `webhookSecret` → `X-Signature: sha256=<HMAC-SHA256 of the raw body>`
([API reference](https://api.apify.com/v2/key-value-stores/ahs0ThiuR5ZIF8FOT/records/api-reference.md): verify snippet, every field).

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_API_TOKEN>")
run = client.actor("rich_minds/buy-leads-ai").call(
    run_input={
        # free first call instead: {} (the demo) or {"sourceMode": "list", "itemsList": [your rows]}
        "products": ["basmati rice", "turmeric"], "countries": ["AE", "SA", "OM"], "maxQualified": 20,
        "dedupeAcrossRuns": True,  # skips leads already delivered
        "failOnSourceError": True,  # no board readable → FAILED (alerts fire)
        # the mode sent runs (autoSwitchToLive: Console only); "useStoreFallback" spends ≤ "maxDiscoveryChargeUsd"
    },
    timeout_secs=924,  # FAQ: 240 + 12 s each × 20 leads
    # build="0.1.8",  # pin a tested build
)
if run["status"] != "SUCCEEDED":
    raise RuntimeError(run["status"], run.get("statusMessage"))
rec = client.key_value_store(run["defaultKeyValueStoreId"]).get_record("OUTPUT")
out = rec["value"] if rec else {}
if not out.get("ok", True) or out.get("sourceError"):
    raise RuntimeError(out.get("outcome"), out.get("sourceError"))
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item["name"], item["score"], item["label"], item["url"])
```

<details><summary>JavaScript</summary>

```javascript
const run = await client.actor('rich_minds/buy-leads-ai').call(
    { products: ['cashew'], maxQualified: 20, dedupeAcrossRuns: true },
    { timeout: 924 /* 240 + 12 s each × 20; build: '0.1.8' */ });
const { items } = await client.dataset(run.defaultDatasetId).listItems();
const out = (await client.keyValueStore(run.defaultKeyValueStoreId).getRecord('OUTPUT'))?.value ?? {};
if (run.status !== 'SUCCEEDED' || out.ok === false || out.sourceError) throw new Error(out.outcome ?? run.status);
```

</details>

**MCP** for AI agents: `{"mcpServers": {"apify": {"url": "https://mcp.apify.com/?actors=rich_minds/buy-leads-ai"}}}`

**Minimal agent input** — a search:

```json
{"products": ["turmeric"], "postedWithinDays": 3, "maxQualified": 20, "enableAi": false, "dedupeAcrossRuns": false}
```

Your own rows, any plan:

```json
{"sourceMode": "list", "itemsList": [{"product": "Turmeric finger, 10 MT", "url": "https://…"}]}
```

#### List-mode rows — what a pasted record needs

<details><summary>The table</summary>

| Field | Needed? | What it enables |
|---|---|---|
| `product` | required (or `title`, `name`) | the row, the product match |
| `url` | required (or `link`) | the link, the dedupe key |
| `board`, `boardLeadId`, `country`, `destination` | optional | the stable key, the country filter |
| `quantity`, `unit` | optional — "25", "MT" | tonnes, the bulk flag |
| `postedOn`, `deadline` | optional — YYYY-MM-DD (or `postedText`) | the window |
| `description`, `paymentTerms`, `incoterm`, `contactShown`, `quotesLeft`, `sourcingCountries`, `buyerName` | optional | flags, score, AI |

</details>

### 👥 Who is it for?

| You are… | You run it to… | Start with |
|---|---|---|
| An Indian rice or spice exporter | Gulf and EU buy requests | Rice buyers in the Gulf |
| A pulses / nuts exporter | requests in tonnes | Pulses, Cashew kernels |
| A supplier selling inside India | ExportersIndia buy leads | Indian domestic buyers |

### 🧠 How the AI works

- **One lead at a time**: the request text, quantity, terms, flags — never a name or phone.
- **Model:** `anthropic/claude-haiku-4.5` on Apify's model access (no platform run yet); own key:
  `google:gemini-3.5-flash-lite`.
- **Grounding:** broker wording is never an importer; a reply cites only the lead's own figures; cold leads get no AI
  text. A failed call keeps the rule reply at $0.004.

### 🔒 Data, compliance and limits

Public pages only, no sign-in. Leads are unverified: check the company.

#### Boards: go4WorldBusiness buy leads, ExportersIndia buy leads, TradeKey buy offers

ExportersIndia carries mostly buyers in India; the other three, worldwide.

### ❓ FAQ

**What will a first search for rice buyers cost?** 90 billed after the 10 free: $0.36, ≈ $1.62 with the AI.

**What does "first 10 free" cover?** Your first 10 qualified buy leads, once per Apify account; rule-only rows use them down
to 5, kept for your first AI-assessed leads.

**Why pay when each board's own search is free?** For one product on one board, use it. A weekly sheet across boards
is ≈ 8 searches and ≈ 160 leads to read by hand; here it is one ranked, deduplicated run.

**Cheaper than a go4WorldBusiness or TradeIndia membership?** A membership (≈ $200–600 a year, one board) unlocks
contacts; this ranks four boards for ≈ $15 a year weekly, digest included.

**Can I reply with a free board account?** Where `canReplyFree` is true.

**Is this legal?** Public pages only, robots.txt honoured, ≥ 1 s apart, no login; names and phones removed. You stay
responsible under each board's terms and GDPR.

**How long does a run take?** As measured below; the AI on a free google:gemini-3.5-flash-lite own key does ≈ 15–30
leads a minute, and free keys vary 2–6×, so pass 240 s + 12 s per lead. Worst case, a
rate-limited own key: ≈ 24 min per 100 leads — the time budget caps the AI, the rest keep rule scores.

| Mode | Measured | `timeoutSecs` |
|---|---|---|
| Free demo | 0.1 s | 120 |
| Live, 2 products × 4 boards × 2 pages | 7.5 s locally (2026-11-23); ≈ 39–65 s on Apify, 5 leads (2 runs, 2026-11-24) | 300 |
| AI, own key | measured 2026-11-24: ≈ 2–3.9 s per lead (google:gemini-3.5-flash-lite free key, two runs: 2 s, 3.9 s) | 240 + 12 s each |
| AI via Apify's model access | no platform run yet | 240 + 12 s each |

**What if nothing matches?** 0 rows, nothing charged by us; the status names each empty board and why.

**Will I be charged for the same lead twice?** No — the key is board + lead id; adding a product keeps the memory.

**How do I send the openers safely?** Through the board's own form, a few a day, no links in the first message.

### 🧩 More Actors from the same developer

- **[Indian Suppliers Price List](https://apify.com/rich_minds/india-b2b-suppliers-ai)** — Indian prices per tonne before you quote.
- **[Food Import Refusals in Japan by Exporter](https://apify.com/rich_minds/import-refusals-ai)** — a market's refusals before you ship.
- **[Spice Association Members](https://apify.com/rich_minds/trade-association-members-ai)** — spice importers to approach.
- **[Top Importers List Finder](https://apify.com/rich_minds/importer-list-extractor-ai)** — importers who buy all year.
- **[India Export Data by HS Code and Country](https://apify.com/rich_minds/india-export-stats-ai)** — markets that buy it from India.
- **[Alibaba RFQ Leads AI](https://apify.com/rich_minds/alibaba-rfq-leads-ai)** — New Alibaba buying requests that fit your products, translated and ready to quote, every morning.
- **[India Export Tariff](https://apify.com/rich_minds/india-trade-portal-ai)** — Official duty abroad on your Indian exports and your FTA rate — with monthly change alerts.

### 🆘 Support

Something wrong? Open an issue on the Actor's page.

### 📝 Changelog

- **0.1.8** (2026-11-25) — Billing fix: a real buyer that also appears in the free demo is now charged like any
  other lead in live runs (it was labelled `demo` and free); pasted samples stay free.
- **0.1.7** (2026-11-25) — deploy records and More Actors link.
- **0.1.6** (2026-11-24) — The status names the mode that ran; weekly costs include the digest.
- **0.1.5** (2026-11-24) — $0.004 per buy lead (was $0.006); first 10 free; measured run times.

# Actor input Schema

## `preset` (type: `string`):

Pick a ready search and press Start: it replaces the sample search below (the untouched sample counts as empty) and runs the live read of the four boards — any Apify plan; a value you typed yourself always wins. The status names what ran. <b>Custom</b> = fill the fields yourself.

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

One product per line: <i>rice</i>, <i>turmeric</i>, <i>cotton yarn</i> — any product the boards carry. Each product is one search per board, matched in each lead's title and text; this Actor reads the boards itself, on every Apify plan, no source bill. Typing your own replaces the demo sample and starts the live read. Affects what you pay.

## `goalDescription` (type: `string`):

Grade, packing, quantity, target markets — e.g. <i>1121 sella basmati, 1–4 containers a month, Gulf and EU importers, FOB / CIF</i>. The AI checks every lead against it. Empty: products and countries still filter, the AI questions stay generic. Products empty: the products named here are searched.

## `minScore` (type: `integer`):

The field that decides what you pay: buy leads scoring below this are discarded and <b>not charged</b>. 40 keeps every on-product lead with a country or a quantity; 60 keeps recent, sized leads with a destination only.

## `maxQualified` (type: `integer`):

Hard cap on results and on what <b>this Actor</b> charges: at most this many × $0.015 with AI on ($1.50 for 100), × $0.004 with AI off ($0.40), before your free buy leads. Best-scoring leads first. Affects what you pay.

## `maxDiscoveryChargeUsd` (type: `number`):

API only — hidden on the form. Only for the opt-in Alibaba Store fallback (<code>useStoreFallback</code>): the most that run may charge your account — $0.50 when left out. The built-in read of the four boards never spends it. Affects what you pay.

## `enableAi` (type: `boolean`):

Importer or broker, the questions to ask and a reply. <b>On = $0.015 per qualified buy lead + ≈ $0.0027 tokens; off = $0.004</b>. Runs on Apify's model access (Starter plan and up; not measured on the platform yet) or your own Gemini key — otherwise you get the rules row at $0.004. The demo shows labelled sample verdicts.

## `countries` (type: `array`):

Keep leads whose buyer country or destination is one of these: <i>AE</i>, <i>SA</i>, <i>DE</i>, <i>GB</i> (country names work too). Empty = every country. Coverage: go4WorldBusiness, Alibaba RFQ and TradeKey — buyers worldwide; ExportersIndia — mostly buyers in India. Free filter: dropped leads are never charged.

## `postedWithinDays` (type: `integer`):

Drop leads posted earlier than this (free). A board's relative age ("12 days ago") is turned into a date at fetch time. A weekly schedule narrows it to the days since the last run.

## `minQuantityMt` (type: `number`):

Drop leads whose stated quantity, converted to tonnes (ton / MT / kg / 20' container), is below this. Leads with no stated weight (pieces, bags) are kept. 0 = no minimum.

## `targetFlags` (type: `array`):

Only deliver buy leads that have at least one of these flags, and rank those with more of them higher. Leave empty to keep everything. An API call passes the flag names, e.g. <code>bulk</code> or <code>has_incoterm</code> (<code>hasIncoterm</code> works too); an unknown name stops the run at once with the list of valid ones.

## `suppressionList` (type: `array`):

API only — hidden on the form. Lead URLs, board lead ids or company names to never output. Suppressed buy leads are skipped before any processing and never charged.

## `allowList` (type: `array`):

API only — hidden on the form. Names, URLs or ids no free rule may drop (a buy lead a rule skipped as off-type last run — see <code>OUTPUT.skips</code> for the names). They still need to pass <code>minScore</code>.

## `llmProvider` (type: `string`):

<b>Apify (no keys)</b> — the AI runs through Apify's built-in OpenRouter proxy; tokens are billed to your Apify account at OpenRouter's rates. <b>My own key</b> — your OpenAI / Anthropic / Gemini / Groq key instead. Measured 2026-11-24 with a free google:gemini-3.5-flash-lite key: ≈ 2–3.9 s per buy lead (two runs: 2 s, 3.9 s). The AI checks up to 2 buy leads per delivered one and free keys vary 2–6× between runs — allow 240 s + 12 s per lead as the run timeout (≈ 840 s for 50). On a bigger run a free key's rate limit stops after 120 s of waiting: expect 1–3 more AI checks (the borderline buy leads retried one by one), the rest keep their rule score. A paid Groq / Gemini key (billing on) assesses every buy lead.

## `llmModel` (type: `string`):

API only — hidden on the form. Leave empty for the default (<code>anthropic/claude-haiku-4.5</code> on Apify, <code>google:gemini-3.5-flash-lite</code> with your own key). Apify mode takes an OpenRouter slug such as <code>openai/gpt-4.1-mini</code>; own-key mode takes <code>provider:model</code>.

## `llmApiKey` (type: `string`):

Required when <b>AI model access</b> is <i>My own API key</i>. Stored encrypted by Apify, never logged.

## `aiCandidateMultiplier` (type: `integer`):

API only — hidden on the form. How many of the best rule-scored buy leads get the AI pass, as a multiple of <b>Max qualified</b>. Higher = more thorough, slower, more tokens.

## `sendAlertsTo` (type: `string`):

Paste one or more URLs, one per line — the service is detected from the address: a Slack or Discord channel webhook, a Teams Workflows or Google Chat space webhook, your Telegram bot's send link (<code>https://api.telegram.org/bot\<token>/sendMessage?chat_id=@yourchannel</code>) or any other https URL (Zapier, Make, n8n, your CRM), which gets the buy leads as JSON. After every run with at least one new buy lead, the digest (how many are new, the top 10 with links) is posted there. Never sent for the free demo. Headers, batching and signing: <i>Delivery details (advanced)</i>.

## `notifyEmail` (type: `string`):

After every run with new buy leads, the digest (top 10 with links) is e-mailed here — schedule it weekly and only new ones arrive. Sent by Apify's send-mail Actor, so it needs a plan that runs Store Actors; on any plan use <b>Send alerts to</b> above (Telegram, Slack, Teams, Discord). Never sent for the free demo.

## `dedupeAcrossRuns` (type: `boolean`):

Remembers every buy lead you were charged for (in a named key-value store on your account) and skips it in future runs.

## `dedupeTtlDays` (type: `integer`):

How long a delivered buy lead stays remembered. 0 (default) = never deliver or charge it again. A number of days lets a lead that is reposted under the same id reach you again after that many days — charged again.

## `historyDatasetName` (type: `string`):

API only — hidden on the form. Optional. Type a name (e.g. <code>buy-leads-ai-seen-log</code>) and every run appends its new buy leads with the date to that named dataset on your account — one list across months to connect to Google Sheets or your BI tool once. Empty = off. Costs nothing extra.

## `boards` (type: `array`):

Empty (default) = all four: Alibaba RFQ, go4WorldBusiness, ExportersIndia and TradeKey, read by this Actor itself (robots.txt honoured, ≥ 1 s between requests, no sign-in). Pick some to read only those.

## `maxPagesPerBoard` (type: `integer`):

Result pages read per product on each board (Alibaba 20 leads a page, go4WorldBusiness 50; on ExportersIndia page 2+ are the sub-product buy-lead pages the product page links, e.g. 1121 Basmati Rice for rice; TradeKey adds the product's importer page). Affects what you pay: more pages, more qualified leads (≤ <code>maxQualified</code>).

## `useStoreFallback` (type: `boolean`):

Off by default. On: when Alibaba refuses this run's keyword search (its robots.txt or a block), <code>blueskyscraper/alibaba-rfq-scraper</code> searches it on <b>your</b> account (≈ $0.002 per RFQ, capped by <code>maxDiscoveryChargeUsd</code>). Needs a plan that runs Store Actors. Affects what you pay.

## `sourceMode` (type: `string`):

<code>{}</code> over the API runs the free demo — nothing charged; any product you send runs the live search. The mode that runs = <code>sourceMode</code>, except <code>{}</code> = the free demo. <b>live</b> (default) — this Actor reads the four boards itself, on every plan. <b>dataset</b> — an existing Apify dataset of leads. <b>list</b> — leads you paste in (merged and scored). The mode you choose always runs as chosen; only the untouched sample records next to a product you typed on the Console form switch to the live search.

## `autoSwitchToLive` (type: `boolean`):

API only — hidden on the form. On (default, Console runs only): search terms typed next to the untouched sample records start the live search (spend-capped; <code>OUTPUT.switchedToLive</code> names them). Off: the mode you send is the mode that runs — the sample stays the free demo and the status names the terms it did not search. Over the API the mode you send is always the mode that runs.

## `failOnSourceError` (type: `boolean`):

Off (default): a run where no board could be read ends FAILED with every board's reason in <code>OUTPUT.refused</code>; one refused board is an entry there (alert on <code>reason == failed</code>) and the other boards still deliver. On: a plan that cannot run the opt-in Alibaba Store fallback (the only Store Actor this Actor may start) ends FAILED too, so a schedule's failed-run alert fires.

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

Only for <b>dataset</b> mode. Pick the dataset so the Actor is granted read access to it.

## `itemsList` (type: `array`):

Only for <b>list</b> mode. JSON array of objects. Required on every row: <code>product</code> (or <code>name</code> / <code>title</code>) and <code>url</code>; optional: <code>board</code>, <code>country</code>, <code>quantity</code>, <code>unit</code>, <code>postedOn</code> and the other fields of the README's <i>List-mode rows</i> table — a row missing a required field is skipped and counted in the status.

## `discoveryActorId` (type: `string`):

API only — hidden on the form. The Store Actor the opt-in Alibaba fallback runs (<code>useStoreFallback</code>).

## `discoveryInput` (type: `object`):

API only — hidden on the form. Extra input passed as-is to the opt-in Alibaba Store fallback (only with <code>useStoreFallback</code>).

## `maxToProcess` (type: `integer`):

API only — hidden on the form. Upper bound on how many buy leads are scored in one run. Default = 3 × max qualified.

## `webhookUrl` (type: `string`):

Qualified buy leads are POSTed here as JSON (Zapier, Make, n8n, your CRM). For Google Sheets / Slack you can also use Apify's built-in Integrations tab. Stored encrypted — Zapier / Make hook URLs carry their secret in the path.

## `webhookHeaders` (type: `object`):

API only — hidden on the form. Extra HTTP headers for the webhook, e.g. <code>{"Authorization": "Bearer …"}</code>. Stored encrypted by Apify, never logged.

## `webhookBatchSize` (type: `integer`):

API only — hidden on the form. 1 = one POST per buy lead the moment it is ready. Higher = one POST per N buy leads.

## `webhookSecret` (type: `string`):

API only — hidden on the form. Any random string. Every webhook POST then carries <code>X-Signature: sha256=\<HMAC-SHA256 of the raw body with this secret></code>, so your endpoint can verify it came from this Actor. Stored encrypted by Apify, never logged.

## `dedupeStoreName` (type: `string`):

API only — hidden on the form. Key-value store used for cross-run memory. Left at the default, the memory is kept per search (source and search terms): rewording <code>goalDescription</code> keeps it, so a scheduled run never re-delivers what you already have, and another search starts its own list. Running it for several clients on one account, type one name per client.

## `discoveryTimeoutSecs` (type: `integer`):

API only — hidden on the form. How long the source Store Actor may run before its partial results are used — never more than 60 % of the run's time left, so the AI, the charges and the digest keep the rest. Raise it (and the run timeout) when the status says the source stopped early.

## `slackWebhookUrl` (type: `string`):

API only — an alias of <code>sendAlertsTo</code> (prefer it: one field takes every service), hidden on the form. Slack incoming-webhook URL for the digest.

## `discordWebhookUrl` (type: `string`):

API only — an alias of <code>sendAlertsTo</code> (prefer it: one field takes every service), hidden on the form. Discord channel webhook URL for the digest.

## `teamsWebhookUrl` (type: `string`):

API only — an alias of <code>sendAlertsTo</code> (prefer it: one field takes every service), hidden on the form. Teams Workflows webhook URL for the digest.

## `googleChatWebhookUrl` (type: `string`):

API only — an alias of <code>sendAlertsTo</code> (prefer it: one field takes every service), hidden on the form. Google Chat space webhook URL for the digest.

## `telegramUrl` (type: `string`):

API only — an alias of <code>sendAlertsTo</code> (prefer it: one field takes every service), hidden on the form. The bot's sendMessage link with its chat_id.

## Actor input object example

```json
{
  "preset": "custom",
  "products": [
    "rice",
    "spices"
  ],
  "minScore": 40,
  "maxQualified": 100,
  "maxDiscoveryChargeUsd": 0.5,
  "enableAi": true,
  "postedWithinDays": 14,
  "minQuantityMt": 0,
  "llmProvider": "apify",
  "aiCandidateMultiplier": 2,
  "dedupeAcrossRuns": true,
  "dedupeTtlDays": 0,
  "historyDatasetName": "",
  "boards": [],
  "maxPagesPerBoard": 2,
  "useStoreFallback": false,
  "sourceMode": "list",
  "autoSwitchToLive": true,
  "failOnSourceError": false,
  "itemsList": [
    {
      "product": "1121 Golden Sella Basmati Rice (sample)",
      "board": "go4worldbusiness",
      "boardLeadId": "sample-1001",
      "sample": true,
      "url": "https://www.go4worldbusiness.com/buyers/basmati-rice.html",
      "buyerName": "Gulf Star Foodstuff Trading LLC (sample)",
      "country": "AE",
      "quantity": 2,
      "unit": "Twenty-Foot Container",
      "paymentTerms": "LC at sight",
      "destination": "Jebel Ali, United Arab Emirates",
      "sourcingCountries": "India, Pakistan",
      "postedText": "2 days ago",
      "contactShown": "premium members",
      "description": "Please quote for 1121 golden sella basmati rice, 5 kg and 25 kg PP bags, moisture 12 % max, broken 2 % max. Shipping terms: CIF Jebel Ali. Monthly requirement for our distribution company."
    },
    {
      "product": "Turmeric Finger, Polished, Curcumin 3 %+ (sample)",
      "board": "alibaba",
      "boardLeadId": "sample-1002",
      "sample": true,
      "url": "https://sourcing.alibaba.com/rfq/rfq_search_list.htm#rfq-1002",
      "country": "NL",
      "quantity": 10,
      "unit": "Metric Ton/Metric Tons",
      "postedText": "3 days ago",
      "quotesLeft": 4,
      "contactShown": "after login",
      "description": "We import spices for the Benelux food industry. Looking for polished turmeric fingers, curcumin 3 % minimum, EU MRL compliant, 25 kg jute bags. FOB Indian port, first order 10 MT then quarterly."
    },
    {
      "product": "Non Basmati Rice (sample)",
      "board": "exportersindia",
      "boardLeadId": "sample-1003",
      "sample": true,
      "url": "https://www.exportersindia.com/buyers/rice.htm",
      "country": "IN",
      "quantity": 50,
      "unit": "Metric Ton",
      "paymentTerms": "online",
      "destination": "Chennai, Tamil Nadu, India",
      "postedText": "1 day ago",
      "contactShown": "after login",
      "description": "I am interested in buying Non Basmati Rice · Requirement: Urgent · Frequency: Monthly · Buys: Sona masoori rice, Ponni rice"
    },
    {
      "product": "Black Pepper 550 GL Required (sample)",
      "board": "tradekey",
      "boardLeadId": "sample-1004",
      "sample": true,
      "url": "https://importer.tradekey.com/black-pepper-importer.html",
      "country": "GB",
      "quantity": 5,
      "unit": "MT",
      "postedText": "4 days ago",
      "contactShown": "premium members",
      "description": "We have buyers in the UK for black pepper 550 GL and work on commission on behalf of our client. Send your best price."
    },
    {
      "product": "Rice Mill Machine, 5 Tons per Day (sample)",
      "board": "alibaba",
      "boardLeadId": "sample-1005",
      "sample": true,
      "url": "https://sourcing.alibaba.com/rfq/rfq_search_list.htm#rfq-1005",
      "country": "NG",
      "quantity": 1,
      "unit": "Set/Sets",
      "postedText": "5 days ago",
      "quotesLeft": 6,
      "contactShown": "after login",
      "description": "Need a complete rice milling plant line, 5 TPD, with destoner, husker and polisher."
    }
  ],
  "discoveryActorId": "blueskyscraper/alibaba-rfq-scraper",
  "webhookBatchSize": 1,
  "dedupeStoreName": "buy-leads-ai-seen",
  "discoveryTimeoutSecs": 3600
}
```

# Actor output Schema

## `qualified` (type: `string`):

All qualified buy leads as JSON, best-scoring first.

## `sheet` (type: `string`):

The same buy leads as a spreadsheet.

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

JSON record with the funnel (loaded -> filtered -> AI-assessed -> qualified), per-reason skip counts, charged events by type, free-tier buy leads used and remaining, whether a budget limit was reached, webhook delivery counts and the dedupe store size.

# 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": [
        "rice",
        "spices"
    ],
    "minScore": 40,
    "maxDiscoveryChargeUsd": 0.5,
    "postedWithinDays": 14,
    "maxPagesPerBoard": 2,
    "sourceMode": "list",
    "itemsList": [
        {
            "product": "1121 Golden Sella Basmati Rice (sample)",
            "board": "go4worldbusiness",
            "boardLeadId": "sample-1001",
            "sample": true,
            "url": "https://www.go4worldbusiness.com/buyers/basmati-rice.html",
            "buyerName": "Gulf Star Foodstuff Trading LLC (sample)",
            "country": "AE",
            "quantity": 2,
            "unit": "Twenty-Foot Container",
            "paymentTerms": "LC at sight",
            "destination": "Jebel Ali, United Arab Emirates",
            "sourcingCountries": "India, Pakistan",
            "postedText": "2 days ago",
            "contactShown": "premium members",
            "description": "Please quote for 1121 golden sella basmati rice, 5 kg and 25 kg PP bags, moisture 12 % max, broken 2 % max. Shipping terms: CIF Jebel Ali. Monthly requirement for our distribution company."
        },
        {
            "product": "Turmeric Finger, Polished, Curcumin 3 %+ (sample)",
            "board": "alibaba",
            "boardLeadId": "sample-1002",
            "sample": true,
            "url": "https://sourcing.alibaba.com/rfq/rfq_search_list.htm#rfq-1002",
            "country": "NL",
            "quantity": 10,
            "unit": "Metric Ton/Metric Tons",
            "postedText": "3 days ago",
            "quotesLeft": 4,
            "contactShown": "after login",
            "description": "We import spices for the Benelux food industry. Looking for polished turmeric fingers, curcumin 3 % minimum, EU MRL compliant, 25 kg jute bags. FOB Indian port, first order 10 MT then quarterly."
        },
        {
            "product": "Non Basmati Rice (sample)",
            "board": "exportersindia",
            "boardLeadId": "sample-1003",
            "sample": true,
            "url": "https://www.exportersindia.com/buyers/rice.htm",
            "country": "IN",
            "quantity": 50,
            "unit": "Metric Ton",
            "paymentTerms": "online",
            "destination": "Chennai, Tamil Nadu, India",
            "postedText": "1 day ago",
            "contactShown": "after login",
            "description": "I am interested in buying Non Basmati Rice · Requirement: Urgent · Frequency: Monthly · Buys: Sona masoori rice, Ponni rice"
        },
        {
            "product": "Black Pepper 550 GL Required (sample)",
            "board": "tradekey",
            "boardLeadId": "sample-1004",
            "sample": true,
            "url": "https://importer.tradekey.com/black-pepper-importer.html",
            "country": "GB",
            "quantity": 5,
            "unit": "MT",
            "postedText": "4 days ago",
            "contactShown": "premium members",
            "description": "We have buyers in the UK for black pepper 550 GL and work on commission on behalf of our client. Send your best price."
        },
        {
            "product": "Rice Mill Machine, 5 Tons per Day (sample)",
            "board": "alibaba",
            "boardLeadId": "sample-1005",
            "sample": true,
            "url": "https://sourcing.alibaba.com/rfq/rfq_search_list.htm#rfq-1005",
            "country": "NG",
            "quantity": 1,
            "unit": "Set/Sets",
            "postedText": "5 days ago",
            "quotesLeft": 6,
            "contactShown": "after login",
            "description": "Need a complete rice milling plant line, 5 TPD, with destoner, husker and polisher."
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("rich_minds/buy-leads-ai").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": [
        "rice",
        "spices",
    ],
    "minScore": 40,
    "maxDiscoveryChargeUsd": 0.5,
    "postedWithinDays": 14,
    "maxPagesPerBoard": 2,
    "sourceMode": "list",
    "itemsList": [
        {
            "product": "1121 Golden Sella Basmati Rice (sample)",
            "board": "go4worldbusiness",
            "boardLeadId": "sample-1001",
            "sample": True,
            "url": "https://www.go4worldbusiness.com/buyers/basmati-rice.html",
            "buyerName": "Gulf Star Foodstuff Trading LLC (sample)",
            "country": "AE",
            "quantity": 2,
            "unit": "Twenty-Foot Container",
            "paymentTerms": "LC at sight",
            "destination": "Jebel Ali, United Arab Emirates",
            "sourcingCountries": "India, Pakistan",
            "postedText": "2 days ago",
            "contactShown": "premium members",
            "description": "Please quote for 1121 golden sella basmati rice, 5 kg and 25 kg PP bags, moisture 12 % max, broken 2 % max. Shipping terms: CIF Jebel Ali. Monthly requirement for our distribution company.",
        },
        {
            "product": "Turmeric Finger, Polished, Curcumin 3 %+ (sample)",
            "board": "alibaba",
            "boardLeadId": "sample-1002",
            "sample": True,
            "url": "https://sourcing.alibaba.com/rfq/rfq_search_list.htm#rfq-1002",
            "country": "NL",
            "quantity": 10,
            "unit": "Metric Ton/Metric Tons",
            "postedText": "3 days ago",
            "quotesLeft": 4,
            "contactShown": "after login",
            "description": "We import spices for the Benelux food industry. Looking for polished turmeric fingers, curcumin 3 % minimum, EU MRL compliant, 25 kg jute bags. FOB Indian port, first order 10 MT then quarterly.",
        },
        {
            "product": "Non Basmati Rice (sample)",
            "board": "exportersindia",
            "boardLeadId": "sample-1003",
            "sample": True,
            "url": "https://www.exportersindia.com/buyers/rice.htm",
            "country": "IN",
            "quantity": 50,
            "unit": "Metric Ton",
            "paymentTerms": "online",
            "destination": "Chennai, Tamil Nadu, India",
            "postedText": "1 day ago",
            "contactShown": "after login",
            "description": "I am interested in buying Non Basmati Rice · Requirement: Urgent · Frequency: Monthly · Buys: Sona masoori rice, Ponni rice",
        },
        {
            "product": "Black Pepper 550 GL Required (sample)",
            "board": "tradekey",
            "boardLeadId": "sample-1004",
            "sample": True,
            "url": "https://importer.tradekey.com/black-pepper-importer.html",
            "country": "GB",
            "quantity": 5,
            "unit": "MT",
            "postedText": "4 days ago",
            "contactShown": "premium members",
            "description": "We have buyers in the UK for black pepper 550 GL and work on commission on behalf of our client. Send your best price.",
        },
        {
            "product": "Rice Mill Machine, 5 Tons per Day (sample)",
            "board": "alibaba",
            "boardLeadId": "sample-1005",
            "sample": True,
            "url": "https://sourcing.alibaba.com/rfq/rfq_search_list.htm#rfq-1005",
            "country": "NG",
            "quantity": 1,
            "unit": "Set/Sets",
            "postedText": "5 days ago",
            "quotesLeft": 6,
            "contactShown": "after login",
            "description": "Need a complete rice milling plant line, 5 TPD, with destoner, husker and polisher.",
        },
    ],
}

# Run the Actor and wait for it to finish
run = client.actor("rich_minds/buy-leads-ai").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": [
    "rice",
    "spices"
  ],
  "minScore": 40,
  "maxDiscoveryChargeUsd": 0.5,
  "postedWithinDays": 14,
  "maxPagesPerBoard": 2,
  "sourceMode": "list",
  "itemsList": [
    {
      "product": "1121 Golden Sella Basmati Rice (sample)",
      "board": "go4worldbusiness",
      "boardLeadId": "sample-1001",
      "sample": true,
      "url": "https://www.go4worldbusiness.com/buyers/basmati-rice.html",
      "buyerName": "Gulf Star Foodstuff Trading LLC (sample)",
      "country": "AE",
      "quantity": 2,
      "unit": "Twenty-Foot Container",
      "paymentTerms": "LC at sight",
      "destination": "Jebel Ali, United Arab Emirates",
      "sourcingCountries": "India, Pakistan",
      "postedText": "2 days ago",
      "contactShown": "premium members",
      "description": "Please quote for 1121 golden sella basmati rice, 5 kg and 25 kg PP bags, moisture 12 % max, broken 2 % max. Shipping terms: CIF Jebel Ali. Monthly requirement for our distribution company."
    },
    {
      "product": "Turmeric Finger, Polished, Curcumin 3 %+ (sample)",
      "board": "alibaba",
      "boardLeadId": "sample-1002",
      "sample": true,
      "url": "https://sourcing.alibaba.com/rfq/rfq_search_list.htm#rfq-1002",
      "country": "NL",
      "quantity": 10,
      "unit": "Metric Ton/Metric Tons",
      "postedText": "3 days ago",
      "quotesLeft": 4,
      "contactShown": "after login",
      "description": "We import spices for the Benelux food industry. Looking for polished turmeric fingers, curcumin 3 % minimum, EU MRL compliant, 25 kg jute bags. FOB Indian port, first order 10 MT then quarterly."
    },
    {
      "product": "Non Basmati Rice (sample)",
      "board": "exportersindia",
      "boardLeadId": "sample-1003",
      "sample": true,
      "url": "https://www.exportersindia.com/buyers/rice.htm",
      "country": "IN",
      "quantity": 50,
      "unit": "Metric Ton",
      "paymentTerms": "online",
      "destination": "Chennai, Tamil Nadu, India",
      "postedText": "1 day ago",
      "contactShown": "after login",
      "description": "I am interested in buying Non Basmati Rice · Requirement: Urgent · Frequency: Monthly · Buys: Sona masoori rice, Ponni rice"
    },
    {
      "product": "Black Pepper 550 GL Required (sample)",
      "board": "tradekey",
      "boardLeadId": "sample-1004",
      "sample": true,
      "url": "https://importer.tradekey.com/black-pepper-importer.html",
      "country": "GB",
      "quantity": 5,
      "unit": "MT",
      "postedText": "4 days ago",
      "contactShown": "premium members",
      "description": "We have buyers in the UK for black pepper 550 GL and work on commission on behalf of our client. Send your best price."
    },
    {
      "product": "Rice Mill Machine, 5 Tons per Day (sample)",
      "board": "alibaba",
      "boardLeadId": "sample-1005",
      "sample": true,
      "url": "https://sourcing.alibaba.com/rfq/rfq_search_list.htm#rfq-1005",
      "country": "NG",
      "quantity": 1,
      "unit": "Set/Sets",
      "postedText": "5 days ago",
      "quotesLeft": 6,
      "contactShown": "after login",
      "description": "Need a complete rice milling plant line, 5 TPD, with destoner, husker and polisher."
    }
  ]
}' |
apify call rich_minds/buy-leads-ai --silent --output-dataset

```

## MCP server setup

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

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/nm1CMp8zOASrKAVLb/builds/Z2EeccQC87qydGQBp/openapi.json
