# LatAm Fintech Synthetic Data Generator (`active_yardstick/latam-synth`) Actor

Generate privacy-safe synthetic users, savings goals & transactions calibrated on 506K real records from a production LatAm savings app (2015–2024). Multimodal amounts, real seasonality, reproducible by seed

- **URL**: https://apify.com/active\_yardstick/latam-synth.md
- **Developed by:** [Joel Mendoza](https://apify.com/active_yardstick) (community)
- **Categories:** Developer tools, AI
- **Stats:** 2 total users, 0 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

from $0.25 / 1,000 synthetic user generateds

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?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## LatAm Synth — Synthetic Financial Savings Data Generator

Generate realistic synthetic test data for fintech applications, calibrated on 506,311 real LatAm records (2015–2024). Use it to generate synthetic datasets for ML training, mock financial transactions for integration testing, realistic fake user data for testing pipelines, or seed data for fintech development — all with full referential integrity, 100% synthetic, zero PII.

Each run produces linked users, savings goals, and deposit/withdrawal transactions that behave statistically like real Latin American savings-app data.

### What you get

Each run produces three linked tables of synthetic dataset output:

| Table | Description |
|---|---|
| `users` | Synthetic users with country, scores, join date |
| `goals` | Savings goals with category, required amount, status (achieved / overdue / in\_progress) |
| `transactions` | Mock financial transactions — deposits and withdrawals within each goal's time window |

**Calibrated against real data:** lognormal mixture distributions (KS=0.032), 69.5% round-value snap, 73.8% overdue rate, monthly seasonality, 8 goal categories with realistic amounts and horizons. Suitable as a synthetic dataset for ML training or as realistic fake user data for testing any fintech system.

### Pricing — Pay Per Event

This actor uses Apify's **Pay Per Event** model. You are charged per **synthetic user generated**, regardless of output format or destination.

| Event | Unit | What triggers it |
|---|---|---|
| `users-generated` | per user | Each run, before data is written |

**Example:** generating 1,000 users = 1,000 × unit price.

The charge fires before output is written, so it applies equally whether you use CSV files, JSON, or the Dataset export — there is no cheaper path. If your spending limit is reached mid-run, the actor stops cleanly and reports the limit in the log.

Set your spending cap in **Apify Console → Run → Max total charge** before starting a run.

### Input parameters

| Parameter | Type | Default | Description |
|---|---|---|---|
| `users` | integer | 1000 | Number of synthetic users (1–50,000) |
| `seed` | integer | null | Random seed for reproducibility. Same seed → identical output |
| `countries` | string\[] | null | Restrict to specific countries. Empty = full LatAm mix (Mexico 46.6%, Colombia 14.4%, …) |
| `format` | csv | json | csv | Output format for Key-value store files |
| `push_to_dataset` | boolean | true | Push transactions to Apify Dataset (enables native JSON/CSV/Excel export and integrations) |
| `start_date` | string | 2023-01-01 | Start of generation period (YYYY-MM-DD) |
| `end_date` | string | 2024-12-31 | End of generation period (YYYY-MM-DD) |

### Where to find your output

Every run writes to **two places**:

#### Key-value store — all three tables

1. Open the run → **Storage** tab → **Key-value store**
2. Download files:
   - `users.csv` / `goals.csv` / `transactions.csv` (CSV mode)
   - `OUTPUT_DATA` — single JSON with all three tables (JSON mode)
   - `OUTPUT` — always present; JSON summary of the run (parameters, row counts, file list)

#### Dataset — transactions (Apify-native export)

When `push_to_dataset=true` (default), all transactions appear in the run's **Dataset** tab:

- Export as **JSON, CSV, or Excel** in one click
- Connect **Google Sheets**, webhooks, or any Apify integration
- Disable with `push_to_dataset=false` for runs > 10K users where you only need the KVS files

### Use cases

- **Fintech testing & QA** — realistic fixtures for payment pipelines, budget apps, savings engines
- **ML training data** — bootstrap churn, recommendation, and segmentation models with real LatAm patterns
- **Demos & POCs** — dashboards with publicly shareable synthetic data
- **Education** — unlimited datasets for data science courses with real business narrative

### For AI agents

This actor is designed to be invoked programmatically. Minimum input to generate synthetic test data:

```json
{
  "users": 500,
  "seed": 42
}
```

Full input with all options:

```json
{
  "users": 1000,
  "seed": 42,
  "countries": ["Mexico", "Colombia"],
  "format": "csv",
  "push_to_dataset": true,
  "start_date": "2023-01-01",
  "end_date": "2024-12-31"
}
```

**Reading the output after the run completes:**

- **Dataset items** (transactions): `GET {run.defaultDatasetId}/items` — paginated JSON, directly iterable.
- **CSV files** (users, goals, transactions): `GET {run.defaultKeyValueStoreId}/records/users.csv`, `.../goals.csv`, `.../transactions.csv`.
- **Run summary** (row counts, parameter echo): `GET {run.defaultKeyValueStoreId}/records/OUTPUT` — JSON, always present.

The `seed` parameter guarantees deterministic output: the same seed always produces the same rows, useful for reproducible test fixtures. Omit `seed` for a random run.

### Privacy & compliance

Output is 100% synthetic — no record derives from a real individual. No PII, no re-identification risk. GDPR / LGPD / CCPA / LFPDPPP non-applicable.

<details>
<summary><strong>Ficha Técnica de Privacidad completa (haz clic para expandir)</strong></summary>

**Versión:** 0.2.0 · **Fecha:** 2026-06-12 · **Clasificación:** Pública

***

#### 1. Naturaleza del output

LatAm Synth produce **datos 100% sintéticos**. Ningún registro del archivo de salida corresponde a, ni puede ser revertido a, un individuo real. El output es un conjunto de datos estadísticamente plausible generado por un modelo probabilístico; no es un subconjunto, anonimización ni seudonimización de datos reales.

***

#### 2. Ausencia de PII y riesgo de re-identificación

El output no contiene:

| Campo | Presente en output | Nota |
|---|---|---|
| Nombre, apellido | No | Sustituido por ID UUID aleatorio |
| Email, teléfono | No | No se genera |
| Dirección, ubicación GPS | No | Solo país, de distribución agregada |
| Fecha de nacimiento | No | No se genera |
| Número de documento | No | No se genera |
| Información financiera real | No | Montos son sintéticos del modelo |
| IP, device ID | No | No se genera |

El campo `user_id` es un UUID v4 generado en tiempo de ejecución. No existe una tabla de correspondencia con personas reales porque esa tabla no existe: los usuarios sintéticos no tienen contrapartes reales.

El riesgo de re-identificación es **nulo** por construcción: el modelo no dispone de información individual en ninguna etapa del pipeline.

***

#### 3. Metodología de calibración: qué se usó y qué no

**Dataset fuente:** La calibración se realizó sobre un dataset privado de **506,311 registros** de transacciones de una aplicación de ahorro LatAm (2015-2024). Este dataset nunca se distribuye con el producto, no se almacena en el entorno de producción, y se usó exclusivamente como fuente estadística en un proceso offline descartado tras la extracción de parámetros.

**Qué se extrajo:** únicamente estadísticas agregadas — percentiles de distribución de montos, parámetros de mezcla de lognormales, proporciones categóricas, correlaciones de cohorte y estacionalidad. **Ningún registro individual** del dataset fuente está codificado, implícito ni recuperable a partir de estos parámetros.

**Garantía matemática:** Las distribuciones paramétricas y los procesos de punto son modelos de la *forma* de los datos, no memorias de los datos. La capacidad de recuperar registros individuales a partir de los parámetros es matemáticamente equivalente a recuperarlos desde los momentos de una distribución — imposible en ausencia del dataset original.

***

#### 4. Proceso de generación

```
calibration_params.json  (parámetros agregados)
         │
         ▼
  SyntheticGenerator(seed)
         │
         ├─ Usuarios: cópula gaussiana sobre distribuciones marginales
         ├─ Metas: muestreo de categorías, montos y horizontes calibrados
         └─ Transacciones: proceso de punto con intensidad decreciente,
            montos de mezcla de lognormales + snap a valores redondos
         │
         ▼
  Output: users.csv, goals.csv, transactions.csv
```

El proceso es **determinista dado un seed**: el mismo seed produce el mismo output byte a byte.

***

#### 5. Marco regulatorio aplicable

| Regulación | Aplica al output | Fundamento |
|---|---|---|
| GDPR (UE) | **No aplica** | El output no contiene datos de personas físicas identificadas o identificables (Art. 4.1 GDPR) |
| LGPD (Brasil) | **No aplica** | Sin dados pessoais (Art. 5.I LGPD) |
| CCPA (California) | **No aplica** | Sin "personal information" de consumidores de California |
| LFPDPPP (México) | **No aplica** | Sin datos personales (Art. 3.V LFPDPPP) |
| LOPD (España/Colombia) | **No aplica** | Sin datos de personas físicas identificadas |

***

#### 6. Recomendaciones para el área de Compliance del comprador

1. **No se requiere DPA:** LatAm Synth no procesa datos personales del comprador ni de terceros.
2. **No se requiere consentimiento de usuarios finales:** los datos de salida no corresponden a personas reales; no hay sujetos de datos cuyos derechos ARCO/ARCOPLUS gestionar.
3. **Uso recomendado:** desarrollo y prueba de modelos de ML, benchmarking de sistemas financieros, datos de demostración para pre-producción, investigación académica.
4. **Uso no recomendado:** no debe usarse como sustituto de datos reales en decisiones financieras individuales (scoring crediticio, underwriting) sin validación adicional.
5. **Auditoría:** los parámetros de calibración son públicamente inspeccionables. Cualquier auditor técnico puede verificar que el pipeline no contiene rutas de acceso a datos reales.

</details>

# Actor input Schema

## `users` (type: `integer`):

How many synthetic users to generate. Each user gets 0–N saving goals and transactions.

## `seed` (type: `integer`):

Integer seed for full reproducibility. Leave empty for a random run.

## `countries` (type: `array`):

Restrict output to specific countries. Leave empty to use the calibrated LatAm mix (Mexico 46.6%, Colombia 14.4%, Argentina 9.1%, …). Valid values: Mexico, Colombia, Argentina, USA, Spain, Peru, Chile, Ecuador, Dominican Republic, Costa Rica, Panama, Uruguay.

## `format` (type: `string`):

File format for the output stored in the key-value store.

## `start_date` (type: `string`):

Start of the generation period (YYYY-MM-DD).

## `end_date` (type: `string`):

End of the generation period (YYYY-MM-DD).

## `push_to_dataset` (type: `boolean`):

When enabled (default), all generated transactions are pushed to the run's default Dataset so you can export them as JSON/CSV/Excel from the Dataset tab or connect Apify integrations. Disable for very large runs (>10K users) if you only need the CSV files from the Key-value store.

## Actor input object example

```json
{
  "users": 1000,
  "format": "csv",
  "start_date": "2023-01-01",
  "end_date": "2024-12-31",
  "push_to_dataset": true
}
```

# Actor output Schema

## `transactions_dataset` (type: `string`):

No description

## `run_summary` (type: `string`):

No description

## `users_csv` (type: `string`):

No description

## `goals_csv` (type: `string`):

No description

## `transactions_csv` (type: `string`):

No description

## `all_kvs_files` (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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("active_yardstick/latam-synth").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("active_yardstick/latam-synth").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 active_yardstick/latam-synth --silent --output-dataset

```

## MCP server setup

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

```

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/Tu5meXYDyDS4g5MOA/builds/geHimxXR1Kr6A8yaf/openapi.json
