# FlowMint JSON Repair (`yummy_cormorant/flowmint`) Actor

Repair malformed JSON into valid JSON. Returns the repaired JSON text, parsed value, and a changed flag. Designed for reliable automated workflows with no LLM, proxy, or external API keys required.

- **URL**: https://apify.com/yummy\_cormorant/flowmint.md
- **Developed by:** [Taras](https://apify.com/yummy_cormorant) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 1,000 json repairs

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

## FlowMint JSON Repair

Repair one malformed JSON document per run using deterministic CPU processing. No LLM, proxy, URL fetching or external API is used.

### Input

```json
{"operation":"json-repair","payload":{"text":"{hello: \"world\",}"}}
```

Only `json-repair` is supported. `payload.text` contains a single document (object, array or scalar), not a batch. Serialized payload limit:128KiB; worker deadline:5 seconds. Unsupported or overly complex input fails. Repair restores syntax; ambiguous input can have multiple interpretations. Check the result before relying on its meaning.

### Output

Canonical key-value record `OUTPUT` and one default-dataset record:

```json
{"operation":"json-repair","result":{"text":"{\"hello\": \"world\"}","value":{"hello":"world"},"changed":true}}
```

`result.text` is valid JSON text; `result.value` is its parsed value. Customers can run through Apify Console or API without contacting the creator. Results remain in their run storage; avoid submitting secrets or data you cannot process on Apify.

### Pricing

Prepared PPE configuration: one `repair` event at $0.003 plus automatic `apify-actor-start` at $0.00005. A successful one-document run costs $0.00305. Platform usage is included. Dataset output has no additional event charge. Actual activated pricing is shown by Apify; this candidate is not yet published.

Invalid input may still incur the platform start fee. Insufficient repair budget returns an error without successful output. Set maximum run charge to at least $0.00305. No additional repair is attempted when an event limit is reached.

### Failures and repeated runs

Each new run is a new order. A completed same-run restart does not charge or append again. If a run stops during charging or output delivery, automatic recharge is disabled; use the run ID when reporting an issue. A charge can succeed before storage delivery fails; this requires billing reconciliation, not a blind retry. An available OUTPUT may be usable even if dataset delivery failed.

Report defects through the Actor Issues tab with run ID and a non-sensitive description. Never include API tokens, private credentials or confidential input. No bespoke integrations or uptime SLA are offered; platform support obligations still apply.

# Actor input Schema

## `operation` (type: `string`):

Repair JSON. This Actor supports only this operation.

## `payload` (type: `object`):

Provide exactly one malformed JSON document in the text field.

## Actor input object example

```json
{
  "operation": "json-repair",
  "payload": {
    "text": "{hello: \"world\",}"
  }
}
```

# Actor output Schema

## `result` (type: `string`):

No description

## `dataset` (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 = {
    "operation": "json-repair",
    "payload": {
        "text": "{hello: \"world\",}"
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("yummy_cormorant/flowmint").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 = {
    "operation": "json-repair",
    "payload": { "text": "{hello: \"world\",}" },
}

# Run the Actor and wait for it to finish
run = client.actor("yummy_cormorant/flowmint").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 '{
  "operation": "json-repair",
  "payload": {
    "text": "{hello: \\"world\\",}"
  }
}' |
apify call yummy_cormorant/flowmint --silent --output-dataset

```

## MCP server setup

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

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/9x78Rd9XJy3Iz9ZmN/builds/DUxcY6xcUuhGFSaJr/openapi.json
