# Buyer Prompt Generator for AI Search (GEO) (`shariful-labs/buyer-prompt-generator`) Actor

Turn any website into the real questions buyers ask ChatGPT, Perplexity and Gemini. Get a balanced prompt set (discovery, comparison, alternatives, pricing, local) in English and Malay for AI visibility tracking (GEO).

- **URL**: https://apify.com/shariful-labs/buyer-prompt-generator.md
- **Developed by:** [Shariful Islam](https://apify.com/shariful-labs) (community)
- **Features:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

from $10.00 / 1,000 buyer prompt

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/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 does Buyer Prompt Generator do?

**Buyer Prompt Generator** turns any website into the questions real buyers ask **ChatGPT, Perplexity, Gemini and Google AI Overviews** when they shop for a product or service. You get a ready-to-use, balanced **prompt set for AI visibility tracking (GEO / AEO)**, in **English and Malay**.

Tell it what the business sells, add the website and a few competitor names, and it returns questions such as:

- *What is the best accounting software in Malaysia?*
- *QuickBooks vs Bukku: which accounting software should I choose?*
- *Is there a cheaper alternative to QuickBooks in Malaysia?*
- *How can I send LHDN e-invoices?*
- *Apakah accounting software terbaik di Malaysia?*

Every AI visibility tool, including Profound, Peec AI, Otterly and your own scripts, is only as good as the prompts you track. This Actor builds that list for you in under a minute.

### Why use it?

- **Covers the whole buyer journey.** Questions are balanced across 8 intents: problem, discovery, feature, local, comparison, alternatives, pricing and brand. You don't end up with 50 versions of "best X".
- **Mostly unbranded, on purpose.** At most about 25% of questions name your brand. The unbranded ones show whether AI assistants recommend you **without being asked**, which is the number that matters.
- **Reads your website.** It finds your brand name, audience, features and the jobs customers hire you for, so the questions match what you actually sell.
- **English and Malay (Bahasa Malaysia).** Built with the Malaysian and Southeast Asian market in mind, and works for any country.
- **Products and services.** Software gets "free plan" and "vs" questions; clinics, agencies and restaurants get "near me" and "best reviews" questions.
- **No AI key needed.** Works out of the box. Add your own OpenAI key if you want extra, more natural questions written by AI.
- **Agent-ready.** Clean JSON output, works through the Apify API and the Apify MCP server for AI agents.

### Who is it for?

- **SEO and GEO agencies** setting up AI visibility tracking for clients
- **Marketing teams** checking whether ChatGPT and Perplexity recommend their brand
- **Founders** who want to know what buyers ask AI about their category
- **Developers** building AI visibility dashboards who need good prompt sets

### How to use it

1. Enter the **Category**: what the business sells, in the words buyers use (for example "accounting software", "dental clinic", "CRM"). This is the only required field.
2. Add the **Website URL** and **Competitors** (both recommended) and, if you like, the **Market** and **Cities**.
3. Choose **Languages** (English, Malay or both) and **Maximum prompts**.
4. Click **Start**. Results appear in the **Prompts** table in about 10 to 40 seconds.
5. Download them as CSV, Excel or JSON, or copy the plain list from the `PROMPTS_TXT` record in the key-value store.

**Tip:** use the category name your buyers would type, not your internal product name. "CRM" beats "customer platform", and "accounting software" beats "financial operating system".

### Input example

```json
{
  "category": "accounting software",
  "websiteUrl": "https://www.xero.com/my/",
  "audience": "small businesses",
  "market": "Malaysia",
  "competitors": ["QuickBooks", "Bukku", "SQL Accounting"],
  "cities": ["Kuala Lumpur", "Penang"],
  "languages": ["en", "ms"],
  "maxPrompts": 50
}
```

### Output example

Each prompt is one row in the dataset:

```json
{
  "rank": 3,
  "prompt": "QuickBooks vs Bukku: which accounting software should I choose?",
  "language": "en",
  "intent": "comparison",
  "funnelStage": "decision",
  "isBranded": false,
  "competitor": "QuickBooks",
  "topic": null,
  "source": "template",
  "brand": "Xero",
  "category": "accounting software",
  "market": "Malaysia"
}
```

| Field | Meaning |
|---|---|
| `prompt` | The buyer question, ready to paste into ChatGPT, Perplexity or your tracking tool |
| `language` | `en` (English) or `ms` (Malay) |
| `intent` | `problem`, `discovery`, `feature`, `local`, `comparison`, `alternatives`, `pricing` or `brand` |
| `funnelStage` | `awareness`, `consideration` or `decision` |
| `isBranded` | `true` if the question names the brand |
| `competitor` | The competitor the question is about, if any |
| `source` | `template` or `ai` (written by your OpenAI key) |

The key-value store also contains:

- `OUTPUT`: a summary with counts by intent and language, plus what was detected on the website (brand, audience, features, jobs to be done). Use it to check the Actor understood the business.
- `PROMPTS_TXT`: all prompts as plain text, one per line.

### How much does it cost?

You pay **$0.01 per prompt** returned ($10 per 1,000 prompts), with no monthly fee. A typical run of 50 prompts costs **$0.50**. You never pay for more prompts than you set in **Maximum prompts**, and the run stops at your spending limit.

If you use AI mode, OpenAI charges your own OpenAI account separately, usually a few cents or less per run with the default model.

### AI mode (optional)

Add your **OpenAI API key** to get extra questions written by an AI model from your website text. These sound more like real people ("QuickBooks feels too expensive for my 3-person company, what else is there?"). AI questions are mixed with the template questions and marked `"source": "ai"`.

Your key is stored encrypted by Apify, used only for that run, and never saved in the results. If the key fails, the run continues with templates and the reason is shown in `OUTPUT.aiError`.

### Tips for better prompt sets

- Add **3 to 5 competitors**. Comparison and alternatives questions are where brands win or lose AI recommendations.
- Turn off **Include questions that name the brand** if you only want to measure unprompted visibility.
- Add **Use cases** written as actions ("send e-invoices to LHDN", "track my expenses") for strong problem questions.
- Re-run when you launch new features, so your tracking set stays current.

### What's next: measure your AI visibility

Generating prompts is step one. Step two is asking AI assistants these questions many times and measuring how often your brand is mentioned, with proper statistics. **AI Visibility Lab** by shariful Labs is coming soon and will take this Actor's output directly.

### FAQ

**Does it work for websites outside Malaysia?**
Yes. Set **Market** to any country or leave it empty, and choose English only.

**Why did I get fewer prompts than I asked for?**
With only a category and no competitors, cities or website, there are fewer unique questions to write. Add competitors, cities or use cases to get more. You only pay for prompts returned.

**The website blocks the Actor. What can I do?**
Turn on the Apify proxy under **Advanced**, or run without a website. The questions will still be built from your category, competitors and use cases.

**Is reading a website allowed?**
The Actor reads a handful of public pages from the website you enter (home, features, pricing and similar), like a visitor would. Use it on your own or clients' sites, or public pages of competitors, in line with their terms.

### Support

Found a bug or want a feature? Open an issue on the **Issues** tab and I'll respond quickly.

Built by [shariful Labs](https://apify.com/shariful-labs).

# Actor input Schema

## `category` (type: `string`):

Required. What the business sells, in the words buyers use, e.g. "accounting software", "dental clinic", "CRM". This is the most important input: every question is built around it.

## `websiteUrl` (type: `string`):

Optional but recommended. The brand's website. The Actor reads the home page and a few key pages (features, products, pricing) to find the brand name, features and the jobs customers use it for.

## `brandName` (type: `string`):

Optional. Detected from the website if empty.

## `audience` (type: `string`):

Optional. Who buys it, e.g. "small businesses", "freelancers", "parents".

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

Optional. Adds the market to questions, e.g. "Malaysia" gives "What is the best accounting software in Malaysia?".

## `competitors` (type: `array`):

Competitor names. Used for comparison ("X vs Y") and alternatives ("alternatives to X") questions.

## `cities` (type: `array`):

Optional. Adds local questions such as "best accounting software in Penang".

## `useCases` (type: `array`):

Optional. Things buyers want to get done, written as actions, e.g. "send e-invoices to LHDN", "track my expenses". Extra ones are also detected from the website.

## `languages` (type: `array`):

Languages for the questions. English (en) and Malay (ms) are supported.

## `maxPrompts` (type: `integer`):

How many prompts to return. You pay per prompt returned.

## `includeBrandedPrompts` (type: `boolean`):

Adds questions like "Is Acme good?" and "Acme vs Rival". Turn off to get only unbranded questions, which test whether AI recommends the brand on its own.

## `maxPagesToCrawl` (type: `integer`):

How many pages of the website to read.

## `openaiApiKey` (type: `string`):

Optional. With your own key, an AI model also writes more natural, varied questions based on the website. Without a key, the Actor uses proven question templates. Your key is stored encrypted and only used for this run.

## `openaiModel` (type: `string`):

Model used when an OpenAI key is given.

## `proxyConfiguration` (type: `object`):

Only needed if the website blocks automated visits.

## Actor input object example

```json
{
  "category": "accounting software",
  "websiteUrl": "https://www.xero.com/my/",
  "audience": "small businesses",
  "market": "Malaysia",
  "competitors": [
    "QuickBooks",
    "Bukku",
    "SQL Accounting"
  ],
  "cities": [
    "Kuala Lumpur",
    "Penang"
  ],
  "languages": [
    "en",
    "ms"
  ],
  "maxPrompts": 50,
  "includeBrandedPrompts": true,
  "maxPagesToCrawl": 8,
  "openaiModel": "gpt-5.4-mini",
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `prompts` (type: `string`):

All generated prompts with language, intent and funnel stage.

## `summary` (type: `string`):

Counts by intent and language, plus what was detected on the website.

## `promptsText` (type: `string`):

One prompt per line, ready to paste into a tracking tool.

# 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 = {
    "category": "accounting software",
    "websiteUrl": "https://www.xero.com/my/",
    "audience": "small businesses",
    "market": "Malaysia",
    "competitors": [
        "QuickBooks",
        "Bukku",
        "SQL Accounting"
    ],
    "cities": [
        "Kuala Lumpur",
        "Penang"
    ],
    "languages": [
        "en",
        "ms"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("shariful-labs/buyer-prompt-generator").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 = {
    "category": "accounting software",
    "websiteUrl": "https://www.xero.com/my/",
    "audience": "small businesses",
    "market": "Malaysia",
    "competitors": [
        "QuickBooks",
        "Bukku",
        "SQL Accounting",
    ],
    "cities": [
        "Kuala Lumpur",
        "Penang",
    ],
    "languages": [
        "en",
        "ms",
    ],
}

# Run the Actor and wait for it to finish
run = client.actor("shariful-labs/buyer-prompt-generator").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 '{
  "category": "accounting software",
  "websiteUrl": "https://www.xero.com/my/",
  "audience": "small businesses",
  "market": "Malaysia",
  "competitors": [
    "QuickBooks",
    "Bukku",
    "SQL Accounting"
  ],
  "cities": [
    "Kuala Lumpur",
    "Penang"
  ],
  "languages": [
    "en",
    "ms"
  ]
}' |
apify call shariful-labs/buyer-prompt-generator --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,shariful-labs/buyer-prompt-generator"
        }
    }
}
```

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/aV8cmPQIkdBTRohCY/builds/OUP3bzYSX0Uw9yYs0/openapi.json
