# Custom AI Prompt by Signaliz (`signaliz/custom-ai-prompt`) Actor

Run structured AI prompts over company or custom records through the Signaliz public API, with optional web search and output fields.

- **URL**: https://apify.com/signaliz/custom-ai-prompt.md
- **Developed by:** [Signaliz](https://apify.com/signaliz) (community)
- **Categories:** Lead generation, Agents, Automation
- **Stats:** 3 total users, 2 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$5.00 / 1,000 results

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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use 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

## Custom AI Prompt by Signaliz

Run structured AI prompts over company or custom records through the Signaliz public API. This Actor wraps `POST /custom-ai-prompt` and supports flat public API input, batch rows, prompt templates, output fields, and search flags.

### What it does

- Accepts one flat request, JSON records, a list of domains, pasted CSV, a CSV URL, or an Apify dataset ID.
- Supports `prompt`, `user_template`, `system_prompt`, `output_fields`, `search`, `web_search`, `temperature`, and model override.
- Defaults to `google/gemini-3.1-flash-lite`.
- Preserves every original input column.
- Appends structured AI results, credit usage, errors, normalized request, and raw Signaliz response.
- Retries transient `429` and `5xx` responses with bounded backoff.
- Writes one dataset item per input row and a summary to the key-value store under `SUMMARY` and `OUTPUT`.

### Input

For a single company:

```json
{
  "domain": "stripe.com",
  "company_name": "Stripe",
  "prompt": "Score this company for enterprise sales readiness.",
  "search": true,
  "output_fields": [
    { "name": "score", "type": "number" },
    { "name": "reason", "type": "text" }
  ]
}
````

For row-aware batches, use `records`, `csv_text`, `csv_url`, or `source_dataset_id` with `user_template`:

```json
{
  "records": [{ "company_name": "Stripe", "domain": "stripe.com" }],
  "user_template": "Score {{company_name}} at {{domain}} for enterprise sales readiness."
}
```

### Output

Each dataset item includes the original row plus fields like:

```json
{
  "company_name": "Stripe",
  "domain": "stripe.com",
  "success": true,
  "score": 87,
  "reason": "Strong enterprise fit.",
  "credits_used": 2,
  "model": "google/gemini-3.1-flash-lite",
  "search": true,
  "normalized_request": {
    "domain": "stripe.com",
    "prompt": "Score this company for enterprise sales readiness."
  },
  "raw_response": {}
}
```

### Pricing

Pay per result through Apify. The Actor uses the synthetic default dataset item event, so each dataset item is one billable result.

### About Signaliz

Signaliz is a GTM data quality platform by Content Marketing Media. It powers enrichment, validation, and signal workflows for outbound teams operating at serious volume.

# Actor input Schema

## `domain` (type: `string`):

Company domain for a single flat request.

## `company_name` (type: `string`):

Optional company name for the single request.

## `prompt` (type: `string`):

Prompt to run for each row.

## `user_template` (type: `string`):

Optional row-aware template. Use {{field\_name}} placeholders from each input row.

## `output_fields` (type: `array`):

Structured fields to return. Use strings or objects with name, type, and description.

## `records` (type: `array`):

Batch rows to process with the prompt or prompt template.

## `domains` (type: `array`):

Alternative batch mode for a list of domains.

## `csv_text` (type: `string`):

Paste CSV rows. Original columns are preserved in output.

## `csv_url` (type: `string`):

Public URL to a CSV file.

## `source_dataset_id` (type: `string`):

Read rows from another Apify dataset.

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

Alias for source\_dataset\_id. Included for compatibility with existing Signaliz Apify actors.

## `search` (type: `boolean`):

Enable Signaliz web search context.

## `enable_search` (type: `boolean`):

Alias for search.

## `enable_online` (type: `boolean`):

Alias for search/online Signaliz model context.

## `web_search` (type: `object`):

Optional advanced web\_search config forwarded to Signaliz.

## `model` (type: `string`):

OpenRouter model ID used by Signaliz.

## `temperature` (type: `number`):

Model temperature.

## `chunk_size` (type: `integer`):

Rows grouped before the next bounded processing slice.

## `max_concurrency` (type: `integer`):

Maximum simultaneous Signaliz API calls.

## Actor input object example

```json
{
  "domain": "stripe.com",
  "company_name": "Stripe",
  "prompt": "Score this company for enterprise sales readiness.",
  "output_fields": [
    {
      "name": "score",
      "type": "number"
    },
    {
      "name": "reason",
      "type": "text"
    }
  ],
  "search": true,
  "enable_search": true,
  "enable_online": true,
  "model": "google/gemini-3.1-flash-lite",
  "temperature": 0.3,
  "chunk_size": 25,
  "max_concurrency": 5
}
```

# Actor output Schema

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

One row per processed prompt input.

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

Aggregate counts, credit totals, and elapsed time.

# 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 = {
    "domain": "stripe.com",
    "company_name": "Stripe",
    "prompt": "Score this company for enterprise sales readiness."
};

// Run the Actor and wait for it to finish
const run = await client.actor("signaliz/custom-ai-prompt").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 = {
    "domain": "stripe.com",
    "company_name": "Stripe",
    "prompt": "Score this company for enterprise sales readiness.",
}

# Run the Actor and wait for it to finish
run = client.actor("signaliz/custom-ai-prompt").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "domain": "stripe.com",
  "company_name": "Stripe",
  "prompt": "Score this company for enterprise sales readiness."
}' |
apify call signaliz/custom-ai-prompt --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=signaliz/custom-ai-prompt",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Custom AI Prompt by Signaliz",
        "description": "Run structured AI prompts over company or custom records through the Signaliz public API, with optional web search and output fields.",
        "version": "1.0",
        "x-build-id": "xmLfqCKWJEWG4obqO"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/signaliz~custom-ai-prompt/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-signaliz-custom-ai-prompt",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/signaliz~custom-ai-prompt/runs": {
            "post": {
                "operationId": "runs-sync-signaliz-custom-ai-prompt",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/signaliz~custom-ai-prompt/run-sync": {
            "post": {
                "operationId": "run-sync-signaliz-custom-ai-prompt",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "domain": {
                        "title": "Domain",
                        "type": "string",
                        "description": "Company domain for a single flat request."
                    },
                    "company_name": {
                        "title": "Company name",
                        "type": "string",
                        "description": "Optional company name for the single request."
                    },
                    "prompt": {
                        "title": "Prompt",
                        "type": "string",
                        "description": "Prompt to run for each row."
                    },
                    "user_template": {
                        "title": "Prompt template",
                        "type": "string",
                        "description": "Optional row-aware template. Use {{field_name}} placeholders from each input row."
                    },
                    "output_fields": {
                        "title": "Output fields",
                        "type": "array",
                        "description": "Structured fields to return. Use strings or objects with name, type, and description.",
                        "items": {
                            "type": "object",
                            "properties": {
                                "name": {
                                    "title": "Name",
                                    "type": "string",
                                    "description": "Output field name."
                                },
                                "type": {
                                    "title": "Type",
                                    "type": "string",
                                    "description": "Output field type, such as text, number, boolean, array, or json."
                                },
                                "description": {
                                    "title": "Description",
                                    "type": "string",
                                    "description": "Instructions for this output field."
                                }
                            },
                            "required": [
                                "name"
                            ]
                        },
                        "default": [
                            {
                                "name": "score",
                                "type": "number"
                            },
                            {
                                "name": "reason",
                                "type": "text"
                            }
                        ]
                    },
                    "records": {
                        "title": "Records",
                        "type": "array",
                        "description": "Batch rows to process with the prompt or prompt template.",
                        "items": {
                            "type": "object"
                        }
                    },
                    "domains": {
                        "title": "Domains",
                        "type": "array",
                        "description": "Alternative batch mode for a list of domains.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "csv_text": {
                        "title": "CSV text",
                        "type": "string",
                        "description": "Paste CSV rows. Original columns are preserved in output."
                    },
                    "csv_url": {
                        "title": "CSV URL",
                        "type": "string",
                        "description": "Public URL to a CSV file."
                    },
                    "source_dataset_id": {
                        "title": "Apify Dataset ID",
                        "type": "string",
                        "description": "Read rows from another Apify dataset."
                    },
                    "datasetId": {
                        "title": "Apify Dataset ID (alias)",
                        "type": "string",
                        "description": "Alias for source_dataset_id. Included for compatibility with existing Signaliz Apify actors."
                    },
                    "search": {
                        "title": "Use search",
                        "type": "boolean",
                        "description": "Enable Signaliz web search context.",
                        "default": true
                    },
                    "enable_search": {
                        "title": "Enable search",
                        "type": "boolean",
                        "description": "Alias for search.",
                        "default": true
                    },
                    "enable_online": {
                        "title": "Enable online mode",
                        "type": "boolean",
                        "description": "Alias for search/online Signaliz model context.",
                        "default": true
                    },
                    "web_search": {
                        "title": "Web search config",
                        "type": "object",
                        "description": "Optional advanced web_search config forwarded to Signaliz."
                    },
                    "model": {
                        "title": "Model",
                        "type": "string",
                        "description": "OpenRouter model ID used by Signaliz.",
                        "default": "google/gemini-3.1-flash-lite"
                    },
                    "temperature": {
                        "title": "Temperature",
                        "minimum": 0,
                        "maximum": 2,
                        "type": "number",
                        "description": "Model temperature.",
                        "default": 0.3
                    },
                    "chunk_size": {
                        "title": "Chunk size",
                        "minimum": 1,
                        "maximum": 100,
                        "type": "integer",
                        "description": "Rows grouped before the next bounded processing slice.",
                        "default": 25
                    },
                    "max_concurrency": {
                        "title": "Max concurrency",
                        "minimum": 1,
                        "maximum": 25,
                        "type": "integer",
                        "description": "Maximum simultaneous Signaliz API calls.",
                        "default": 5
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
