# AptRoute - AI Tool Finder, MCP & Agent Workflow Router (`actoracting/aptroute-ai-tool-router`) Actor

Find Apify and MCP capabilities for a task, compare constraints, or use TxSivor for offline EVM preflight risk rules. No tool execution or transaction signing.

- **URL**: https://apify.com/actoracting/aptroute-ai-tool-router.md
- **Developed by:** [Actor Acting](https://apify.com/actoracting) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $100.00 / 1,000 ai-tool recommendations

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

## AptRoute V2 — tool discovery and agent workflow gap analysis

**The right tool for every task—without pretending that a marketplace listing proves compatibility.**

AptRoute accepts a plain-language automation goal and searches public Apify Store and MCP Registry metadata to return ranked *candidate* tools, source links, possible workflow gaps and careful next-step checks. It does not run, authorise or install suggested tools. The distinct TxSivor mode applies offline deterministic EVM rules to **unsigned** transaction fields and does not certify safety, transact or sign.

### Start here

**Read [`START_HERE_V2.md`](START_HERE_V2.md) and [`docs/V2_DEPLOYMENT.md`](docs/V2_DEPLOYMENT.md) first.** Source package is a V2 **beta** prepared from the owner's actual uploaded V1.1 discovery backend (which had `version: "1.1.0"` inside a V1.0 source package). It is not yet deployed.

### Surfaces

| Surface | Files | Billing |
|---|---|---|
| Apify Actor | `.actor/`, `src/actor.mjs`, `src/core.mjs`, `src/txsivor.mjs`, `.actor/dataset_schema.json` | Original Apify custom pay-per-event charging preserved |
| Cloudflare API Worker | `src/worker.mjs`, `wrangler.jsonc` | Limited free preview, separately gated x402 paid API on **Base Sepolia testnet** |
| Landing page | `public/` | Public static site; limited preview is free |
| Postman | `platforms/postman-collection.json` | Free public preview only |
| RapidAPI adapter (optional) | `src/rapidapi-bridge.mjs`, `wrangler.rapidapi.json` | Requires a separate billing-plan setup and proxy authentication; not deployed |

### Test

```bash
npm ci
npm test
npm run check:syntax
```

### Discover example

```json
{"mode":"discover","intent":"Find tools to monitor online product prices, detect changes and send alerts","max_results":5}
```

Output: version 2.0.0, candidates with metadata evidence and provider links, catalog status, capability coverage, four-stage review-to-run workflow, and disclosures. A no-match result is intentionally uncharged on the Apify Actor.

### TxSivor example

```json
{"mode":"txsivor","chain_id":8453,"expected_chain_id":8453,"to":"0x1111111111111111111111111111111111111111","value_wei":"0","data":"0x"}
```

### Security / accuracy

Tool matches are **not proof of correct functioning, availability, permission scope, security or price**. The code rejects fields intended for private credentials. Never enter private keys, seed phrases or private business records. Hosted MCP access is through Apify; this repository does not include its own independently registered MCP server.

Read [`docs/V2_LIMITATIONS_AND_TESTING.md`](docs/V2_LIMITATIONS_AND_TESTING.md) before publicly claiming accuracy or eligibility for agentic payments.

# Actor input Schema

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

Choose Discover to find matching tools, or TxSivor to assess an unsigned EVM transaction using offline rules.

## `intent` (type: `string`):

Describe the task (8 to 500 characters). Do not include passwords, keys, seed phrases or other secrets. Used in Discover mode.

## `max_results` (type: `integer`):

Maximum number of ranked tool suggestions to return (1 to 12). Used in Discover mode.

## `budget_usd` (type: `number`):

Optional upper budget limit in USD for third-party tools (0 to 1000000). Prices may be unknown; results are not purchase quotations.

## `agent_only` (type: `boolean`):

Prefer tools suitable for automation and AI agent integrations. Used in Discover mode.

## `free_only` (type: `boolean`):

Return only catalog entries explicitly marked free, excluding unverified or unknown prices. Used in Discover mode.

## `chain_id` (type: `integer`):

EVM chain ID of the unsigned transaction being examined, for example 8453 for Base mainnet. Used in TxSivor mode.

## `expected_chain_id` (type: `integer`):

Optional expected EVM chain ID; a mismatch triggers a blocking flag. Used in TxSivor mode.

## `from` (type: `string`):

Optional public sender address (0x...). Never enter a private key. Used in TxSivor mode.

## `to` (type: `string`):

Public recipient or contract address (0x...) for the unsigned transaction. Used in TxSivor mode.

## `value_wei` (type: `string`):

Native coin amount in wei as a base-10 integer string (for example 0). Never use floating-point numbers.

## `max_expected_value_wei` (type: `string`):

Optional ceiling on native coin amount in wei, represented as a base-10 integer string.

## `data` (type: `string`):

Unsigned EVM transaction calldata in 0x-prefixed hexadecimal (0x for no calldata). Never submit signatures or keys.

## Actor input object example

```json
{
  "mode": "discover",
  "intent": "Find an MCP or Apify tool for extracting e-commerce prices",
  "max_results": 5,
  "agent_only": false,
  "free_only": false
}
```

# Actor output Schema

## `results` (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 = {
    "intent": "Find an MCP or Apify tool for extracting e-commerce prices"
};

// Run the Actor and wait for it to finish
const run = await client.actor("actoracting/aptroute-ai-tool-router").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 = { "intent": "Find an MCP or Apify tool for extracting e-commerce prices" }

# Run the Actor and wait for it to finish
run = client.actor("actoracting/aptroute-ai-tool-router").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 '{
  "intent": "Find an MCP or Apify tool for extracting e-commerce prices"
}' |
apify call actoracting/aptroute-ai-tool-router --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,actoracting/aptroute-ai-tool-router"
        }
    }
}
```

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/ggclCkIcFSPdflDfR/builds/kFOuBzHRdUcQlg57y/openapi.json
