# ANAC Italy Public Contracts Open Data Scraper (`jungle_synthesizer/anac-italy-public-contracts-open-data-scraper`) Actor

Italy's national public procurement register from ANAC open data: contract award history with buyer, winner, losing bidders, tendered vs awarded vs paid amounts, and contractor SOA qualifications, keyed by codice fiscale on both sides of every award.

- **URL**: https://apify.com/jungle\_synthesizer/anac-italy-public-contracts-open-data-scraper.md
- **Developed by:** [BowTiedRaccoon](https://apify.com/jungle_synthesizer) (community)
- **Categories:** Business, Other
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.60 / 1,000 record scrapeds

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

## ANAC Italy Public Contracts Open Data Scraper

Italy's complete national public-procurement record, sourced from ANAC — the Italian anti-corruption
authority that every public contract must register with by law. Every tender carries a CIG (Codice
Identificativo Gara), so this dataset covers the full lifecycle: who bought, who won, who else bid,
what was tendered vs. awarded vs. actually paid, and the contractor's SOA qualification categories —
buyer and winner both identified by codice fiscale.

Unlike a live-tender feed, this actor returns the **historical award record**: closed tenders with a
known winner, the full bidder list (including losers), and execution outcomes. That makes it useful
for win-rate analysis, competitor pricing research, and public-buyer prospecting — not just bid alerts.

### What data does it return?

Each record represents one tender (CIG):

| Field                                       | Description                                                                     |
|---------------------------------------------|---------------------------------------------------------------------------------|
| `cig`                                       | Codice Identificativo Gara — the national tender primary key                    |
| `contract_object`                           | Description of the tendered contract/lot                                        |
| `contract_type`                             | Contracting procedure type (open, negotiated, direct award, ...)                |
| `procedure_type`                            | Realization/implementation mode of the contract                                 |
| `cpv_code` / `cpv_description`              | Common Procurement Vocabulary code and description                              |
| `amount_eur`                                | Total tendered amount, in EUR                                                   |
| `amount_awarded_eur`                        | Amount actually awarded to the winner, in EUR                                   |
| `amount_paid_eur`                           | Final accounted (executed) amount, in EUR, when ANAC has published one          |
| `publication_date`                          | Tender publication date                                                         |
| `award_date`                                | Definitive award date                                                           |
| `contract_start_date` / `contract_end_date` | Execution start and completion/termination dates                                |
| `buyer_cf` / `buyer_name`                   | Codice fiscale and name of the contracting authority                            |
| `buyer_region` / `buyer_province`           | Location of the contracting authority                                           |
| `winner_cf` / `winner_name`                 | Codice fiscale and name of the winning bidder (lead partner for a consortium)   |
| `winner_role`                               | MANDATARIA/MANDANTE for a consortium, SINGOLO otherwise                         |
| `winner_is_consortium`                      | True when the award went to a multi-party consortium (RTI)                      |
| `bidder_count`                              | Number of bidders (winners and losers) on this tender                           |
| `bidders`                                   | Every bidder on the tender — name, codice fiscale, and role                     |
| `funding_sources`                           | Non-zero funding categories and amounts behind the contract                     |
| `soa_attestations`                          | The winner's SOA contractor-qualification categories and classes                |
| `is_smartcig`                               | True for a sub-threshold simplified-procedure record rather than a standard CIG |
| `anac_dataset` / `anac_snapshot`            | Provenance: which ANAC dataset and monthly snapshot the row came from           |
| `source_url`                                | Direct URL of the ANAC resource the record was sourced from                     |

`bidders`, `funding_sources`, and `soa_attestations` are delivered as readable, semicolon-separated
entries (e.g. `"ACME SRL (12345678901) - MANDATARIA; BETA SPA (98765432100) - MANDANTE"`) so you can
use them directly in a spreadsheet without a separate join step.

### Input options

- **History Mode** — `latestFull` (default) returns the most recent closed year of tenders plus every
  update published since. `fullHistory` returns every year ANAC has published, back to 2007, plus the
  current year's updates. `fullHistory` is a much larger, longer-running pull — expect it to take
  significantly longer than the default.
- **Max Items** — cap the number of records returned. Leave unset (or 0) for no cap.

### Usage examples

**Default: latest year of awards, small sample:**

```json
{
  "maxItems": 50
}
```

**Full national history since 2007:**

```json
{
  "historyMode": "fullHistory",
  "maxItems": 0
}
```

> A `fullHistory` pull covers Italy's entire public-procurement record — millions of tenders across
> nearly two decades. Budget a long run time and generous memory when requesting the unfiltered set.

### Data source and update cadence

Sourced directly from ANAC's public open-data portal, which is refreshed monthly. Award, bidder, and
execution data trail tender publication by ANAC's own reporting cycle — a tender published this month
may not yet show a winner, bidder list, or payment total until ANAC's own systems record one.

***

**Further reading:** [orbtop.com — Government & Regulatory data](https://orbtop.com)

# Actor input Schema

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

What will this data feed? E.g. lead lists, KYB checks, price tracking.

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

Provide any feedback or suggestions for improvements.

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

We'll personally help with your use case. No spam.

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

Maximum number of merged CIG records to save. Small values (<=50) run a bounded, fast join for quick testing; larger/unset values run the full satellite join to completion.

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

latestFull (default) ingests the most recent closed year of tenders plus current-year updates. fullHistory ingests every year ANAC publishes (2007-present) plus current-year updates -- a much larger, longer-running crawl.

## Actor input object example

```json
{
  "sp_intended_usage": "Describe your intended use...",
  "sp_improvement_suggestions": "Share your suggestions here...",
  "sp_contact": "Share your email here...",
  "maxItems": 10,
  "historyMode": "latestFull"
}
```

# Actor output Schema

## `results` (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 = {
    "sp_intended_usage": "Describe your intended use...",
    "sp_improvement_suggestions": "Share your suggestions here...",
    "sp_contact": "Share your email here...",
    "maxItems": 10,
    "historyMode": "latestFull"
};

// Run the Actor and wait for it to finish
const run = await client.actor("jungle_synthesizer/anac-italy-public-contracts-open-data-scraper").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 = {
    "sp_intended_usage": "Describe your intended use...",
    "sp_improvement_suggestions": "Share your suggestions here...",
    "sp_contact": "Share your email here...",
    "maxItems": 10,
    "historyMode": "latestFull",
}

# Run the Actor and wait for it to finish
run = client.actor("jungle_synthesizer/anac-italy-public-contracts-open-data-scraper").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 '{
  "sp_intended_usage": "Describe your intended use...",
  "sp_improvement_suggestions": "Share your suggestions here...",
  "sp_contact": "Share your email here...",
  "maxItems": 10,
  "historyMode": "latestFull"
}' |
apify call jungle_synthesizer/anac-italy-public-contracts-open-data-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,jungle_synthesizer/anac-italy-public-contracts-open-data-scraper"
        }
    }
}
```

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/0VkMglunA5AGwepnO/builds/K7ESj4omq0gcq8w0B/openapi.json
