# Current Inventory Search by LA Green Engineer (`dharris289/current-inventory-search`) Actor

Industrial price and inventory search for agents: retrieve fresh AutomationDirect supplier-listed USD prices and stock status for 1–100 exact codes. $3 per completed JSON/CSV report.

- **URL**: https://apify.com/dharris289/current-inventory-search.md
- **Developed by:** [David Harris](https://apify.com/dharris289) (community)
- **Stats:** 2 total users, 1 monthly users, 77.8% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$3.00 / completed inventory 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

## Current Inventory Search by LA Green Engineer

Retrieve recently queried AutomationDirect industrial product prices and seller-listed availability in one agent-friendly report.

### Price

$3 per completed report, covering one to 100 exact supplier product codes. No completed-report event is requested when a required lookup or report delivery fails. Supplier-listed out-of-stock results are useful report results and are included in the completed-report price.

### Input

```json
{"mode":"current","product_codes":["C0-00DD2-D","C0-00DR-D","C0-00DD1-D","DW-AD-711-M8"],"limit":4}
```

Use exact AutomationDirect codes. Broad searches and historical fallback are not supported in this pilot. Set the spending limit to $3. Default memory is 256 MB and recommended timeout is 600 seconds.

### What agents receive

The default dataset contains the returned product observations. The run key-value store contains REPORT (JSON), REPORT-CSV (CSV), and OUTPUT (completion receipt and file hashes). A successful paid report requires the run to succeed and OUTPUT to show completed=true, charged=true, billing=charged. Retrieve saved files from that run without starting another paid run.

Each observation includes the supplier code, published part number and brand, USD unit_price amount, seller availability statement, shipping note when provided, source link and retrieval time. Supplier price last_updated is separate from the retrieval time. Unknown quantity, warehouse location and inventory fact timestamp remain unknown.

### Coverage and freshness

This pilot queries the supplier's documented public product API for the requested codes during the run. Retrieval is not a guarantee that the response came from an uncached origin server; available cache metadata is retained. Seller availability is not independently confirmed or reserved warehouse stock. Source failures stop the report rather than substitute old snapshots.

Supplier codes are not independently corroborated manufacturer ordering codes. The API price is its unit_price field; the unit of measure may be unknown. Verify purchase terms and availability with the seller before ordering. This service supplies information and makes no purchases.

### Agent integration

Use Apify's standard Actor run API or its MCP tools, supplying this Actor and the input above. Read the resulting dataset or the existing run's key-value files. A retry to retrieve a completed report should reuse its run ID rather than start a new comparison.

Owner/development tests are excluded from customer sales, repeat-customer counts, earnings and profit.

Requests across hosted runs share one durable supplier lane, with at least two seconds between dispatches and an earliest grant cadence of three seconds. Every attempted request logs sanitized status and latency. A rate-limit response stops the report before its fee and applies a shared cooldown. Interrupted attempts are reconciled only when non-dispatch or source settlement is established; unknown outcomes stay held for review. Recovery records are encrypted and excluded from report files.

A 100-code report normally needs at least five minutes under shared pacing; the default timeout is ten minutes. During overlapping demand or supplier failures, a run may stop without a report fee. This pilot provides a complete report only when every requested code and delivery check succeeds.

# Actor input Schema

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

Current supplier API lookup only; no historical fallback.

## `product_codes` (type: `array`):

One to 100 exact AutomationDirect supplier product codes to retrieve.

## `limit` (type: `integer`):

Maximum returned observations; must cover all requested codes.

## Actor input object example

```json
{
  "mode": "current",
  "product_codes": [
    "C0-00DD2-D",
    "C0-00DR-D",
    "C0-00DD1-D",
    "DW-AD-711-M8"
  ],
  "limit": 100
}
```

# Actor output Schema

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

No description

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

No description

## `csv` (type: `string`):

No description

## `receipt` (type: `string`):

No description

# 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 = {
    "product_codes": [
        "C0-00DD2-D",
        "C0-00DR-D",
        "C0-00DD1-D",
        "DW-AD-711-M8"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("dharris289/current-inventory-search").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 = { "product_codes": [
        "C0-00DD2-D",
        "C0-00DR-D",
        "C0-00DD1-D",
        "DW-AD-711-M8",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("dharris289/current-inventory-search").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 '{
  "product_codes": [
    "C0-00DD2-D",
    "C0-00DR-D",
    "C0-00DD1-D",
    "DW-AD-711-M8"
  ]
}' |
apify call dharris289/current-inventory-search --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,dharris289/current-inventory-search"
        }
    }
}
```

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/4bIePPU2ig5oVTVD5/builds/2ONQqln7BoWeK5rrc/openapi.json
