# Demand Shift Monitoring (`fifthrow/demand-priority-shift-monitor`) Actor

Defines demand indicators, a seasonally matched baseline and a predeclared threshold for your market, then tests published leading and confirming series against them. You get a clear call on whether to revisit your priority, with indicator status,... Returns HTML, Markdown, JSON, and dataset rows.

- **URL**: https://apify.com/fifthrow/demand-priority-shift-monitor.md
- **Developed by:** [FifthRow](https://apify.com/fifthrow) (community)
- **Categories:** AI
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$32.81 / demand shift monitoring report

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

Defines demand indicators, a seasonally matched baseline and a predeclared threshold for your market, then tests published leading and confirming series against them. You get a clear call on whether to revisit your priority, with indicator status, evidence gaps and a baseline block to carry into the next review.

It returns a decision report in HTML, Markdown, JSON, and dataset rows.

### Runtime

Typical runtime: about 54 minutes.

### Summary

Assess demand shifts in {MARKET_SEGMENT} over {OBSERVATION_HORIZON}, tying leading and confirming public indicators to seasonally matched baselines and the priority, owner, and trigger in {PRIORITY_AND_TRIGGER}. The analysis identifies whether evidence supports revisiting the priority, watching for further movement, holding, or withholding judgment because evidence is insufficient. It distinguishes persistent, independently corroborated change from isolated shocks, baseline distortions, and conflicting or missing readings.

You receive a buyer-ready decision readout with an indicator status table, threshold verdicts, evidence caveats, series history, and facts to confirm before acting. A separate indicator definition sheet documents sources, coverage, baseline construction, and the stated or provisional threshold rule; leading- and confirming-series evidence tables show published observations, measured changes, release details, and comparability limits. Together, these materials clarify the decision, evidence strength, ownership gaps, and next review timing.

### Methodology

Scope the analysis to {MARKET_SEGMENT}, the observation and matched-baseline periods in {OBSERVATION_HORIZON}, and the protected priority, decision owner, and revisit trigger in {PRIORITY_AND_TRIGGER}. Define four to six public indicators across leading and confirming demand signals, favoring independent source groups, documented coverage, retrievable historical values, and relevant geography. Record formulas, units, release cadence, revisions, source links, baseline status, and known definition or policy changes without treating internal plans or buyer-stated history as published demand evidence.

Retrieve dated values from named publishers for matched baseline and observation windows, then calculate supported baseline and year-earlier changes without filling gaps or mixing incompatible units, periods, or vintages. Flag seasonality, unusual baseline periods, source overlap, proxies, revisions, gaps, and conflicting directions. Apply the stated trigger exactly, or use a clearly identified provisional rule when none is stated; assess magnitude, persistence, and corroboration across distinct source groups, then check that the decision label agrees with each indicator's evidence and limitations.

### Inputs

- `MARKET_SEGMENT` (text): Market Segment. The market or segment whose demand you monitor, with geography. Example: U.S. residential repair and remodel spending on existing owner-occupied homes.
- `OBSERVATION_HORIZON` (text): Observation Horizon. Observation window and baseline period. Example: Observe the last 12 months to the latest release; baseline is the same months of 2022 and 2023.
- `PRIORITY_AND_TRIGGER` (text): Priority And Trigger. The priority this monitor protects, who acts, any shift that should trigger a revisit. A line or two is enough; the App researches the rest. Example: Keep repair and remodel Tier-1; VP Strategy; revisit at 5% below baseline.

### Outputs

Finished runs write files to the Actor **key-value store**, plus tabular rows in the default dataset.

#### HTML report (`REPORT.html`)

A self-contained HTML brief for reading the result in a browser. Use this when you want the formatted decision output,
including headings, lists, and cited source links from the App run.

#### Markdown report (`REPORT.md`)

A portable markdown document with the same narrative as the HTML report. Use this when you want to paste the output
into docs, tickets, or another markdown editor without HTML chrome.

#### Structured JSON (`OUTPUT`)

Machine-readable JSON in the key-value store under the `OUTPUT` key. The object includes:

- `id`, `status`, `ready`: App run identity and completion state
- `title`, `catalog_url`: display title and FifthRow catalog URL
- `started_at`, `finished_at`, `duration_seconds`: run timing
- `summary`: executive summary text
- `company_impact`: implied impact narrative, when the App produced one
- `sections`: sectioned App results
- `answers`: visible answer objects (title, markdown, sources)
- `questions`: Q\&A objects produced by the run
- `sources`: deduplicated source URLs
- `dataset_items`: source rows for the default dataset (oversized dataset writes may omit markdown)
- `report_markdown`: full markdown body also stored as `REPORT.md`

#### Dataset rows

The default dataset stores rows (`run`, `summary`, `company_impact`, `answer`, `qna`)
with `title`, `markdown`, and `sources`. Rows that exceed the dataset item size limit are stored with empty markdown.

# Changelog

This Actor's version history is a separate document: https://apify.com/fifthrow/demand-priority-shift-monitor/changelog.md

# Actor input Schema

## `MARKET_SEGMENT` (type: `string`):

The market or segment whose demand you monitor, with geography. Example: U.S. residential repair and remodel spending on existing owner-occupied homes. Suggested examples: U.S. housing starts; U.S. retail sales; Canadian auto sales. Other clear text values are also accepted.

## `OBSERVATION_HORIZON` (type: `string`):

Observation window and baseline period. Example: Observe the last 12 months to the latest release; baseline is the same months of 2022 and 2023. Suggested examples: Last month versus prior month; Last quarter versus prior year; Last 12 months versus 2023. Other clear text values are also accepted.

## `PRIORITY_AND_TRIGGER` (type: `string`):

The priority this monitor protects, who acts, any shift that should trigger a revisit. A line or two is enough; the App researches the rest. Example: Keep repair and remodel Tier-1; VP Strategy; revisit at 5% below baseline. Suggested examples: Protect housing growth; 5% decline; Maintain retail priority; 3% drop; Preserve hiring plans; 10% decline. Other clear text values are also accepted.

## Actor input object example

```json
{
  "MARKET_SEGMENT": "U.S. housing starts",
  "OBSERVATION_HORIZON": "Last month versus prior month",
  "PRIORITY_AND_TRIGGER": "Protect housing growth; 5% decline"
}
```

# Actor output Schema

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

Complete structured JSON result stored as KVS OUTPUT.

## `markdown` (type: `string`):

Portable markdown report stored as KVS REPORT.md.

## `overview` (type: `string`):

Run overview plus summary, company impact, answers, and Q\&A as default dataset items.

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

Self-contained HTML report stored as KVS REPORT.html.

# 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 = {
    "MARKET_SEGMENT": "U.S. housing starts",
    "OBSERVATION_HORIZON": "Last month versus prior month",
    "PRIORITY_AND_TRIGGER": "Protect housing growth; 5% decline"
};

// Run the Actor and wait for it to finish
const run = await client.actor("fifthrow/demand-priority-shift-monitor").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 = {
    "MARKET_SEGMENT": "U.S. housing starts",
    "OBSERVATION_HORIZON": "Last month versus prior month",
    "PRIORITY_AND_TRIGGER": "Protect housing growth; 5% decline",
}

# Run the Actor and wait for it to finish
run = client.actor("fifthrow/demand-priority-shift-monitor").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 '{
  "MARKET_SEGMENT": "U.S. housing starts",
  "OBSERVATION_HORIZON": "Last month versus prior month",
  "PRIORITY_AND_TRIGGER": "Protect housing growth; 5% decline"
}' |
apify call fifthrow/demand-priority-shift-monitor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,fifthrow/demand-priority-shift-monitor"
        }
    }
}
```

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/fyiG0etaS37SdbXUx/builds/rdhpDa7ha6bO7FLaj/openapi.json
