# Reverse Engineer Anything (REA) — Hidden API & Schema Extractor (`kuroxreal/reverse-engineer-anything`) Actor

Deep reverse-engineering of target web platform: extracts hidden internal REST/GraphQL endpoints, hydration state (**NEXT_DATA**, Redux, JSON-LD), auto-generates OpenAPI 3.1 spec and zero-scrape Python/cURL bypass code.

- **URL**: https://apify.com/kuroxreal/reverse-engineer-anything.md
- **Developed by:** [AK | Kurox](https://apify.com/kuroxreal) (community)
- **Categories:** AI, Agents
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$50.00 / 1,000 reverse engineer anything (rea) targets

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

## ⚡ AgentFuel402 — Consumable B2B, E-Commerce & Developer Data Factory

[![Edge Status](https://img.shields.io/badge/Cloudflare_Edge-0ms_Cold_Start-F38020?logo=cloudflare)](https://agentfuel402.ak10082247.workers.dev/health)
[![Protocol](https://img.shields.io/badge/x402_V2-Base_%26_Solana_USDC-0052FF)](https://agentfuel402.ak10082247.workers.dev/.well-known/x402.json)
[![Apify Store](https://img.shields.io/badge/Apify_Store-Pay--Per--Event-00A65A?logo=apify)](https://apify.com/kuroxreal)
[![MCP Protocol](https://img.shields.io/badge/MCP-JSON--RPC_2.0-8B5CF6)](https://agentfuel402.ak10082247.workers.dev/mcp)
[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](LICENSE)

> **High-frequency, non-cacheable consumable data feeds for autonomous AI agents, sales outreach automation (Clay, n8n, Make.com), e-commerce intelligence, and developer LLM workflows.**

AgentFuel402 delivers enterprise consumable data across 3 distinct distribution rails:

1. **Apify Store:** Micro-fiat Pay-Per-Event (PPE) with zero monthly fees.
2. **Cloudflare Edge x402:** Dual-chain machine-to-machine micropayments (Base & Solana USDC).
3. **Official MCP Registry:** Streamable HTTP Model Context Protocol tools for Claude Desktop, Cursor, and LangChain.

***

### 🛡️ "Verify -> Fetch -> Settle" Resilience Guarantee

AgentFuel402 guarantees that **buyers are never charged for dead links or upstream failures**:

1. When a paid request arrives, the cryptographic authorization or Pay-Per-Event token is **pre-verified** (`/verify`).
2. The target content engine executes live data extraction with multi-tier anti-bot fallbacks.
3. If an upstream target returns HTTP 404, empty content, or fails to respond, the engine immediately halts and returns `HTTP 422 Unprocessable Entity` with `charged: false`.
4. On-chain settlement (`/settle`) or PPE charging (`Actor.charge`) occurs **ONLY AFTER** valid, non-empty data is confirmed.

***

### 🚀 Live Endpoints & Pricing Matrix

| Feed Endpoint | Price Tier (x402 USDC) | Apify PPE Event | Primary Use Case |
| :--- | :---: | :---: | :--- |
| **`/v1/fuel/b2b-intent-leads`** | **`$0.010 USDC`** | **`$0.030 USD`** (`lead-signal-fetch`) | Aggregates early-stage tech company product launches, founder discussion threads, hiring alerts, and tech stacks with Intent Scores (30–100). |
| **`/v1/fuel/llm-clean-markdown`** | **`$0.005 USDC`** | **`$0.015 USD`** (`clean-markdown-fetch`) | Strips noisy JavaScript, ads, and navigation; normalizes HTML to clean Markdown; enforces SSRF protection and deterministic prompt-injection defense. |
| **`/v1/fuel/ecom-price-stock`** | **`$0.005 USDC`** | **`$0.015 USD`** (`ecom-product-check`) | Real-time price, currency, SKU variants, discount deltas, and in-stock inventory monitoring for Shopify & Schema.org products. |
| **`/v1/fuel/sdk-live-spec`** | **`$0.005 USDC`** | **`$0.010 USD`** (`sdk-spec-check`) | Verified PyPI & npm metadata, latest stable SemVer releases, deprecation notices, and breaking-change alerts for AI code generators. |
| **`/v1/fuel/reverse-engineer`** | **`$0.020 USDC`** | **`$0.050 USD`** (`reverse-engineer-target`) | **Reverse Engineer Anything (REA):** Deep reverse-engineering of target web platforms: extracts hidden internal REST/GraphQL endpoints, hydration state (`__NEXT_DATA__`, Redux, JSON-LD), auto-generates OpenAPI 3.1 spec and zero-scrape Python/cURL bypass code. |

***

### 🤖 Official MCP Registry Integration

AgentFuel402 is registered in the official Model Context Protocol Registry as **`io.github.ak10082247-max/agentfuel402`**.

#### Cursor & Claude Desktop Config (`claude_desktop_config.json`)

```json
{
  "mcpServers": {
    "agentfuel402": {
      "url": "https://agentfuel402.ak10082247.workers.dev/mcp",
      "transport": "http"
    }
  }
}
```

#### Supported MCP Tools

- `fuel_b2b_leads`: `{ "limit": 10, "category": "all" }`
- `fuel_clean_markdown`: `{ "url": "https://news.ycombinator.com", "strip_images": false }`
- `fuel_ecom_price_stock`: `{ "url": "https://shop.allbirds.com/products/mens-tree-runners" }`
- `fuel_sdk_spec`: `{ "package": "fastapi", "ecosystem": "pypi" }`
- `fuel_reverse_engineer`: `{ "url": "https://sample-store.com/catalog" }`

***

### 🔍 Reverse Engineer Anything (REA) Engine

Inspired by developer reverse-engineering workflows (such as `morluto/rea`), the **AgentFuel402 REA Engine** provides cloud-hosted, zero-installation reverse engineering for arbitrary web applications:

1. **Hydration Unmasking:** Extracts `__NEXT_DATA__`, Nuxt state, Redux stores, and Schema.org JSON-LD before DOM rendering.
2. **Hidden API Discovery:** Unmasks unannounced internal `/api/v[0-9]/` and `/graphql` routes from frontend JavaScript bundles.
3. **OpenAPI 3.1.0 Synthesis:** Automatically generates formal OpenAPI specs with paths, parameters, and payload schemas.
4. **Zero-Scrape Client Code:** Produces instant copy-pasteable Python (`httpx`), TypeScript (`fetch`), and `cURL` code targeting the backend directly—bypassing anti-bot blocks and fragile HTML scraping.

***

### 🛠️ Multi-Chain Micropayment Rails (x402 V2)

All paid routes support HTTP `402 Payment Required` with gasless facilitators:

- **Base Mainnet (`eip155:8453`)**: Circle USDC `0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913` via EIP-712 `TransferWithAuthorization` to Merchant `0x80E0Ae84679b7f11bE171DaADd492FBECf628cd6`.
- **Solana Mainnet (`solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp`)**: SPL USDC `EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v` to Merchant ATA `DD3A7jaXFeHcif9eYj6Vhomuxypat5Yxi8ow6wxz27yL` (sponsored by PayAI `feePayer`).

#### 🎟️ Agency Pass Prepay ($5.00 USD)

Call `POST /v1/pass/prepay` with $5.00 USDC to activate an `X-Fuel-Session` session token valid for **1,000 cross-feed calls** with zero per-request transaction signing.

***

### 📦 Apify Pay-Per-Event (PPE) Store Actors

1. [**B2B Intent Leads (`kuroxreal/b2b-intent-leads-ppe`)**](https://apify.com/kuroxreal/b2b-intent-leads-ppe): High-frequency buying intent signals for Clay, n8n & AI SDRs.
2. [**LLM Clean Markdown (`kuroxreal/llm-clean-markdown-ppe`)**](https://apify.com/kuroxreal/llm-clean-markdown-ppe): Token-optimized, ad-free web content extractor with prompt injection defense.
3. [**E-Commerce Price & Stock (`kuroxreal/ecom-price-stock-ppe`)**](https://apify.com/kuroxreal/ecom-price-stock-ppe): Real-time Shopify & Schema.org price, variant, and stock monitor.
4. [**Pulse402 Oracle (`kuroxreal/pulse402-oracle`)**](https://apify.com/kuroxreal/pulse402-oracle): High-frequency Base DEX liquidity & Polymarket odds alpha.

***

### 📑 License

MIT License. Built for autonomous AI agents and modern data automation pipelines.

# Actor input Schema

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

Select data feed engine to execute

## `url` (type: `string`):

Target webpage or product URL for Markdown or E-Commerce extraction

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

Maximum number of B2B lead signals to return

## `category` (type: `string`):

Filter leads by industry / category

## Actor input object example

```json
{
  "mode": "b2b-intent-leads",
  "url": "https://news.ycombinator.com",
  "limit": 10,
  "category": "all"
}
```

# Actor output Schema

## `dataset` (type: `string`):

Dataset containing all acquired lead signals, clean Markdown, or e-commerce records

# 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("kuroxreal/reverse-engineer-anything").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("kuroxreal/reverse-engineer-anything").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 kuroxreal/reverse-engineer-anything --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,kuroxreal/reverse-engineer-anything"
        }
    }
}
```

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/uOQ4jLOToRTwe10G1/builds/gbOLzWP5MZASgLZ2L/openapi.json
