{
  "openapi": "3.0.1",
  "info": {
    "title": "Italy Public Tenders (ANAC)",
    "description": "Italian public procurement from the official ANAC open data: every CIG with buyer, amount, CPV, deadline, procedure and outcome, plus OCDS awards with suppliers. Filter by region, CPV, keywords, value, PNRR. Pay per result.",
    "version": "1.0",
    "x-build-id": "7v3vHKhcCmpFZDZ4W"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/danielefontana~italy-tenders-anac/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-danielefontana-italy-tenders-anac",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/danielefontana~italy-tenders-anac/runs": {
      "post": {
        "operationId": "runs-sync-danielefontana-italy-tenders-anac",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/danielefontana~italy-tenders-anac/run-sync": {
      "post": {
        "operationId": "run-sync-danielefontana-italy-tenders-anac",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "daysBack": {
            "title": "Last N days of available data",
            "minimum": 1,
            "maximum": 3650,
            "type": "integer",
            "description": "ANAC publishes its data once a month: the window ends on the latest publication date in the newest ANAC update (shown in the run log) and goes back N days. Ignored when 'Published from' or 'Published to' is set.",
            "default": 30
          },
          "publishedFrom": {
            "title": "Published from (YYYY-MM-DD)",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Publication date lower bound, inclusive."
          },
          "publishedTo": {
            "title": "Published until (YYYY-MM-DD)",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Publication date upper bound, inclusive."
          },
          "onlyOpen": {
            "title": "Only tenders still open",
            "type": "boolean",
            "description": "Keep only records whose deadline for offers has not passed (records without a deadline are dropped).",
            "default": false
          },
          "regions": {
            "title": "Regions",
            "type": "array",
            "description": "Italian regions of the contracting authority, e.g. Lombardia, Lazio, Emilia Romagna, Sicilia. Empty = all.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "provinces": {
            "title": "Provinces",
            "type": "array",
            "description": "Province of execution (as named by ANAC, e.g. MILANO, ROMA, BARI). Empty = all.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "cpvCodes": {
            "title": "CPV codes or prefixes",
            "type": "array",
            "description": "72 = IT services, 45 = construction, 33 = medical, 79 = business services, 90 = environmental. Full codes like 72253000 accepted.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "keywords": {
            "title": "Keywords in the tender subject",
            "type": "array",
            "description": "Case- and accent-insensitive phrases searched in the subject of the tender and of the lot. Any keyword may match.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "minValue": {
            "title": "Minimum lot value (EUR)",
            "minimum": 0,
            "type": "integer",
            "description": "Skips lots whose value is known and lower than this amount. Records without a value are kept."
          },
          "maxValue": {
            "title": "Maximum lot value (EUR)",
            "minimum": 0,
            "type": "integer",
            "description": "Skips lots whose value is known and higher than this amount."
          },
          "contractNature": {
            "title": "Contract nature",
            "type": "array",
            "description": "works = lavori, services = servizi, goods = forniture. Empty = all.",
            "items": {
              "type": "string",
              "enum": [
                "works",
                "services",
                "goods"
              ],
              "enumTitles": [
                "Works (lavori)",
                "Services (servizi)",
                "Goods (forniture)"
              ]
            },
            "default": []
          },
          "procedureTypes": {
            "title": "Procedure types (contains)",
            "type": "array",
            "description": "Matched against the ANAC procedure name, e.g. 'procedura aperta', 'affidamento diretto', 'procedura negoziata'.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "buyerNames": {
            "title": "Buyer name contains",
            "type": "array",
            "description": "Keep only contracting authorities whose name contains one of these phrases, e.g. 'Comune di Milano', 'ASL'.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "buyerIds": {
            "title": "Buyer fiscal codes",
            "type": "array",
            "description": "Exact codice fiscale of the contracting authorities to keep.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "pnrrOnly": {
            "title": "Only PNRR / PNC funded",
            "type": "boolean",
            "description": "Keep only tenders flagged as financed by the National Recovery and Resilience Plan (CIG sources only).",
            "default": false
          },
          "includeCancelled": {
            "title": "Include cancelled CIGs",
            "type": "boolean",
            "description": "By default CIGs cancelled by the contracting authority are skipped. Enable to keep them (status = cancelled).",
            "default": false
          },
          "maxItems": {
            "title": "Maximum results",
            "minimum": 1,
            "type": "integer",
            "description": "Stop after this many records. You are only charged for records actually written. Processing stops as soon as the limit is reached, which also keeps the run short."
          },
          "includeRaw": {
            "title": "Include raw ANAC record",
            "type": "boolean",
            "description": "Adds the original ANAC CIG row under the `raw` field (larger output).",
            "default": false
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}