# Logistics Freight Intelligence (`ryanclinton/logistics-freight-intelligence`) Actor

Batch supply chain risk intelligence per entity. One run returns composite score, decision profile, materiality, velocity, escalation policy, mitigation plans, governance, audit replay. 9 official data sources. Bulk-friendly. For ERP, BI, Zapier, Make, n8n. Pay per entity.

- **URL**: https://apify.com/ryanclinton/logistics-freight-intelligence.md
- **Developed by:** [Ryan Clinton](https://apify.com/ryanclinton) (community)
- **Categories:** AI, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

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

## 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

## Logistics Freight Intelligence

![Logistics Freight Intelligence — $0.30 per result, 6 output fields per row](https://apifyforge.com/readme-assets/ryanclinton-logistics-freight-intelligence/hero.png)

**AI-native operational decision infrastructure for supply chains, as a batch-oriented enterprise actor.** Same scoring engine, same decision envelope, same 9 data sources as the [Logistics Freight Intelligence MCP](https://apify.com/ryanclinton/logistics-freight-intelligence-mcp) — but exposed as a scheduled-execution Apify actor instead of a Streamable HTTP server. Built for the enterprise orchestration + batch intelligence layer: scheduled portfolio sweeps, ERP / TMS / WMS / SAP / Oracle / NetSuite / ServiceNow integrations, Zapier / Make / n8n workflows, BI tooling (Looker / Tableau / Power BI / Snowflake / BigQuery), bulk-screening pipelines, custom HTTP integrations, and supply chain analytics pipelines.

One run → one dataset row per entity assessed, carrying the full decision envelope (composite score, verdict, decision profile, materiality, velocity, escalation policy, governance, mitigation plans, audit replay ID, and every other field the MCP emits). The deterministic decision infrastructure beneath your enterprise supply chain automation.

### In one line

AI-native supply chain risk and operational decision infrastructure for logistics automation, procurement intelligence, trade compliance, autonomous shipment approval, supplier risk monitoring, freight corridor analysis, scheduled portfolio sweeps, ERP integrations, customs risk evaluation, vendor onboarding governance, procurement AI, sourcing AI, trade intelligence, supply chain copilot data feeds, BI dashboards, operational analytics, supply chain analytics, risk intelligence feed, governance telemetry, operational observability, risk observability, resilience analytics, autonomous workflow orchestration, batch machine-readable risk assessments, autonomous governance infrastructure, and the operational control plane for enterprise supply chain workflows.

### Fast overview

This actor:

- Assesses supply chain risk per entity with a composite 0-100 score and verdict enum
- Scores freight corridors across route disruption, trade compliance, freight cost, and border delay axes
- Evaluates suppliers and carriers for sanctions exposure and economic stability
- Monitors sanctions exposure against OFAC SDN and OpenSanctions in every assessment
- Forecasts disruption risk and projects state at 24h / 7d / 30d horizons
- Generates sequenced mitigation plans with owner, hour estimates, and expected risk reduction
- Orchestrates per-agent next-action enums (operations / procurement / compliance / legal / finance)
- Emits machine-readable escalation policies with `blockAutomations[]` and `notifyChannels[]`
- Governs autonomous AI actions via `allowedActions[]` / `forbiddenActions[]` per autonomy tier
- Compares 2 to 100 entities in a single run for bulk screening
- Detects supplier concentration risk via Herfindahl-Hirschman Index analysis
- Audits every decision with a replayable `decisionAuditId`
- Coordinates ERP / TMS / WMS / SAP / Oracle / BI dashboard / Zapier / Make / n8n / Snowflake / BigQuery / Looker / Tableau / Power BI integrations
- Enables AI-safe operational automation with explicit autonomy boundaries

![What we add — 8-layer intelligence stack from entity name to machine-readable decision envelope](https://apifyforge.com/readme-assets/ryanclinton-logistics-freight-intelligence/intelligence-layers.png)

### Why structured outputs matter

This actor emits enums, booleans, numbers, and structured arrays — never prose. Every decision-relevant field is designed for:

- **ERP workflows** branching on `decisionProfile.recommendedAction` enums
- **BI systems** charting `compositeScore`, `riskVelocity.pointsPerDay`, `dependencyExposure.upstreamConcentration`
- **Automation engines** routing on `escalationPolicy.blockAutomations[]` and `automationTriggers.*` booleans
- **AI agents** consuming `agentInstructions.safeToAutoApprove` and `agentCoordination.*` per-agent enums
- **Orchestration platforms** dispatching tools on `governance.policyTier` and `autonomyBoundary.allowedActions[]`
- **Audit and governance** replaying past decisions via `decisionAuditId`

No prose parsing required. Add-only schema versioning: new fields never remove fields automation already references.

### Teams that use this actor

- **Procurement** — evaluate vendor risk, monitor supplier concentration, prioritize diversification, screen vendors before onboarding
- **Logistics operations** — orchestrate corridor monitoring, escalate disruption events, coordinate contingency routing
- **Supply chain resilience** — forecast recovery times, govern operational state machines, audit longitudinal drift
- **Customs and compliance** — screen cargo against OFAC and OpenSanctions, mitigate compliance holds, coordinate legal review
- **Freight procurement** — compare carriers, hedge cost volatility, lock long-term rate contracts
- **Risk and resilience analytics** — produce quarterly board reports, run scenario plans, audit decision replay logs
- **AI engineering** — orchestrate autonomous workflows, govern AI-agent autonomy boundaries, coordinate multi-agent decisioning
- **ERP automation** — gate shipment release, escalate to operations, coordinate with SAP / Oracle / NetSuite / ServiceNow
- **Business intelligence** — feed operational analytics, governance telemetry, and risk observability dashboards
- **Operations control towers** — consume blockAutomations enums to pause downstream systems deterministically

### Operational outcomes

- Reduce alert fatigue with materiality-weighted suppression across portfolio sweeps
- Standardize escalation decisions with stable enums and machine-readable policies
- Detect supplier concentration risk earlier through longitudinal HHI drift tracking
- Prevent silent compliance failures through deterministic sanctions screening
- Enable autonomous shipment gating with machine-safe outputs and audit trails
- Improve operational resilience scoring across the supplier portfolio
- Compress incident response time with portfolio-level decision compression
- Forecast freight cost volatility regimes before contracting commitments
- Surface single points of failure in the supplier panel via dependency exposure analysis
- Project recovery time after disruptions with velocity-aware modelling
- Create replayable audit trails for AI governance and compliance review
- Orchestrate cross-functional escalation across operations, procurement, compliance, legal, and finance teams
- Govern AI-agent autonomy via deterministic `allowedActions[]` / `forbiddenActions[]` boundaries

![What you also get — 4 standout features: 9 data sources, decision profile per entity, bulk-friendly, audit replay built in](https://apifyforge.com/readme-assets/ryanclinton-logistics-freight-intelligence/feature-callouts.png)

### When to use this actor vs the MCP

| You want this actor when... | You want the MCP when... |
|---|---|
| Scheduled daily / weekly sweep across many entities | Real-time on-demand assessment from an AI agent |
| ERP / TMS / WMS integration that consumes Apify datasets | Claude Desktop / Cursor / Cline / any MCP client |
| Zapier / Make / n8n workflow without an MCP client | Multi-turn agent workflows with persistent state |
| BI dashboard (Looker / Tableau / Power BI) pulling rows | Conversational risk Q&A |
| Bulk screen 10-100 entities in one run | Targeted single-entity drill-downs |
| Webhook-triggered batch | Long-lived agent session |

Same scoring engine. Same envelope. Same data sources. Two consumption patterns.

### What you get per entity

![Sample output — 7 entity rows with composite, verdict, riskTier, recommendedAction columns](https://apifyforge.com/readme-assets/ryanclinton-logistics-freight-intelligence/output-table.png)

Every dataset row is the full structured envelope:

- **`compositeScore`** + **`verdict`** (LOW_RISK / MANAGEABLE / ELEVATED / HIGH_RISK / CRITICAL)
- **`routeDisruption`** / **`tradeCompliance`** / **`freightCost`** / **`borderDelay`** — four dimensional scores with signals and breakdowns
- **`decisionProfile`** — riskTier (P1-P4), recommendedAction enum, ordered nextActions, escalationPolicy with `blockAutomations[]` + `notifyChannels[]` + `requiresHumanApproval` + `recommendedSLA`, automationTriggers
- **`materiality`** — anti-alert-fatigue score with `suppressAlert` boolean
- **`riskMemory`** / **`riskVelocity`** / **`riskHorizons`** — longitudinal context (24h / 7d / 30d projections from snapshot history)
- **`incidentTimeline`** — chronological event log for this entity
- **`dependencyExposure`** — HHI, single points of failure, high-risk jurisdictions, top partners
- **`blastRadius`** — affected routes / suppliers / shipment-impact
- **`cascadeRisk`** — primary events + secondary effects with propagation lag estimates
- **`capacityStress`** — reroute difficulty + alternate carrier availability + recovery days
- **`mitigationPlan`** + **`recoveryPlan`** + **`recoveryStrategies[]`** + **`recoveryForecast`** — sequenced operational moves with owner + hours + risk reduction estimates
- **`agentInstructions`** + **`agentCoordination`** + **`agentMemoryHints`** — AI-system-native fields
- **`operationalReadiness`** — `automationSafe` boolean with `blockingConditions[]`
- **`governance`** — autonomy tier + `allowedActions[]` / `forbiddenActions[]` + signoff requirements
- **`resilienceScore`** — complementary to risk; 0-100 with drivers and weakeners
- **`trustLayer`** — whyThisScore, whichSourcesMattered, whichSourcesFailed, assumptionsMade
- **`policyEvaluation[]`** when `policies` input supplied
- **`financialExposure`** when `revenueContext` input supplied
- **`executionConfidence`** when `executionContext` input supplied
- **`budgetImpact`** when `budgetContext` input supplied
- **`exposureMap`** — 0-1 per-dimension heatmap
- **`entityGraph`** — connected entities + relationship enums + risk contribution
- **`stateNarrative`** — one-line summary (Slack-paste-ready)
- **`adaptiveSignals`** + **`signalWeights`** — per-source reliability tracked across runs
- **`decisionAuditId`** — KV-stored audit entry, replayable via the MCP's `get_decision_audit` tool
- **`schemaVersion`** + **`recordType`** + **`actorVersion`** + **`schemaMode`** + **`contentHash`** + **`runSummary`** envelope

Plus a **`dataSourceErrors`** block when any of the 9 sources failed or were skipped, naming which one and why.

### Input modes

#### Single entity

```json
{
  "entity": "Taiwan Strait electronics corridor",
  "mode": "accurate",
  "workflowProfile": "raw"
}
````

#### Bulk (up to 100 entities)

```json
{
  "entities": ["US-Shanghai", "US-Rotterdam", "US-Mumbai", "US-Singapore", "US-Vietnam"],
  "mode": "accurate"
}
```

#### With caller-supplied operational context

```json
{
  "entity": "Vietnam electronics supplier panel",
  "constraints": {
    "alternateCapacityAvailable": false,
    "supplierSwitchLeadTimeDays": 45,
    "customsRestriction": false,
    "bookingFreezeActive": false
  },
  "revenueContext": {
    "dailyRevenueUsd": 4200000,
    "perShipmentValueUsd": 18000,
    "affectedShipmentsPerDay": 30,
    "perDayDelayCostUsd": 12000,
    "activeInventoryValueUsd": 12000000,
    "downstreamCustomerCount": 14,
    "topCustomerDependency": "high"
  },
  "executionContext": {
    "alternateSupplierOnboardingDaysAvg": 75,
    "customsApprovalBacklogStatus": "elevated",
    "procurementTeamCapacity": "moderate",
    "executiveAvailabilityHours": 24,
    "legalReviewBacklogDays": 5
  },
  "budgetContext": {
    "rerouteCostUsd": 85000,
    "hedgeCostUsd": 120000,
    "supplierSwitchCostUsd": 380000,
    "complianceHoldDailyCostUsd": 24000
  },
  "policies": [
    {
      "name": "high_value_semiconductors",
      "conditions": {
        "maxComposite": 50,
        "forbidComplianceLevel": ["HIGH_RISK", "BLOCKED"],
        "requireConfidenceLevel": "HIGH"
      },
      "onViolation": "BLOCK"
    }
  ]
}
```

When caller-supplied context fields are absent, the corresponding blocks return `null` or `insufficient_context` rather than fabricating numbers.

### Operational modes

- **`fast`** — skips UN COMTRADE / OECD / World Bank. Faster, lower compute. Use for high-frequency monitoring sweeps where deep trade-flow context is not the primary signal.
- **`accurate`** (default) — calls every source the actor defines.
- **`audit`** — same as accurate, plus `perSourceMs` and `perSourceItemCount` in `runSummary`. Use for debugging or audit trail.

### Workflow profiles

- **`raw`** (default) — nested JSON envelope.
- **`zapier`** — flat single-level object, underscore-joined keys, arrays joined to comma-strings. Drops straight into Zapier Custom Webhook outputs.
- **`make`** — flat single-level object, dot-joined keys, arrays as JSON strings. For Make.com HTTP-module consumers.
- **`dify`** — decision-only projection. Only `verdict`, `compositeScore`, `riskTier`, `recommendedAction`, `shouldAct`, `signals`, `nextActions`, `automationTriggers`. For Dify if/else branching.

### Environment variables

Set as `isSecret` env vars on the actor version (Apify Console → Actor settings → Environment Variables → mark as Secret).

| Variable | Required | Effect if missing |
|----------|----------|-------------------|
| `OPENSANCTIONS_API_KEY` | Recommended | OpenSanctions source is skipped on every entity. Free trial key at opensanctions.org. |
| `COMTRADE_SUBSCRIPTION_KEY` | Optional | UN COMTRADE caps at 500 records per query without it; 250,000 with it. |
| `BLS_API_KEY` | Optional | BLS caps at 25 requests/day without it; 500/day with it. |

### Pricing

- **$0.30 per entity** (one dataset row = one `result-returned` charge event).
- Bulk runs scale linearly: 50 entities = $15.
- No charge fires when no upstream source returns data (the row is a `_no_data` envelope, free).

Apify free plan: $5/month credits, ≈ 16 entity assessments.

### Use cases

- **Daily portfolio sweep** — schedule the actor with `entities: ["corridor-1", "corridor-2", ...]` at 06:00 UTC. Pipe the dataset into Slack / Snowflake / Looker. Drives the morning ops standup.
- **ERP risk gate** — webhook from SAP or Oracle TM before shipment booking, with a single entity input. Branch downstream on `decisionProfile.recommendedAction` or `escalationPolicy.haltShipments`.
- **Make.com flow** — HTTP node calls the actor with `workflowProfile: "make"`; subsequent modules branch on flat dotted-path fields.
- **Zapier multi-step** — Trigger fires on supplier added; Zapier calls the actor with `workflowProfile: "zapier"`; Filter step routes on `decisionProfile_recommendedAction`.
- **Bulk supplier panel screen** — quarterly review across 80 suppliers; one run, one dataset, full audit trail. Compare to last quarter's run via dataset diff.
- **Scenario planning data feed** — run the actor across a list of corridors monthly; feed the snapshot history into a BI tool to track HHI drift over time.

### Platform ecosystem

A coherent product architecture for AI-native supply chain operations. Two consumption layers over the same scoring engine, plus the underlying sources.

| Layer | Actor | Position |
|---|---|---|
| Real-time agent control plane | [Logistics Freight Intelligence MCP](https://apify.com/ryanclinton/logistics-freight-intelligence-mcp) | Streamable HTTP MCP server for AI agents (Claude / Cursor / Cline) and orchestration engines. Real-time multi-turn workflows. |
| Enterprise batch orchestration layer | **Logistics Freight Intelligence** (this actor) | Scheduled-execution Apify actor for ERP / TMS / BI / Zapier / Make / n8n consumers. One run, one dataset, full envelope per entity. |
| Sanctions screening | [OFAC Sanctions Search](https://apify.com/ryanclinton/ofac-sanctions-search) | Direct OFAC SDN lookups underneath both layers. |
| Multi-jurisdiction watchlists | [OpenSanctions Search](https://apify.com/ryanclinton/opensanctions-search) | Watchlist intelligence underneath both layers. |

Same scoring. Same envelope. Same data sources. Two consumption patterns, picked based on whether your downstream is an AI agent or a scheduled enterprise workflow.

### Limitations

- **No real-time vessel or container tracking.** Risk intelligence on routes and entities, not live AIS positions.
- **NOAA coverage is US-only.** International corridors get GDACS weather coverage but not granular NOAA alerts. Skipped sources surface in `dataSourceErrors`.
- **UN COMTRADE has a 3-6 month reporting lag.** Trade-partner HHI reflects recent-but-not-current flows.
- **OFAC / OpenSanctions match confidence is approximate.** Always confirm matches through official OFAC before halting shipments.
- **Results are advisory, not legal compliance.** Use to prioritize review; do not use as a standalone compliance program.
- **Maximum 100 entities per run.** For larger panels, split across runs.

### Responsible use

- All data sources are publicly available from official agencies.
- Sanctions screening results are advisory. Consult qualified counsel before compliance action.
- Respect the terms of service of underlying data providers.

# Actor input Schema

## `entity` (type: `string`):

A single supply chain entity, corridor, or trade route to assess (e.g. "Gulf Coast", "US-Shanghai", "Taiwan Strait electronics corridor"). Use this for one-off assessments; for bulk runs use `entities[]` instead.

## `entities` (type: `array`):

Array of entities to assess in a single run. Max 100. Each produces one dataset row. Use for daily portfolio sweeps, ERP imports, or batch scenario planning.

## `mode` (type: `string`):

`fast` skips the slow sources (UN COMTRADE, OECD, World Bank) for cheaper runs. `accurate` (default) calls all 9. `audit` adds per-source timing and item counts to the runSummary.

## `workflowProfile` (type: `string`):

Output shape. `raw` keeps the nested envelope. `zapier` flattens to underscore keys. `make` uses dotted paths with array-as-JSON-string. `dify` projects only decision-relevant fields for if/else branching.

## `policies` (type: `array`):

Array of named risk policies to evaluate against each result. Each policy has `name`, `conditions` (maxComposite / forbidVerdict / maxRiskTier / forbidComplianceLevel / requireConfidenceLevel / maxTradePartnerHHI), and `onViolation` (BLOCK / WARN / REVIEW). The response carries `policyEvaluation[]` when supplied.

## `constraints` (type: `object`):

Caller-supplied execution constraints: `alternateCapacityAvailable`, `supplierSwitchLeadTimeDays`, `customsRestriction`, `bookingFreezeActive`. The response evaluates whether the recommended action is feasible under these constraints.

## `revenueContext` (type: `object`):

Caller-supplied business context: `dailyRevenueUsd`, `perShipmentValueUsd`, `affectedShipmentsPerDay`, `perDayDelayCostUsd`, `activeInventoryValueUsd`, `downstreamCustomerCount`, `topCustomerDependency`. When provided, the response includes a `financialExposure` block with revenue-at-risk and delay-cost estimates. Omitted entirely if no context supplied — no fabricated numbers.

## `executionContext` (type: `object`):

Caller-supplied operational reality: `alternateSupplierOnboardingDaysAvg`, `customsApprovalBacklogStatus`, `procurementTeamCapacity`, `executiveAvailabilityHours`, `legalReviewBacklogDays`. When provided, `executionConfidence.score` becomes a real number; otherwise it's null with band `insufficient_context`.

## `budgetContext` (type: `object`):

Caller-supplied per-action cost estimates: `rerouteCostUsd`, `hedgeCostUsd`, `supplierSwitchCostUsd`, `complianceHoldDailyCostUsd`. When provided, `budgetImpact.estimatedMitigationCostUsd` is populated; otherwise null.

## Actor input object example

```json
{
  "entity": "Gulf Coast",
  "mode": "accurate",
  "workflowProfile": "raw"
}
```

# 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 = {
    "entity": "Gulf Coast"
};

// Run the Actor and wait for it to finish
const run = await client.actor("ryanclinton/logistics-freight-intelligence").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 = { "entity": "Gulf Coast" }

# Run the Actor and wait for it to finish
run = client.actor("ryanclinton/logistics-freight-intelligence").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 '{
  "entity": "Gulf Coast"
}' |
apify call ryanclinton/logistics-freight-intelligence --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=ryanclinton/logistics-freight-intelligence",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Logistics Freight Intelligence",
        "description": "Batch supply chain risk intelligence per entity. One run returns composite score, decision profile, materiality, velocity, escalation policy, mitigation plans, governance, audit replay. 9 official data sources. Bulk-friendly. For ERP, BI, Zapier, Make, n8n. Pay per entity.",
        "version": "1.0",
        "x-build-id": "U9kZmyLfnzyq1ZmvS"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/ryanclinton~logistics-freight-intelligence/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-ryanclinton-logistics-freight-intelligence",
                "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/ryanclinton~logistics-freight-intelligence/runs": {
            "post": {
                "operationId": "runs-sync-ryanclinton-logistics-freight-intelligence",
                "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/ryanclinton~logistics-freight-intelligence/run-sync": {
            "post": {
                "operationId": "run-sync-ryanclinton-logistics-freight-intelligence",
                "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": {
                    "entity": {
                        "title": "Entity (single)",
                        "type": "string",
                        "description": "A single supply chain entity, corridor, or trade route to assess (e.g. \"Gulf Coast\", \"US-Shanghai\", \"Taiwan Strait electronics corridor\"). Use this for one-off assessments; for bulk runs use `entities[]` instead."
                    },
                    "entities": {
                        "title": "Entities (bulk)",
                        "maxItems": 100,
                        "type": "array",
                        "description": "Array of entities to assess in a single run. Max 100. Each produces one dataset row. Use for daily portfolio sweeps, ERP imports, or batch scenario planning.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "mode": {
                        "title": "Operational mode",
                        "enum": [
                            "fast",
                            "accurate",
                            "audit"
                        ],
                        "type": "string",
                        "description": "`fast` skips the slow sources (UN COMTRADE, OECD, World Bank) for cheaper runs. `accurate` (default) calls all 9. `audit` adds per-source timing and item counts to the runSummary.",
                        "default": "accurate"
                    },
                    "workflowProfile": {
                        "title": "Workflow profile",
                        "enum": [
                            "raw",
                            "zapier",
                            "make",
                            "dify"
                        ],
                        "type": "string",
                        "description": "Output shape. `raw` keeps the nested envelope. `zapier` flattens to underscore keys. `make` uses dotted paths with array-as-JSON-string. `dify` projects only decision-relevant fields for if/else branching.",
                        "default": "raw"
                    },
                    "policies": {
                        "title": "Risk policies (optional)",
                        "type": "array",
                        "description": "Array of named risk policies to evaluate against each result. Each policy has `name`, `conditions` (maxComposite / forbidVerdict / maxRiskTier / forbidComplianceLevel / requireConfidenceLevel / maxTradePartnerHHI), and `onViolation` (BLOCK / WARN / REVIEW). The response carries `policyEvaluation[]` when supplied."
                    },
                    "constraints": {
                        "title": "Operational constraints (optional)",
                        "type": "object",
                        "description": "Caller-supplied execution constraints: `alternateCapacityAvailable`, `supplierSwitchLeadTimeDays`, `customsRestriction`, `bookingFreezeActive`. The response evaluates whether the recommended action is feasible under these constraints."
                    },
                    "revenueContext": {
                        "title": "Revenue context (optional)",
                        "type": "object",
                        "description": "Caller-supplied business context: `dailyRevenueUsd`, `perShipmentValueUsd`, `affectedShipmentsPerDay`, `perDayDelayCostUsd`, `activeInventoryValueUsd`, `downstreamCustomerCount`, `topCustomerDependency`. When provided, the response includes a `financialExposure` block with revenue-at-risk and delay-cost estimates. Omitted entirely if no context supplied — no fabricated numbers."
                    },
                    "executionContext": {
                        "title": "Execution context (optional)",
                        "type": "object",
                        "description": "Caller-supplied operational reality: `alternateSupplierOnboardingDaysAvg`, `customsApprovalBacklogStatus`, `procurementTeamCapacity`, `executiveAvailabilityHours`, `legalReviewBacklogDays`. When provided, `executionConfidence.score` becomes a real number; otherwise it's null with band `insufficient_context`."
                    },
                    "budgetContext": {
                        "title": "Budget context (optional)",
                        "type": "object",
                        "description": "Caller-supplied per-action cost estimates: `rerouteCostUsd`, `hedgeCostUsd`, `supplierSwitchCostUsd`, `complianceHoldDailyCostUsd`. When provided, `budgetImpact.estimatedMitigationCostUsd` is populated; otherwise null."
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
