# CambioKit: Argentina & Brazil data for AI agents (`gleaming_carp/cambiokit`) Actor

Argentina dollar rates (oficial, MEP, CCL, blue, cripto), INDEC inflation, AR/BR holidays and business days, CUIT/CPF/CNPJ validation, CEP lookup, PTAX and SELIC. Clean JSON with source and timestamp. Works as an MCP tool via Apify's MCP server.

- **URL**: https://apify.com/gleaming_carp/cambiokit.md
- **Developed by:** [LatAm Data Tools](https://apify.com/gleaming_carp) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 tool calls

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

## CambioKit — Argentina & Brazil data tools for AI agents

Ten read-only tools that give AI agents clean, sourced JSON about Argentina and Brazil. No third-party API keys (you only need an Apify account). Every response includes `source` (with license/citation) and `fetched_at`; upstream calls are cached and have automatic fallbacks.

> 🇦🇷 Herramientas para agentes de IA: dólar oficial/MEP/CCL/blue/cripto, inflación INDEC, feriados, validación de CUIT/CUIL.
> 🇧🇷 Ferramentas para agentes de IA: PTAX, SELIC, feriados, validação de CPF/CNPJ (inclui CNPJ alfanumérico 2026) e consulta de CEP.

| Tool | What it returns | Source (fallback) |
|---|---|---|
| `ar_dollar_rates` | ARS per USD: oficial, blue, MEP, CCL, cripto, mayorista, tarjeta + BCRA reference | DolarApi (Bluelytics) + BCRA |
| `ar_inflation` | INDEC national CPI: monthly % and YoY %, up to 120 months | datos.gob.ar Series API |
| `holidays` | National holidays AR/BR for a year + next upcoming | ArgentinaDatos / BrasilAPI (Nager.Date) |
| `is_business_day` | Weekend/holiday check for a date in AR/BR | same as above |
| `validate_cuit` | CUIT/CUIL check digit, formatted, entity type | computed locally |
| `validate_cpf` | CPF check digits, formatted | computed locally |
| `validate_cnpj` | CNPJ check digits (numeric + alphanumeric) | computed locally |
| `br_cep` | Address for a CEP (street, city, state, IBGE) | ViaCEP (BrasilAPI) |
| `br_ptax` | Official USD/BRL PTAX (latest or by date) | Banco Central do Brasil |
| `br_selic` | SELIC target and daily rate | Banco Central do Brasil (BrasilAPI) |

### Use as an MCP server (via Apify)

CambioKit runs on Apify, so any MCP client can use it through Apify's hosted MCP server. You only need your Apify API token (Console → Settings → API & Integrations).

**Streamable HTTP endpoint:**

```
https://mcp.apify.com/?tools=gleaming_carp/cambiokit
```

Send your Apify token in an `Authorization: Bearer` header (clients that support OAuth, such as Claude.ai, can sign in to Apify instead).

Claude Desktop / Cursor config (via `mcp-remote`):

```json
{ "mcpServers": { "cambiokit": {
    "command": "npx",
    "args": ["-y", "mcp-remote", "https://mcp.apify.com/?tools=gleaming_carp/cambiokit",
             "--header", "Authorization: Bearer ${APIFY_TOKEN}"],
    "env": { "APIFY_TOKEN": "your-apify-token" } } } }
```

Or run Apify's MCP server locally: `npx -y @apify/actors-mcp-server --actors gleaming_carp/cambiokit` with `APIFY_TOKEN` set.
Each tool call is billed per event through your Apify account.

### Use on Apify

Run the Actor with input `{"tool":"ar_dollar_rates","type":"mep"}` or a batch:
`{"calls":[{"tool":"validate_cpf","args":{"cpf":"529.982.247-25"}},{"tool":"br_ptax","args":{}}]}`.
Agents can also call it through Apify's MCP server (`mcp.apify.com`). Pricing: pay per successful tool call.

### Example output

```json
{ "ok": true, "tool": "validate_cuit",
  "data": { "input": "20-17254359-7", "valid": true, "formatted": "20-17254359-7", "entity_type": "person (male)" },
  "source": [{ "name": "Computed locally (official check-digit algorithm)" }],
  "fetched_at": "2026-10-26T18:21:42.990Z", "cached": false }
```

Errors: `{ "ok": false, "error": { "code": "INVALID_INPUT|NOT_FOUND|UPSTREAM_ERROR|ALL_SOURCES_FAILED", "message": "..." } }`.

### Data attribution

Data: DolarApi https://dolarapi.com · ArgentinaDatos https://argentinadatos.com · INDEC via datos.gob.ar (CC BY 4.0) · BCRA · Banco Central do Brasil (ODbL v1.0) · BrasilAPI · ViaCEP · Nager.Date · Bluelytics.
Validators check digits only; they don't confirm a person or company exists. Not financial advice.

License: MIT (code). Data keeps each source's license.

# Actor input Schema

## `tool` (type: `string`):

Which tool to run (ignored if 'calls' is set).

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

oficial, blue, mep, ccl, cripto, mayorista, tarjeta, bcra_reference

## `months` (type: `integer`):

Default 12

## `country` (type: `string`):

Country (holidays, is_business_day)

## `year` (type: `integer`):

Year (holidays)

## `date` (type: `string`):

Date YYYY-MM-DD (is_business_day, br_ptax)

## `cuit` (type: `string`):

CUIT/CUIL (validate_cuit)

## `cpf` (type: `string`):

CPF (validate_cpf)

## `cnpj` (type: `string`):

CNPJ (validate_cnpj)

## `cep` (type: `string`):

CEP (br_cep)

## `calls` (type: `array`):

Up to 50 calls: \[{"tool":"validate_cpf","args":{"cpf":"52998224725"}}]. Each successful call is one billed event.

## Actor input object example

```json
{
  "tool": "ar_dollar_rates"
}
```

# Actor output Schema

## `results` (type: `string`):

Tool call results stored in the default dataset (one item per call).

# 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("gleaming_carp/cambiokit").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("gleaming_carp/cambiokit").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 gleaming_carp/cambiokit --silent --output-dataset

```

## MCP server setup

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

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/egaf9dZRaIkhgh2tA/builds/Ij4wTa3KlPXzwvyOQ/openapi.json
