# DMAI Localization JSON Integrity Check (`dmai/dmai-localization-json-integrity-check`) Actor

Compare source and target localization JSON for missing or extra keys, value-type changes, and brace-placeholder mismatches. Returns a machine-readable defect report. No translation-quality scoring or rewriting.

- **URL**: https://apify.com/dmai/dmai-localization-json-integrity-check.md
- **Developed by:** [Eric Gordon](https://apify.com/dmai) (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 completed integrity reports

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

## DMAI Localization JSON Integrity Check

Catch structural defects before a localization release. Paste source and target JSON text and receive one machine-readable report automatically.

### What it checks

- Missing and extra JSON paths, including nested objects and array indices.
- Value type changes, including boolean versus number.
- Counts of simple `{identifier}` placeholders in corresponding strings, including repeated placeholders.

It does not judge translation quality or rewrite either input. ICU MessageFormat and doubled-brace syntax are rejected. Arrays are compared by index. Placeholder names start with a letter or underscore and may then contain letters, digits, underscores, dots, or hyphens. Other placeholder conventions are outside scope.

### Input

`sourceJson` and `targetJson` are JSON text strings containing root objects. Paste into the form or send them in a JSON API request. No remote URLs or additional fields are accepted.

Limits per document: 2 MiB of UTF-8 JSON text, 5,000 string values, 20,000 nodes, depth 64, and JSON pointer length 1,024 characters. Duplicate object keys and non-finite numbers are rejected.

Example source: `{"welcome":"Hello {name}","save":"Save"}`

Example target: `{"welcome":"Bonjour {user}","extra":"Extra"}`

This pair returns three defects: missing `/save`, extra `/extra`, and a placeholder mismatch at `/welcome`.

### Output and delivery

A completed run writes the JSON report to the REPORT record in its default key-value store and exactly one copy to its default dataset. Access REPORT in Storage or use the Report JSON output URL. The dataset API also exposes the report. Fields: `schemaVersion`, `status`, `summary`, `issues`, `truncated`, and `scope`. `summary` contains total issue counts by kind, node counts and string counts. Each issue has a `kind` and RFC 6901 JSON-pointer `path`; type and placeholder mismatches include their compared metadata. Original string values are not included in the report. Input remains in your Apify run storage according to platform retention; this tool is not a zero-retention service.

The first 5,000 defects are listed deterministically. `summary.issueCount` covers all detected defects and `truncated` tells you if details were capped. A `no_issues_found` result means only that the declared checks found no defects.

### Price

Proposed launch price: $0.10 per completed report, plus the disclosed $0.00005 Actor-start event per GB of memory (minimum one event). The Store pricing panel is authoritative once monetization is activated. Invalid or unsupported input fails without writing a report; a start charge may still apply.

### Status and troubleshooting

Run status is available in Apify Console and the API. Invalid input produces a short failure reason. Fix that reason and submit a new run. Inspect `truncated` before using results for release decisions. A detected defect is a successful report, not a failed run. Billing questions and refund requests follow Apify's billing/support process; refunds are not promised automatically. Platform issues can be reported using the Actor Issues tab. Maintenance and exception handling remain publisher responsibilities.

# Actor input Schema

## `sourceJson` (type: `string`):

Paste an entire JSON object as text. Maximum 2 MiB, 5000 string values, 20000 nodes, depth 64, JSON pointer length 1024. Simple {identifier} placeholders only; ICU and doubled braces rejected.

## `targetJson` (type: `string`):

Paste an entire JSON object as text. Maximum 2 MiB, 5000 string values, 20000 nodes, depth 64, JSON pointer length 1024. Simple {identifier} placeholders only; ICU and doubled braces rejected.

## Actor input object example

```json
{
  "sourceJson": "{\"welcome\":\"Hello {name}\",\"save\":\"Save\"}",
  "targetJson": "{\"welcome\":\"Bonjour {user}\",\"extra\":\"Extra\"}"
}
```

# Actor output Schema

## `report` (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 = {
    "sourceJson": "{\"welcome\":\"Hello {name}\",\"save\":\"Save\"}",
    "targetJson": "{\"welcome\":\"Bonjour {user}\",\"extra\":\"Extra\"}"
};

// Run the Actor and wait for it to finish
const run = await client.actor("dmai/dmai-localization-json-integrity-check").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 = {
    "sourceJson": "{\"welcome\":\"Hello {name}\",\"save\":\"Save\"}",
    "targetJson": "{\"welcome\":\"Bonjour {user}\",\"extra\":\"Extra\"}",
}

# Run the Actor and wait for it to finish
run = client.actor("dmai/dmai-localization-json-integrity-check").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 '{
  "sourceJson": "{\\"welcome\\":\\"Hello {name}\\",\\"save\\":\\"Save\\"}",
  "targetJson": "{\\"welcome\\":\\"Bonjour {user}\\",\\"extra\\":\\"Extra\\"}"
}' |
apify call dmai/dmai-localization-json-integrity-check --silent --output-dataset

```

## MCP server setup

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

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/wY5fLXnXHDmEq7TMR/builds/9obzmUXzL2qryiPm3/openapi.json
