# Agent Commerce Kit (`triumphal_marathon_iib/agent-commerce-kit`) Actor

Audit any website for AI-agent commerce readiness. Detect MCP, x402, llms.txt, OpenAPI, crawler permissions and machine-readable pricing, identify monetization opportunities, and generate a ready-to-deploy agent commerce kit.

- **URL**: https://apify.com/triumphal_marathon_iib/agent-commerce-kit.md
- **Developed by:** [Portia H](https://apify.com/triumphal_marathon_iib) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $20.00 / 1,000 commerce scans

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

## Agent Commerce Scanner — x402, MCP & AI Monetization Kit

Audit any public website for **AI-agent commerce readiness**. Detect MCP, x402, `llms.txt`, OpenAPI, AI crawler permissions, machine-readable pricing, licensing signals, and structured data—then identify monetization opportunities and generate a ready-to-deploy agent commerce kit.

Use it for one domain or a batch of domains when you need to answer three questions:

1. **Can AI agents access and understand this site?**
2. **What could an agent plausibly buy from it?**
3. **What infrastructure is missing to make that commerce machine-readable and payable?**

### What this Actor does

#### 1. Commerce scan

Checks public signals including:

- `robots.txt` and common AI crawler rules
- Cloudflare-style `Content-Signal`
- `llms.txt` / `llms-full.txt`
- sitemap availability
- JSON-LD / schema types
- OpenAPI / Swagger discovery
- MCP clues and endpoints
- x402 v2 `402 Payment Required` and `PAYMENT-REQUIRED` signals
- machine-readable pricing
- TDMRep headers and `/.well-known/tdmrep.json`
- common technology signals such as Cloudflare, WordPress, Shopify, PHP, Node, and Next.js

Each scan includes a structured **agent-commerce readiness score** and the evidence behind it.

#### 2. Monetization analysis

Maps plausible machine-purchasable resources such as structured search, datasets, content retrieval, inventory lookup, or API/tool access.

For each opportunity, the Actor can suggest:

- resource type
- endpoint idea
- pay-per-request model
- starting price
- rationale
- confidence level
- recommended launch order

#### 3. Deployment kit

In `full` mode, the Actor generates a downloadable ZIP with starter infrastructure such as:

- `llms.txt`
- `llms-full.txt`
- `robots.txt.patch`
- `.well-known/tdmrep.json`
- `.well-known/agent-commerce.json`
- `openapi.json`
- Node x402 payment sidecar
- Bazaar discovery metadata starter
- WordPress discovery helper
- PHP discovery helper
- deployment README

The kit is a starting point. Connect generated endpoints to your real data, content, service, or tool before production use.

### Input

```json
{
  "domains": [
    "https://example.com",
    "another-site.com"
  ],
  "mode": "full",
  "maxConcurrency": 4,
  "requestTimeoutSecs": 12,
  "generateLlmsFull": true
}
```

#### Modes

- `scan` — technical commerce-readiness audit only
- `analyze` — scan + monetization opportunity map
- `full` — scan + analysis + downloadable deployment kit

### Output

The default dataset contains a separate record for each completed stage:

- `recordType: "scan"`
- `recordType: "analysis"`
- `recordType: "deployment_kit"`
- `recordType: "error"` for inaccessible or invalid targets

For a successful `full` run on one domain, expect three dataset records: scan, analysis, and deployment kit.

Generated ZIP files are stored in the run's default key-value store using flat keys such as:

```text
kit-example.com-agent-commerce-kit.zip
```

### Pricing

This Actor uses **Pay Per Event** pricing:

| Event | Price |
|---|---:|
| Commerce scan | $0.02 |
| Monetization analysis | $0.10 |
| Deployment kit | $0.25 |

A complete `full` run for one successfully processed domain triggers all three product events.

Platform usage is included rather than charged separately.

### Who this is for

Useful for:

- AI-agent and MCP developers
- API and data-product builders
- website owners exploring machine-to-machine monetization
- teams evaluating x402 readiness
- platforms auditing large domain sets for agent accessibility and commerce signals
- developers preparing existing websites for autonomous-agent discovery and payment

### Security behavior

The Actor performs read-only public HTTP requests. It limits response sizes and redirects, rejects localhost/private/reserved IP targets, and re-validates redirected destinations.

It does **not**:

- log in to target sites
- submit forms
- bypass access controls
- scrape private data
- claim that an undocumented service does not exist

### Accuracy notes

Detection is evidence-based. Some websites expose APIs, MCP servers, payment flows, or commercial resources only after authentication or at non-obvious URLs.

Suggested opportunities and prices are starting-point heuristics, not guarantees of demand or profitability. Validate rights, data provenance, customer value, operating cost, and unit economics before deploying generated monetization infrastructure.

### Local development

```bash
npm install
export APIFY_LOCAL_STORAGE_DIR=./storage
npm start
```

When running outside Apify, billing events may not be recorded, but the scan, analysis, and kit-generation logic can still be exercised locally.

# Actor input Schema

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

Public HTTP/HTTPS domains or URLs to scan. One result is produced per domain and per requested output stage.

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

scan = audit only; analyze = audit + monetization map; full = audit + monetization map + downloadable deployment kit.

## `maxConcurrency` (type: `integer`):

Number of domains processed at the same time. Keep this conservative to avoid hammering target sites.

## `requestTimeoutSecs` (type: `integer`):

Timeout for each HTTP request.

## `generateLlmsFull` (type: `boolean`):

Include an llms-full.txt starter template in generated deployment kits.

## Actor input object example

```json
{
  "domains": [
    "https://example.com"
  ],
  "mode": "full",
  "maxConcurrency": 4,
  "requestTimeoutSecs": 12,
  "generateLlmsFull": true
}
```

# Actor output Schema

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

Structured scan, analysis, and kit metadata records.

## `files` (type: `string`):

Generated ZIP deployment kits and run summary files.

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("triumphal_marathon_iib/agent-commerce-kit").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 = {}

# Run the Actor and wait for it to finish
run = client.actor("triumphal_marathon_iib/agent-commerce-kit").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 '{}' |
apify call triumphal_marathon_iib/agent-commerce-kit --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,triumphal_marathon_iib/agent-commerce-kit"
        }
    }
}
```

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/C4thQDm9gN5Say4cp/builds/MRhBbZpB1QgUyx17C/openapi.json
