# Italy Public Spending – SIOPE Payments & Receipts (`orchestrated_daffodil/italy-public-spending-siope`) Actor

Monthly cash payments and receipts of Italian municipalities, provinces and other public bodies from SIOPE (MEF – Ragioneria Generale dello Stato, OpenBDAP open data), by SIOPE code, with year-to-date, monthly and per-capita amounts.

- **URL**: https://apify.com/orchestrated_daffodil/italy-public-spending-siope.md
- **Developed by:** [Daffodil Data](https://apify.com/orchestrated_daffodil) (community)
- **Categories:** Business, Lead generation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.60 / 1,000 siope row returneds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## Italy Public Spending – SIOPE Payments & Receipts

**What it does:** returns the official monthly **cash payments and receipts of Italian public bodies** (municipalities, provinces, unions of municipalities, mountain communities, state schools and more) from **SIOPE**, the Italian public treasury information system, as published by MEF – Ragioneria Generale dello Stato on OpenBDAP. Each row is one entity × one SIOPE code × one month, with the year-to-date amount, the amount of that month and the amount per inhabitant.

**What it costs:** $0.002 per row – **1,000 rows = $2** (plus a tiny $0.00005 start fee per run). Apify Silver plan: −10%, Gold/Platinum/Diamond: −20%. Rows skipped by your filters are free.

**Real output example** (run of 20 Nov 2026 with input `{"regions": ["Liguria"], "entities": ["COMUNE DI SANREMO"]}` – 145 rows, about 6 seconds; one row shown, some fields omitted):

```json
{
  "entityName": "COMUNE DI SANREMO",
  "entityType": "COMUNI",
  "province": "IM",
  "istatCode": "008055",
  "population": 53059,
  "period": "2026/10",
  "flow": "spending",
  "titleDescription": "Spese correnti",
  "siopeCode": "U1030205004",
  "siopeDescription": "Energia elettrica",
  "cumulativeAmountEur": 1382254.1,
  "monthlyAmountEur": 109123.51,
  "cumulativePerCapitaEur": 26.05,
  "source": "Ragioneria Generale dello Stato - OpenBDAP, SIOPE (CC BY 4.0)"
}
```

In plain words: from January to October 2026 the Municipality of Sanremo paid €1,382,254.10 for electricity (€26.05 per inhabitant), €109,123.51 of it in October.

### Why use it

- **Official data, no scraping:** the Actor reads the open data API of OpenBDAP (MEF – RGS). No login, no captcha, no personal data.
- **Clean, analysis-ready rows:** English field names, numbers as numbers, ISTAT codes, region and province, population, per-capita amounts.
- **Monthly amounts computed for you:** SIOPE publishes cumulative year-to-date figures; the Actor also returns the amount of each single month.
- **Filters that save money:** by entity name, province, entity type, year, month, SIOPE code prefix (e.g. `U103` = goods and services) or description keyword (e.g. `energia elettrica`, `rifiuti`).

Typical uses: public-sector sales and market sizing (who spends how much on what), journalism and transparency, benchmarking municipalities, research and dashboards.

### Input

| Field | Description |
|---|---|
| `regions` | Region(s) to read (default `Liguria`). The entity must be in one of these regions. |
| `entities` | Text contained in the official entity name, e.g. `COMUNE DI SANREMO`, `PROVINCIA DI IMPERIA`. Empty = every entity in the region. |
| `provinces` | Province codes, e.g. `IM`, `MI`, `RM`. |
| `entityTypes` | SIOPE entity type codes, e.g. `CO` municipalities, `PR` provinces, `UC` unions of municipalities, `CM` mountain communities, `IS` state schools. |
| `year` | Year (2014 onwards). Empty = latest year available. |
| `flow` | `spesa` (spending, default), `entrata` (receipts) or `both`. |
| `period` | `latest` = only the latest month published (year-to-date totals, default) or `all` = every month. |
| `months` | Specific month numbers, e.g. `[6, 12]`. |
| `siopeCodes` | SIOPE code prefixes, e.g. `U1` current spending, `U103` goods and services, `U2` capital spending, `E1` tax revenue. |
| `keywords` | Words in the SIOPE description (Italian), e.g. `energia elettrica`. |
| `skipZeroRows` | Skip rows with zero amounts (default true). |
| `maxItems` | Maximum rows to save (default 50 when not set). |

Example – electricity bills of all municipalities in the province of Imperia, month by month, 2025:

```json
{
  "regions": ["Liguria"],
  "provinces": ["IM"],
  "entityTypes": ["CO"],
  "year": 2025,
  "period": "all",
  "keywords": ["energia elettrica"],
  "maxItems": 1000
}
```

### Output fields

`entityName`, `entityTypeCode`, `entityType`, `region`, `regionCode`, `province`, `provinceName`, `istatCode`, `population`, `year`, `month`, `period`, `flow` (`spending` / `receipts`), `titleCode`, `titleDescription`, `siopeCode`, `siopeDescription`, `cumulativeAmountEur` (January to this month), `monthlyAmountEur` (this month only), `cumulativePerCapitaEur`, `chartOfAccounts`, `datasetName`, `source`, `license`.

You can download the dataset as JSON, CSV, Excel or via the Apify API.

### FAQ

**How fresh is the data?** MEF – RGS updates the SIOPE open data roughly every month; the most recent month can be incomplete until the next update. The run log tells you the latest month available.

**Are amounts accrual or cash?** Cash: SIOPE records payments and receipts actually processed by the treasurer, classified by the SIOPE codes of the public chart of accounts (piano dei conti).

**Why is `monthlyAmountEur` empty?** It needs the previous month: it is computed when you filter by entity or province (or for January). For region-wide runs only year-to-date amounts are returned.

**Is there personal data?** No. SIOPE contains only aggregated amounts of public bodies.

**Is it legal to reuse?** Yes. The data is published by Ragioneria Generale dello Stato under the **Creative Commons Attribution 4.0 (CC BY 4.0)** licence. Please credit: *Source: Ragioneria Generale dello Stato – OpenBDAP, SIOPE (CC BY 4.0)*. Each row carries this attribution in the `source` field. This Actor is not affiliated with MEF or RGS.

**Something is missing?** Open an issue on the Actor's Issues tab and describe what you need.

# Actor input Schema

## `regions` (type: `array`):

Region(s) whose SIOPE data to read. The entity you want must be located in one of these regions. Default: Liguria.

## `entities` (type: `array`):

Optional. Text contained in the official entity name as written in SIOPE, e.g. 'COMUNE DI SANREMO', 'SANREMO', 'PROVINCIA DI IMPERIA', 'UNIONE DEI COMUNI'. Case-insensitive. Leave empty to get every entity of the region (use Provinces / Entity types to narrow down).

## `provinces` (type: `array`):

Optional. Province codes (IM, GE, MI, RM...) or BDAP province names in capitals (IMPERIA, GENOVA...).

## `entityTypes` (type: `array`):

Optional. SIOPE entity type codes, e.g. CO = municipalities (Comuni), PR = provinces, UC = unions of municipalities, CM = mountain communities, IS = state schools. The full description is returned in the entityType field.

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

Optional. Year of the data (SIOPE open data starts in 2014). Leave empty for the latest year available.

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

Spending (pagamenti / uscite) or receipts (incassi / entrate).

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

latest = only the most recent month published (cumulative year-to-date amounts). all = every month of the year, with month-by-month amounts.

## `months` (type: `array`):

Optional. Month numbers (1-12) to return instead of the 'Months' setting, e.g. \[6, 12].

## `siopeCodes` (type: `array`):

Optional. Keep only SIOPE codes starting with these prefixes, e.g. U1 (current expenditure), U103 (purchase of goods and services), U2 (capital expenditure), E1 (tax revenue).

## `keywords` (type: `array`):

Optional. Keep only rows whose SIOPE description contains one of these keywords (Italian), e.g. 'rifiuti', 'energia elettrica', 'manutenzione'. All words of a keyword must match.

## `skipZeroRows` (type: `boolean`):

Skip rows whose cumulative and monthly amounts are both zero (you are not charged for skipped rows).

## `maxItems` (type: `integer`):

Maximum number of rows to save (you pay per row).

## Actor input object example

```json
{
  "regions": [
    "Liguria"
  ],
  "entities": [
    "COMUNE DI SANREMO"
  ],
  "flow": "spesa",
  "period": "latest",
  "skipZeroRows": true,
  "maxItems": 500
}
```

# Actor output Schema

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

Dataset with all matching SIOPE rows

# 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 = {
    "regions": [
        "Liguria"
    ],
    "entities": [
        "COMUNE DI SANREMO"
    ],
    "maxItems": 500
};

// Run the Actor and wait for it to finish
const run = await client.actor("orchestrated_daffodil/italy-public-spending-siope").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 = {
    "regions": ["Liguria"],
    "entities": ["COMUNE DI SANREMO"],
    "maxItems": 500,
}

# Run the Actor and wait for it to finish
run = client.actor("orchestrated_daffodil/italy-public-spending-siope").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 '{
  "regions": [
    "Liguria"
  ],
  "entities": [
    "COMUNE DI SANREMO"
  ],
  "maxItems": 500
}' |
apify call orchestrated_daffodil/italy-public-spending-siope --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,orchestrated_daffodil/italy-public-spending-siope"
        }
    }
}
```

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/bRnXYKIXeIigId3HJ/builds/M3kTK7MQ1PsxlKoTM/openapi.json
