# Brazil Banking Holidays & Business-Day Calculator API (`brdatahub/brazil-banking-holidays-calculator`) Actor

Official Brazilian national banking holidays calendar + automated Business-Day (Dias Úteis) calculator for Boleto due-date roll-forward, financial contract maturities, and CPC legal procedural deadlines.

- **URL**: https://apify.com/brdatahub/brazil-banking-holidays-calculator.md
- **Developed by:** [BR Data Hub](https://apify.com/brdatahub) (community)
- **Categories:** Developer tools, Automation, Business
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 banking holiday or maturity calculation records

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

## Brazil Banking Holidays & Business-Day Calculator API

> Official Brazilian national banking holidays calendar + automated Business-Day (Dias Úteis) calculator for Boleto due-date roll-forward, financial contract maturities, and CPC legal procedural deadlines.

**Categories:** `DEVELOPER_TOOLS`, `AUTOMATION`, `BUSINESS` | **Billing Model:** Pay-Per-Event (`$0.01` start + `$0.002` per `calendar-item-extracted`) | **Permissions:** `LIMITED_PERMISSIONS` (Safe for AI Agents & MCP)

***

### Why Use `brazil-banking-holidays-calculator`?

Accessing structured Brazilian institutional, financial, regulatory, and B2B datasets normally requires navigating legacy Portuguese portals, handling regional encodings (`ISO-8859-1` / Brazilian decimal formats `1.234,56`), paginating custom endpoints, and normalizing inconsistent schemas.

**`brdatahub/brazil-banking-holidays-calculator`** turns official public records into a **clean, fast, schema-validated JSON/CSV API** ready for:

- **AI Agents & MCP Workflows:** Plug directly into Claude Desktop, Cursor, LangChain, CrewAI, n8n, Make, or Zapier via the official Apify MCP Server.
- **Quantitative, Financial & Market Intelligence:** Automate daily ingestion into Snowflake, BigQuery, PostgreSQL, Google Sheets, Power BI, or internal ERPs.
- **B2B Lead Generation & Compliance Automation:** Enrich CRMs, underwrite risk, monitor regulatory changes, and size regional markets programmatically.

***

### Key Capabilities

- **Zero-Configuration Start:** Includes sensible pre-filled defaults so automated runs and health checks succeed out of the box in seconds.
- **Normalized Numeric & Date Fields:** Brazilian currency, percentage, and date formats are parsed into clean standard floats and ISO strings alongside raw source fields.
- **Low Compute Footprint:** Optimized async Python (`httpx`) container running on `256 MB` RAM — minimizing Apify compute unit consumption to fractions of a cent per run.
- **Spreadsheet & API Ready:** Export results with one click as **JSON**, **CSV**, **Excel (`.xlsx`)**, **XML**, or **Parquet**.

***

### Input Parameters

| Field | Type | Default | Description |
|---|---|---|---|
| `year` | `integer` | `2026` | Target calendar year for Brazilian national holidays (e.g. 2026, 2027). |
| `startDate` | `string` | `""` | Start date for business-day deadline calculation (defaults to today). |
| `addBusinessDays` | `integer` | `15` | Calculates the exact future date after N Brazilian banking business days. |

#### Example Input (`JSON`)

```json
{
  "year": 2026,
  "startDate": "2026-11-12",
  "addBusinessDays": 15
}
```

***

### Output Schema & Real Sample Record

Each extracted item is pushed to the default Apify Dataset and validated against the Actor's structured `dataset_schema.json` and `output_schema.json`.

```json
{
  "record_type": "business_day_calculation",
  "date": "2026-12-04",
  "weekday": "sexta-feira",
  "name_or_rule": "2026-11-12 + 15 dias úteis bancários/CPC",
  "start_date": "2026-11-12",
  "start_rolled_boleto_due": "2026-11-12",
  "business_days_added": 15,
  "is_banking_day": true,
  "next_banking_day": "2026-12-04",
  "source": "Calendário Nacional FEBRABAN/ANBIMA"
}
```

***

### Quick Integration Examples

#### 1. Python (`apify-client`)

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_APIFY_API_TOKEN")
run = client.actor("brdatahub/brazil-banking-holidays-calculator").call(run_input={
  "year": 2026,
  "startDate": "2026-11-12",
  "addBusinessDays": 15
})

for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)
```

#### 2. Node.js / TypeScript (`apify-client`)

```javascript
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('brdatahub/brazil-banking-holidays-calculator').call({
  "year": 2026,
  "startDate": "2026-11-12",
  "addBusinessDays": 15
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

#### 3. cURL (Synchronous REST API — Instant JSON)

```bash
curl -X POST "https://api.apify.com/v2/acts/brdatahub~brazil-banking-holidays-calculator/run-sync-get-dataset-items?token=YOUR_APIFY_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"year": 2026, "startDate": "2026-11-12", "addBusinessDays": 15}'
```

#### 4. AI Agents & Apify MCP Server

Add `brdatahub/brazil-banking-holidays-calculator` as a tool in `https://mcp.apify.com` so LLM agents can query live Brazilian data on demand with typed input/output schemas and `LIMITED_PERMISSIONS` sandboxing.

***

### Pricing & Free-Plan Preview Policy

This Actor uses transparent **Pay-Per-Event (PPE)** pricing:

- **`apify-actor-start`:** `$0.01` per run initialization
- **`calendar-item-extracted`:** `$0.002` per structured record written to the dataset

*Note for Apify Free-tier accounts:* Users on the Apify Free plan automatically receive a clean preview sample per run and exit gracefully with a status message so you can test schema compatibility before upgrading to a paid Apify plan for full bulk extractions.

***

### Changelog & Maintenance

- **v1.0 (2026-11):** Initial production release with full `input_schema.json`, `dataset_schema.json` typed fields, `output_schema.json` v1 export links, and automated cloud health monitoring.
- **Support:** Open an issue in the **Issues** tab on Apify Store if you need custom filters, additional fields, or enterprise SLAs.

# Actor input Schema

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

Target calendar year for Brazilian national holidays (e.g. 2026, 2027).

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

Start date for business-day deadline calculation (defaults to today).

## `addBusinessDays` (type: `integer`):

Calculates the exact future date after N Brazilian banking business days.

## Actor input object example

```json
{
  "year": 2026,
  "startDate": "",
  "addBusinessDays": 15
}
```

# Actor output Schema

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

Structured output records extracted by Brazil Banking Holidays & Business-Day Calculator API.

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

Spreadsheet-ready CSV export of all extracted dataset records.

# 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("brdatahub/brazil-banking-holidays-calculator").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("brdatahub/brazil-banking-holidays-calculator").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 brdatahub/brazil-banking-holidays-calculator --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,brdatahub/brazil-banking-holidays-calculator"
        }
    }
}
```

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/RGHZyIA4cAqNDBs8B/builds/4PODMqr9GY9dElSVX/openapi.json
