{
  "openapi": "3.0.1",
  "info": {
    "title": "Business Opportunity Finder (Italy)",
    "description": "Trova segnali di opportunità B2B in Italia per il tuo settore e la tua zona: appalti aggiudicati, affidamenti diretti, nuove gare, nuove aperture e espansioni, da ANAC, TED e Google News, con un punteggio di rilevanza AI facoltativo.",
    "version": "0.1",
    "x-build-id": "ZggK3ROgklVodYUcL"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/kupilux~business-opportunity-finder/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-kupilux-business-opportunity-finder",
        "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/kupilux~business-opportunity-finder/runs": {
      "post": {
        "operationId": "runs-sync-kupilux-business-opportunity-finder",
        "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/kupilux~business-opportunity-finder/run-sync": {
      "post": {
        "operationId": "run-sync-kupilux-business-opportunity-finder",
        "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",
        "required": [
          "sector",
          "locations"
        ],
        "properties": {
          "sector": {
            "title": "Settore",
            "type": "string",
            "description": "Il settore dei clienti che cerchi, o del tuo servizio, in parole semplici: per esempio bar e caffetterie (se fornisci i bar) o pulizie industriali (se sei un’impresa di pulizie)."
          },
          "sectorKeywords": {
            "title": "Parole chiave del settore",
            "type": "array",
            "description": "Parole chiave extra che descrivono il tuo settore, usate per trovare le notizie e guidare il punteggio AI.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "cpvPrefixes": {
            "title": "Prefissi CPV",
            "type": "array",
            "description": "Prefissi CPV facoltativi per restringere ANAC e TED (per esempio 9091 per le pulizie).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "locations": {
            "title": "Luoghi",
            "minItems": 1,
            "maxItems": 10,
            "type": "array",
            "description": "Da 1 a 10 comuni, province, regioni o sigle di provincia (per esempio Cagliari, Provincia di Monza, Sardegna, MI).",
            "items": {
              "type": "string"
            }
          },
          "signalTypes": {
            "title": "Tipi di segnale",
            "type": "array",
            "description": "Quali tipi di segnale vuoi ricevere. Predefinito: tutti.",
            "items": {
              "type": "string",
              "enum": [
                "tender_won",
                "direct_award",
                "new_tender",
                "new_opening",
                "expansion_hiring"
              ],
              "enumTitles": [
                "Appalto vinto",
                "Affidamento diretto",
                "Nuova gara",
                "Nuova apertura",
                "Espansione / assunzioni"
              ]
            },
            "default": [
              "tender_won",
              "direct_award",
              "new_tender",
              "new_opening",
              "expansion_hiring"
            ]
          },
          "sinceDays": {
            "title": "Ultimi giorni",
            "minimum": 1,
            "maximum": 92,
            "type": "integer",
            "description": "Tieni i segnali degli ultimi N giorni. Viene ignorato se imposti Data da / Data a.",
            "default": 30
          },
          "dateFrom": {
            "title": "Data da (UTC)",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Giorno di inizio UTC facoltativo, in formato YYYY-MM-DD (estremo incluso)."
          },
          "dateTo": {
            "title": "Data a (UTC)",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Giorno di fine UTC facoltativo, in formato YYYY-MM-DD (estremo incluso)."
          },
          "maxResults": {
            "title": "Numero massimo di risultati",
            "minimum": 1,
            "maximum": 2000,
            "type": "integer",
            "description": "Numero massimo di segnali restituiti (paghi per ogni segnale restituito).",
            "default": 200
          },
          "includeAiClassification": {
            "title": "Analisi AI",
            "type": "boolean",
            "description": "Se attivo, l’AI valuta la rilevanza di ogni segnale per il tuo settore (addebito per ogni segnale classificato). Se disattivo, restano solo i filtri di zona, data e CPV, senza costo AI.",
            "default": true
          },
          "minRelevance": {
            "title": "Rilevanza minima",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Punteggio minimo di rilevanza AI (0–100), quando l’analisi è attiva.",
            "default": 60
          },
          "includeIndividuals": {
            "title": "Includi persone fisiche",
            "type": "boolean",
            "description": "Se disattivo (predefinito), esclude i vincitori identificati da un codice fiscale personale (ditte individuali).",
            "default": false
          },
          "onlyNew": {
            "title": "Solo segnali nuovi",
            "type": "boolean",
            "description": "Restituisce solo i segnali non già ricevuti nelle tue esecuzioni precedenti di questo Actor.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}