# US Brand Signal Sequence Transition Analyzer (`zinin/us-brand-signal-sequence-transition-analyzer`) Actor

Measure deterministic directed adjacent step transitions, counts, sequence support, and stable digests across buyer-supplied opaque sequences without fetching external data.

- **URL**: https://apify.com/zinin/us-brand-signal-sequence-transition-analyzer.md
- **Developed by:** [Tim Zinin](https://apify.com/zinin) (community)
- **Categories:** MCP servers, Automation, Marketing
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## US Brand Signal Sequence Transition Analyzer

US Brand Signal Sequence Transition Analyzer measures ordered, directed, adjacent step transitions in buyer-supplied opaque sequences. It is a bounded machine-friendly processor for workflow, funnel, and journey analysis.

The Actor analyzes only the JSON you provide. It does not fetch a website, resolve an ID, identify a person or company, infer causality, or make an external truth claim.

### What you submit and receive

You submit 1 to 100 sequences. Every sequence has a unique printable ASCII `sequenceId` and 2 to 30 ordered printable ASCII `stepIds`. Repeated step IDs are allowed because loops are meaningful. The Actor returns one Dataset report containing:

- `sequenceCounts`: stable sequence lengths and adjacent-transition counts.
- `transitionRows`: sorted directed `fromStepId` to `toStepId` rows.
- `transitionCount`: how many adjacent occurrences of each directed pair were observed.
- `sequenceSupportBasisPoints`: in how many submitted sequences the pair appeared at least once, expressed in basis points from 1 to 10,000.
- reconciled totals and SHA-256 digests for the input, sequences, transition rows, and result.
- a truthful `OUTPUT` receipt after one confirmed Dataset write.

This is different from unordered co-occurrence: `discover -> compare` and `compare -> discover` are different transitions, and non-adjacent steps are not connected.

### Run it

1. Open **Try for free** in the Actor Console.
2. Paste the exact JSON shape shown in the Input section.
3. Start the run and read the one report row from the Dataset.
4. Read the terminal delivery receipt from `OUTPUT`.

The complete runnable prefill is also available in `examples/input.json` and `public-task.json`.

### Pricing

Pay per event: **$0.005 per run start plus $0.010 per delivered result** on the FREE tier. The result event is emitted only after one confirmed Dataset write. The Actor checks that the buyer cap covers both charges before processing.

| Tier | Discount | Start | Delivered result |
| --- | ---: | ---: | ---: |
| FREE | 0% | $0.00500 | $0.01000 |
| BRONZE | 5% | $0.00475 | $0.00950 |
| SILVER | 10% | $0.00450 | $0.00900 |
| GOLD | 15% | $0.00425 | $0.00850 |
| PLATINUM | 18% | $0.00410 | $0.00820 |
| DIAMOND | 20% | $0.00400 | $0.00800 |

Invalid input, insufficient cap, uncertain delivery, and an uncharged or multiply charged result are not reported as successful results. The Actor never retries a paid Dataset push.

### Determinism and limits

There is no external freshness because this Actor does not fetch data and does not read the clock. The same sequences always produce the same rows and digests, regardless of the input sequence order. Rows are sorted by `fromStepId`, then `toStepId` using ASCII order.

- Maximum input: 100 sequences, 2 to 30 steps per sequence, 96 KiB canonical input.
- Maximum report: 48 KiB. A valid but too-dense report returns `output_too_large` instead of partial data.
- No network, proxy, BYOK key, LLM, clock, state, child Actor, or Dataset input.
- JSON Schema validates shape; runtime validators enforce ordering, basis-point support, digest, and cross-field reconciliation.

### Input

```json
{
  "schemaVersion": "1.0",
  "sequences": [
    {"sequenceId": "journey-001", "stepIds": ["discover", "compare", "select", "purchase"]},
    {"sequenceId": "journey-002", "stepIds": ["discover", "compare", "purchase"]},
    {"sequenceId": "journey-003", "stepIds": ["discover", "select", "purchase"]}
  ]
}
```

### Output

The Dataset has one deterministic report item. `transitionRows` contains each directed adjacent pair once, with its occurrence count and sequence support in basis points. `OUTPUT` contains the terminal status, delivery receipt, and links represented by the Store output schema.

### Related public Actors

These public Actors can feed or use the same buyer-owned brand-signal workflow. This Actor does not call them.

| Actor | Use it for |
| --- | --- |
| [US Brand Federal Award Snapshot](https://apify.com/zinin/us-brand-federal-award-snapshot) | Collect bounded official federal-award observations before converting them into buyer-owned sequences. |
| [US Brand Action Queue](https://apify.com/zinin/us-brand-action-queue) | Turn reviewed transition findings into deterministic next actions. |
| [US Brand Offer Evidence Normalizer](https://apify.com/zinin/us-brand-offer-evidence-normalizer) | Normalize offer observations before modeling their ordered workflow steps. |
| [US Brand Signal Metrics Aggregator](https://apify.com/zinin/us-brand-signal-metrics-aggregator) | Summarize signal rows alongside transition counts. |
| [US Brand Signal Brief Composer](https://apify.com/zinin/us-brand-signal-brief-composer) | Turn the resulting transition report into an agent-readable brief. |
| [US Brand Evidence Snapshot Diff](https://apify.com/zinin/us-brand-evidence-snapshot-diff) | Compare two buyer-supplied evidence snapshots before or after transition analysis. |

### FAQ

**Does a transition prove causality?** No. It is only an adjacent count in the sequences you submitted.

**What does sequence support mean?** It is the percentage represented as basis points of submitted sequences in which a directed pair appeared at least once. For example, `6667` means 66.67%.

**Are reverse transitions equivalent?** No. `A -> B` and `B -> A` are distinct directed rows.

**Are repeated step IDs allowed?** Yes. A sequence such as `review -> retry -> review` produces both directed adjacent transitions.

**Can I submit names or URLs?** The contract accepts opaque printable ASCII IDs only. The Actor does not resolve identity or fetch URLs.

**What happens after uncertain delivery?** The Actor records a non-success terminal receipt and does not issue a second Dataset write.

Built by [zinin](https://apify.com/zinin).

# Actor input Schema

## `schemaVersion` (type: `string`):

The only supported closed contract version.

## `sequences` (type: `array`):

One to 100 sequences; each contains 2 to 30 ordered opaque step IDs.

## Actor input object example

```json
{
  "schemaVersion": "1.0",
  "sequences": [
    {
      "sequenceId": "journey-001",
      "stepIds": [
        "discover",
        "compare",
        "select",
        "purchase"
      ]
    },
    {
      "sequenceId": "journey-002",
      "stepIds": [
        "discover",
        "compare",
        "purchase"
      ]
    },
    {
      "sequenceId": "journey-003",
      "stepIds": [
        "discover",
        "select",
        "purchase"
      ]
    }
  ]
}
```

# Actor output Schema

## `OUTPUT` (type: `string`):

API link to the terminal receipt when OUTPUT was stored.

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

API link to the one deterministic report row after confirmed result delivery.

# 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 = {
    "schemaVersion": "1.0",
    "sequences": [
        {
            "sequenceId": "journey-001",
            "stepIds": [
                "discover",
                "compare",
                "select",
                "purchase"
            ]
        },
        {
            "sequenceId": "journey-002",
            "stepIds": [
                "discover",
                "compare",
                "purchase"
            ]
        },
        {
            "sequenceId": "journey-003",
            "stepIds": [
                "discover",
                "select",
                "purchase"
            ]
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("zinin/us-brand-signal-sequence-transition-analyzer").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "schemaVersion": "1.0",
    "sequences": [
        {
            "sequenceId": "journey-001",
            "stepIds": [
                "discover",
                "compare",
                "select",
                "purchase",
            ],
        },
        {
            "sequenceId": "journey-002",
            "stepIds": [
                "discover",
                "compare",
                "purchase",
            ],
        },
        {
            "sequenceId": "journey-003",
            "stepIds": [
                "discover",
                "select",
                "purchase",
            ],
        },
    ],
}

# Run the Actor and wait for it to finish
run = client.actor("zinin/us-brand-signal-sequence-transition-analyzer").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 '{
  "schemaVersion": "1.0",
  "sequences": [
    {
      "sequenceId": "journey-001",
      "stepIds": [
        "discover",
        "compare",
        "select",
        "purchase"
      ]
    },
    {
      "sequenceId": "journey-002",
      "stepIds": [
        "discover",
        "compare",
        "purchase"
      ]
    },
    {
      "sequenceId": "journey-003",
      "stepIds": [
        "discover",
        "select",
        "purchase"
      ]
    }
  ]
}' |
apify call zinin/us-brand-signal-sequence-transition-analyzer --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=zinin/us-brand-signal-sequence-transition-analyzer",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/h23cakxHXKnChAbaE/builds/EdQpQygrhkxcmrU6z/openapi.json
