{
  "openapi": "3.0.1",
  "info": {
    "title": "Italian Note Legali Scraper - P.IVA, REA, PEC & Contacts",
    "description": "From $8 per 1,000 leads, no start fee. Turn Italian company domains into registry-grade B2B leads from each site's statutory D.Lgs. 70/2003 disclosure: checksum-validated P.IVA, codice fiscale, REA + CCIAA, capitale sociale, PEC, email, phone and sede legale. No login, no API key.",
    "version": "0.1",
    "x-build-id": "8E8J9tvKwagmzTy3V"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapersdelight~it-note-legali-contact-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapersdelight-it-note-legali-contact-scraper",
        "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/scrapersdelight~it-note-legali-contact-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapersdelight-it-note-legali-contact-scraper",
        "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/scrapersdelight~it-note-legali-contact-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapersdelight-it-note-legali-contact-scraper",
        "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": {
          "domains": {
            "title": "Italian company domains (or Note legali URLs)",
            "type": "array",
            "description": "One entry per company. Accepts a bare domain (\"bialetti.com\"), a homepage URL (\"https://www.lavazza.it\") or a direct Note legali / Dati societari URL. The Actor reads the site-wide footer first — that is where most Italian companies print their P.IVA — and then merges any Note legali, Dati societari, privacy or contatti page it can reach. One lead per domain. Leave empty to run a 5-domain Italian demo batch.",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "Start URLs (list source)",
            "type": "array",
            "description": "The same domain list handed over in Apify's Start-URLs shape, so the Console link-list UI, a file upload, Make, Zapier or a Google Sheet can pass it natively. Merged with \"Italian company domains\".",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "sourceDatasetId": {
            "title": "Enrich an existing dataset",
            "type": "string",
            "description": "Dataset ID of a previous Actor run. Each item's website/domain column is read and enriched — the real agency workflow: run PagineGialle, Google Maps Italy or your own list first, then pipe its output here."
          },
          "domainFieldName": {
            "title": "Domain field / CSV column",
            "type": "string",
            "description": "Which field of the source dataset (or which CSV column of the list file) holds the domain. Leave empty to auto-detect website / websiteUrl / domain / url / site / homepage. Dotted paths like \"company.website\" work."
          },
          "domainsFileUrl": {
            "title": "Domain list file URL",
            "type": "string",
            "description": "URL of a public CSV, TXT, JSON or JSONL file holding the domains — for lists too large to paste into the editor. The column is picked with \"Domain field / CSV column\"."
          },
          "skipDomains": {
            "title": "Suppression list",
            "type": "array",
            "description": "Domains to skip outright — existing customers, competitors, do-not-contact entries. Matched on the registrable domain, so \"www.x.it/page\" and \"x.it\" are the same entry. Applied BEFORE any fetch, so a suppressed domain never costs a request and can never be billed.",
            "items": {
              "type": "string"
            }
          },
          "maxItems": {
            "title": "Max results (billed rows)",
            "minimum": 0,
            "type": "integer",
            "description": "Hard cap on rows DELIVERED AND BILLED this run. Distinct from \"Max domains attempted\": measured on 740 real Italian domains, roughly 3 of 4 reachable sites yield a billable lead, so 1,000 domains return far fewer than 1,000 billed rows. 0 = unlimited.",
            "default": 1000
          },
          "maxDomains": {
            "title": "Max domains attempted",
            "minimum": 0,
            "type": "integer",
            "description": "Cap on domains ATTEMPTED, applied before any request. Use it to sample a large list cheaply. 0 = attempt every domain supplied.",
            "default": 0
          },
          "maxDiscoveryRequestsPerDomain": {
            "title": "Max extra pages per domain",
            "minimum": 0,
            "maximum": 20,
            "type": "integer",
            "description": "How many pages beyond the homepage may be read to enrich a lead. 0 = homepage only (cheapest; measured to still yield the P.IVA on the large majority of Italian sites). Pages the site links are always tried before guessed paths.",
            "default": 6
          },
          "perDomainTimeoutSecs": {
            "title": "Per-domain timeout (seconds)",
            "minimum": 5,
            "maximum": 600,
            "type": "integer",
            "description": "Wall-clock deadline for one domain, discovery included. Stops a single slow host stalling the pool.",
            "default": 60
          },
          "requestConcurrency": {
            "title": "Request concurrency",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "How many domains are worked in parallel. Higher is faster; keep it modest to stay polite to small business sites.",
            "default": 10
          },
          "requestTimeoutSecs": {
            "title": "Request timeout (seconds)",
            "minimum": 5,
            "maximum": 120,
            "type": "integer",
            "description": "Timeout for a single HTTP request.",
            "default": 30
          },
          "maxRequestRetries": {
            "title": "Max request retries",
            "minimum": 0,
            "maximum": 6,
            "type": "integer",
            "description": "Retries per request, each on a FRESH proxy exit IP — got-scraping's own retry reuses the flagged IP, which is useless against a soft block.",
            "default": 2
          },
          "escalateToResidentialOnBlock": {
            "title": "Escalate to residential-IT on a block",
            "type": "boolean",
            "description": "On a 403 / 429 / challenge (never on a dead host or a 404), retry on RESIDENTIAL + country-IT. MEASURED: barilla.com answered 403 on four consecutive fresh datacenter IPs and returned 853,552 usable bytes on residential-IT. Small SME lists rarely trigger it.",
            "default": true
          },
          "customUserAgent": {
            "title": "Custom User-Agent",
            "type": "string",
            "description": "Override the browser User-Agent sent on every request. Leave empty for the built-in Chrome 124 fingerprint."
          },
          "extraHttpHeaders": {
            "title": "Extra HTTP headers",
            "type": "object",
            "description": "Additional request headers merged over the defaults — for example a From: header identifying your crawler."
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Proxy settings. Apify DATACENTER is the default and is the measured winner on this corpus; residential is used only as the block escalation above, or when you pin it here. Your own proxy is never overridden.",
            "default": {
              "useApifyProxy": true
            }
          },
          "minFieldsRequired": {
            "title": "Minimum populated fields for a billable lead",
            "minimum": 0,
            "maximum": 19,
            "type": "integer",
            "description": "Quality floor AND billing bar: a row must carry at least this many of the 19 value fields (ragione sociale, forma giuridica, P.IVA, codice fiscale, REA number + province, CCIAA, capitale sociale, sede legale, street, CAP, comune, provincia, email, PEC, phone, legale rappresentante, direttore responsabile, registrazione tribunale) before it is delivered and charged. Rows under the bar come back as `partial`, free. 0 = no floor.",
            "default": 2
          },
          "requireValidPartitaIva": {
            "title": "Only rows with a checksum-valid P.IVA",
            "type": "boolean",
            "description": "Deliver (and bill) only companies whose disclosure carries a partita IVA that passes the official DPR 633/72 check digit. A page with no P.IVA, or one whose number fails the checksum, comes back `partial` and is never charged.",
            "default": false
          },
          "requireContact": {
            "title": "Only rows with a contact",
            "type": "boolean",
            "description": "Deliver (and bill) only companies with an email, a PEC or a phone number.",
            "default": false
          },
          "provinciaFilter": {
            "title": "Only these provinces",
            "type": "array",
            "description": "Two-letter province sigle — MI, RM, TO, NA. A row whose sede legale falls outside them is dropped before delivery and is never charged. Leave empty for the whole country.",
            "items": {
              "type": "string"
            }
          },
          "capFilter": {
            "title": "Only these CAP prefixes",
            "type": "array",
            "description": "Postal-code prefixes, matched from the left: [\"20\", \"00\"] keeps Milan and Rome. Combine with the province filter or use it alone.",
            "items": {
              "type": "string"
            }
          },
          "formaGiuridicaFilter": {
            "title": "Only these legal forms",
            "type": "array",
            "description": "Legal forms to keep, punctuation-insensitive: [\"S.p.A.\"] for società per azioni only, [\"S.r.l.\", \"S.r.l.s.\"] for limited companies, [\"Soc. Coop.\"] for cooperatives.",
            "items": {
              "type": "string"
            }
          },
          "dedupeBy": {
            "title": "Deduplicate by",
            "enum": [
              "piva-then-domain",
              "domain",
              "piva",
              "none"
            ],
            "type": "string",
            "description": "Which key collapses duplicates BEFORE anything is pushed or charged. The default uses the validated P.IVA when the page carries one and the registrable domain otherwise, so two domains owned by the same company collapse to one billed row. \"No deduplication\" genuinely means none: you get, and pay for, one row per input line.",
            "default": "piva-then-domain"
          },
          "includeMissRows": {
            "title": "Include unbilled miss rows",
            "type": "boolean",
            "description": "Emit a row for every domain that produced no lead — dead host, blocked, publishes no disclosure, under your quality bar, filtered out, duplicate, suppressed or not attempted — with its status and missReason, so you can do coverage accounting. These rows are NEVER charged.",
            "default": false
          },
          "includeRawText": {
            "title": "Include the cleaned disclosure text",
            "type": "boolean",
            "description": "Attach the text of the page the identity fields came from (capped at 40,000 characters) so you can audit a value or re-parse it yourself. Makes the dataset much larger.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}