# Spot Missing or Bad Ship Fuel Meter Readings (FuelEU Check) (`recoupiq/fueleu-maritime-meter-and-gap-verifier`) Actor

Compares ship fuel meter numbers against engine power to spot stuck meters or fuel bypasses, and locks missing-meter notes against later edits.

- **URL**: https://apify.com/recoupiq/fueleu-maritime-meter-and-gap-verifier.md
- **Developed by:** [Recoup-IQ](https://apify.com/recoupiq) (community)
- **Categories:** Business, Developer tools
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$4.50 / fueleu voyage meter & gap pre-audit

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

## Compare Ship Fuel Meter Readings With Expected Fuel Use (`FuelEU` Pre-Check)

This tool compares two series that you supply: the fuel flow your meter logged and the fuel flow you expected (for example from engine load). It flags the places where the two series do not agree. It also locks gap notes in a hash chain, so a later edit shows.

The tool cannot see a pipe or a meter. A flag tells you that your two series disagree. A person must find the cause.

### What This Tool Checks

1. **Flow against expected flow (`riq_fueleu_meter_guard_ex`):** 16 to 4,096 pairs in `0.1 kg per hr` units. The tolerance is `tolerance_pct` (default `5`). Flags:
   - `0x01`: The flow value almost never changes, but the expected value moves by more than the tolerance (a frozen meter signal).
   - `0x02`: The flow is below the expected value by more than the tolerance, over the whole window or over a run of samples.
   - `0x04`: The flow is above the expected value by more than the tolerance, over the whole window or over a run of samples.
   - `0x08`: The flow repeats a short loop (3 to 16 samples) exactly, and the expected value does not.
2. **Gap note seal (`riq_fueleu_chain_gap_record`):** Locks gap notes into a `BLAKE2b` hash chain. A later text edit changes the chain receipt.

### Test Results (Synthetic Data Only)

We tested the check on synthetic data, not on data from a ship. Tolerance `5 %`, 64 samples, 100 random seeds for each noisy case:

- Healthy series: 0 flags in 100 runs for each noise level of 1 %, 2 %, 3 % and 5 %, and for a short 16-sample window with 2 % noise.
- A steady 9,010 against 9,000 pair and a clean ramp: 0 flags.
- Flow 3 % below expected: not flagged (this is below the tolerance).
- Flow 5 % below expected: flagged in 44 of 100 runs (this is at the tolerance).
- Flow 8 %, 12 % or 18 % below expected: flagged in 100 of 100 runs.
- Frozen meter while the expected value moves: flagged in 100 of 100 runs. A frozen meter at a steady load cannot be seen.
- An 8-sample replay loop: flagged in 100 of 100 runs.
- Set the tolerance above the normal noise of your own data. The test is in `verification/tangential_demands_bench/fuel_guard_test.c`.

### How to Run It

1. Click **Start** with blank `samples` to see a free demo on two synthetic series (no charge).
2. If you have your own data, paste 16 or more pairs into `samples`. A run with your data costs one event.
3. If you have gap notes, paste them into `gap_records`.

### Plain Limits to Know First

- The tool only compares the two series that you supply. The result is only as good as your expected flow values.
- Tests used synthetic data only. We did not test it on ship data or ship pipes.
- This tool gives a pre-check only. It does not replace an accredited FuelEU verifier.
- A trained person must check all flagged trips before you file.

### Onboard Ship Software and Contact

- **Maker:** RecoupIQ Ltd (Company No. `16947526`, 410 High Street, Flat 1, Lincoln, LN5 7TE, United Kingdom)
- **Onboard Ship ByteSDK (£1,450 per year up to 50 ships):** https://recoupiq.github.io/bytesdk/
- **Email:** contact@recoup-iq.tech

# Actor input Schema

## `samples` (type: `array`):

Supply 16 or more meter and engine-fuel pairs ({mfm_flow_d_kgh, sfoc_expected_d_kgh} in 0.1 kg per hr). Leave blank for the sample check.

## `tolerance_pct` (type: `integer`):

The flow may differ from the expected value by this much before a flag shows. From 1 to 50. Default 5. Set it above the normal noise of your data. Tests: 5 % gave 0 false flags on synthetic noise up to 5 % and found flow gaps of 8 % or more.

## `gap_records` (type: `array`):

Ordered list of FuelEU gap notes to lock into a tamper-check hash chain.

## Actor input object example

```json
{
  "tolerance_pct": 5,
  "gap_records": [
    "VOYAGE=EU-RTM-GOT-014|GAP_START=2026-11-13T10:00:00Z|DUR_S=180|SURROGATE=SFOC_MAX_MCR85",
    "VOYAGE=EU-RTM-GOT-014|GAP_START=2026-11-13T14:20:00Z|DUR_S=120|SURROGATE=SFOC_MAX_MCR85"
  ]
}
```

# Actor output Schema

## `dataset_items` (type: `string`):

No description

## `summary_json` (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 = {
    "gap_records": [
        "VOYAGE=EU-RTM-GOT-014|GAP_START=2026-11-13T10:00:00Z|DUR_S=180|SURROGATE=SFOC_MAX_MCR85",
        "VOYAGE=EU-RTM-GOT-014|GAP_START=2026-11-13T14:20:00Z|DUR_S=120|SURROGATE=SFOC_MAX_MCR85"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("recoupiq/fueleu-maritime-meter-and-gap-verifier").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 = { "gap_records": [
        "VOYAGE=EU-RTM-GOT-014|GAP_START=2026-11-13T10:00:00Z|DUR_S=180|SURROGATE=SFOC_MAX_MCR85",
        "VOYAGE=EU-RTM-GOT-014|GAP_START=2026-11-13T14:20:00Z|DUR_S=120|SURROGATE=SFOC_MAX_MCR85",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("recoupiq/fueleu-maritime-meter-and-gap-verifier").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 '{
  "gap_records": [
    "VOYAGE=EU-RTM-GOT-014|GAP_START=2026-11-13T10:00:00Z|DUR_S=180|SURROGATE=SFOC_MAX_MCR85",
    "VOYAGE=EU-RTM-GOT-014|GAP_START=2026-11-13T14:20:00Z|DUR_S=120|SURROGATE=SFOC_MAX_MCR85"
  ]
}' |
apify call recoupiq/fueleu-maritime-meter-and-gap-verifier --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,recoupiq/fueleu-maritime-meter-and-gap-verifier"
        }
    }
}
```

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/wED8Do4pxkk60IAsZ/builds/3qYkdgCrRJSKmYpaK/openapi.json
