# Brazil Holidays & Business Days (Feriados e Dias Úteis) (`dados_publicos_br/feriados-dias-uteis`) Actor

Brazilian national and banking holidays 2001–2099 (validated against the official ANBIMA calendar), plus business-day counting and date arithmetic, one at a time or in bulk.

- **URL**: https://apify.com/dados_publicos_br/feriados-dias-uteis.md
- **Developed by:** [Dados Públicos BR](https://apify.com/dados_publicos_br) (community)
- **Categories:** Developer tools, Business
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.50 / 1,000 results

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 Holidays & Business Days (Feriados e Dias Úteis)

Brazilian **national and banking holidays from 2001 to 2099**, plus **business-day math**: count business days between dates, add or subtract N business days, or list every business day in a period. Run one calculation at a time or thousands in a single run.

✅ **Validated against the official ANBIMA calendar**, the reference used by Brazilian banks and the financial market, for every year from 2001 to 2099, and cross-checked daily against an independent source to catch new holiday laws.

### Why use it

- **Payment due dates and settlements**: when does a boleto due on a holiday actually fall due? What is D+2 from today?
- **Interest calculations**: Brazilian rates (CDI, Selic) accrue on business days in a 252-day year, so you need the exact business-day count (*dias úteis*).
- **Deadlines and SLAs**: add 5 business days to an order date, in bulk.
- **Payroll and HR planning**: holidays per year with weekday and legal basis.

No API key, no external dependency: holidays are computed (Easter-based dates included) and the results are deterministic.

### Calendars

| `calendario` | Non-business days | Use for |
|---|---|---|
| `bancario` (default) | Weekends + national holidays + Carnival (Mon & Tue) + Corpus Christi | Banks, payments, interest, most business contracts (same as ANBIMA) |
| `nacional` | Weekends + national holidays from federal law | Legal holidays only |

National holidays: New Year, Good Friday, Tiradentes (Apr 21), Labour Day, Independence (Sep 7), Our Lady Aparecida (Oct 12), All Souls (Nov 2), Republic (Nov 15), **Black Consciousness Day (Nov 20, national since 2024)** and Christmas.

State and municipal holidays are not included yet.

### How to use

1. Open this Actor in Apify Console (you can try it on Apify's free plan).
2. Fill in the input, or keep the example values to see how the output looks.
3. Click **Start** and wait for the run to finish.
4. Download the results as JSON, CSV or Excel from the run's output, or get them through the Apify API.
5. To get fresh data automatically, create an Apify **Schedule** for the Actor (for example, every morning).

### Operations and examples

**List holidays** (`feriados`):

```json
{ "operacao": "feriados", "anoInicial": 2026, "anoFinal": 2027 }
```

```json
{ "data": "2026-02-16", "nome": "Carnaval (segunda-feira)", "tipo": "ponto_facultativo", "bancario": true,
  "naoUtil": true, "diaSemana": "segunda-feira", "caiEmFimDeSemana": false,
  "baseLegal": "Portaria federal anual", "calendario": "bancario" }
```

**Count business days** (`contar_dias_uteis`): market convention, start date excluded and end date included:

```json
{ "operacao": "contar_dias_uteis", "dataInicial": "2026-01-01", "dataFinal": "2026-12-31" }
```

→ `{ "diasUteis": 249, "diasCorridos": 364, ... }`

**Add business days** (`somar_dias_uteis`); negative values go back in time:

```json
{ "operacao": "somar_dias_uteis", "data": "2026-12-23", "dias": 3 }
```

→ `{ "resultado": "2026-12-29", "diaSemanaResultado": "terça-feira", ... }` (skips Christmas and the weekend)

**Batch** (`lote`): many calculations in one run, each with an optional `id` echoed back:

```json
{
  "lote": [
    { "operacao": "somar_dias_uteis", "data": "2026-10-09", "dias": 5, "id": "invoice-1" },
    { "operacao": "contar_dias_uteis", "dataInicial": "2026-10-01", "dataFinal": "2026-10-31", "id": "oct" }
  ]
}
```

Invalid items in a batch return a row with an `erro` field and **are not charged**. The other items still run.

### How much does it cost?

You pay **US$ 0.0005 per row** delivered to your dataset (US$ 0.50 per 1,000), plus a tiny start fee per run. **Rows with input errors are free.**

- One year of holidays (about 13 rows): about **US$ 0.007**.
- A batch of 1,000 business-day calculations: about **US$ 0.50**.

### Notes

- Supported range: **2001–2099** (the validated range; the banking calendar before 2000 followed different rules).
- Carnival and Corpus Christi are formally *pontos facultativos* (optional federal days), but banks and the financial market do not operate on them. That is why they are non-business days in the `bancario` calendar.
- Ash Wednesday (*Quarta-feira de Cinzas*) is a half-day optional day and counts as a business day. Use `incluirPontosFacultativos` to list it.

### FAQ

**Can I use it from my code or an AI agent?** Yes. Every Apify Actor can be called through the Apify API and the official clients, and AI agents can find and run it through the Apify MCP server.

**Is the data official?** Yes. It comes straight from the official public source listed under "Data source", with no manual edits.

**Something broke or you need a field?** Open an issue on the Actor's *Issues* tab.

### Related Actors

More Brazilian public data from the same publisher:

- [Brazil public tenders (PNCP Licitações)](https://apify.com/dados_publicos_br/pncp-licitacoes): open and recently published government tenders, filtered by keyword, state, agency and value.
- [Brazil government contracts and price records](https://apify.com/dados_publicos_br/pncp-contratos-atas): contracts, purchase orders and price registration records (atas): who won, what, how much.
- [Brazil government purchase prices](https://apify.com/dados_publicos_br/pncp-itens-precos): awarded unit prices and winning suppliers for any product or service, with price statistics.
- [Brazil Central Bank indicators](https://apify.com/dados_publicos_br/bcb-indicadores): Selic, CDI, IPCA, IGP-M, exchange rates and more, with accumulated totals.

***

#### 🇧🇷 Resumo em português

Feriados nacionais e bancários de **2001 a 2099**, validados contra o calendário oficial da **ANBIMA**, e cálculo de **dias úteis**: contar entre datas, somar ou subtrair N dias úteis e listar dias úteis, um por vez ou em lote. Inclui Carnaval e Corpus Christi no calendário bancário e o Dia da Consciência Negra (feriado nacional desde 2024). Você paga apenas pelos resultados.

# Actor input Schema

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

What to calculate: list holidays, count business days between two dates, add N business days to a date, or list the business days in a period.

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

The banking calendar is the one used for interest, settlement and most business contracts in Brazil.

## `anoInicial` (type: `integer`):

For <b>feriados</b>. Default: current year.

## `anoFinal` (type: `integer`):

For <b>feriados</b>. Default: same as start year.

## `incluirPontosFacultativos` (type: `boolean`):

For <b>feriados</b>: also list Ash Wednesday (until 2 pm) and, in the national calendar, Carnival and Corpus Christi.

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

For <b>contar_dias_uteis</b> and <b>listar_dias_uteis</b>.

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

For <b>contar_dias_uteis</b> and <b>listar_dias_uteis</b>.

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

For <b>somar_dias_uteis</b>.

## `dias` (type: `integer`):

For <b>somar_dias_uteis</b>. Negative goes back in time.

## `lote` (type: `array`):

Many calculations in one run. Each item takes the same fields as above, plus an optional <code>id</code> echoed in the output. Example: <code>\[{"operacao":"somar_dias_uteis","data":"2026-10-09","dias":5,"id":"invoice-1"}]</code>. Invalid items return an <code>erro</code> row and are not charged.

## Actor input object example

```json
{
  "operacao": "feriados",
  "calendario": "bancario",
  "incluirPontosFacultativos": false
}
```

# Actor output Schema

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

All rows delivered by this run (dataset items).

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

Run statistics: rows calculated and input errors.

# 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("dados_publicos_br/feriados-dias-uteis").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("dados_publicos_br/feriados-dias-uteis").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 dados_publicos_br/feriados-dias-uteis --silent --output-dataset

```

## MCP server setup

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

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/cjGnq2zrGbWcHbiSc/builds/3Aikgb6MBlre8n82m/openapi.json
