{
  "openapi": "3.0.1",
  "info": {
    "title": "Italy Company Registry & PEC Scraper - Registro Imprese",
    "description": "Italian company data from the Registro Imprese via ufficiocamerale.it: search by name, Partita IVA or REA, or paste URLs. VAT, REA, ATECO, legal form, status, address, employees, revenue, profit, share capital, PEC and SDI code. $0.001 per company + $0.10 per run.",
    "version": "0.2",
    "x-build-id": "NODi0DHNMamxezmTr"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapersdelight~it-company-pec-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapersdelight-it-company-pec-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-company-pec-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapersdelight-it-company-pec-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-company-pec-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapersdelight-it-company-pec-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": {
          "mode": {
            "title": "Search mode",
            "enum": [
              "by_name",
              "by_vat_number",
              "by_rea_number"
            ],
            "type": "string",
            "description": "How to read the Search query. by_name searches the company name on the site (best matches first, narrowed by Province). by_vat_number looks each Partita IVA up through the site's own search, so every VAT number works, not only ones that appear in a page address. by_rea_number resolves a REA code (e.g. MO-187940) to its company and keeps it only when the company's own card carries that REA.",
            "default": "by_name"
          },
          "query": {
            "title": "Search query",
            "type": "string",
            "description": "Company name (e.g. BCC Felsinea), VAT number (e.g. 00159560366) or REA code (e.g. MO-187940), matching the selected mode. In VAT and REA modes you can put several, separated by commas or new lines."
          },
          "province": {
            "title": "Province (CCIAA)",
            "type": "string",
            "description": "Optional two-letter Italian province code to filter name-search results (e.g. MI, RM, BO, NA); the province name also works. In REA mode it is used as the chamber of commerce for a REA number given without one."
          },
          "directUrls": {
            "title": "Direct company URLs",
            "uniqueItems": true,
            "type": "array",
            "description": "Exact ufficiocamerale.it company page URLs (e.g. https://www.ufficiocamerale.it/1295/bcc-felsinea-banca-di-credito-cooperativo-dal-1902-sc). Overrides mode/query.",
            "items": {
              "type": "string"
            }
          },
          "identifiers": {
            "title": "Batch list (VAT numbers, names, REA codes, URLs)",
            "type": "array",
            "description": "Optional: many lookups in one run, one per line, mixed freely - 11-digit Partita IVA numbers (checked against the P.IVA check digit before anything is fetched), company names, REA codes like TR-63492, or ufficiocamerale.it company URLs. Used together with mode/query or directUrls.",
            "items": {
              "type": "string"
            }
          },
          "maxMatchesPerName": {
            "title": "Companies per name in the batch list",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "For each company NAME in the batch list, how many matching companies to open, best match first (exact name, then names that start with it, then names containing every word). A name in Search query opens up to Maximum companies instead.",
            "default": 1
          },
          "maxItems": {
            "title": "Maximum companies to return",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Hard cap on the number of company records delivered (and charged) in this run.",
            "default": 10
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 16,
            "type": "integer",
            "description": "Maximum number of company pages fetched in parallel, each on its own Italian residential IP.",
            "default": 8
          },
          "onlyWithPec": {
            "title": "Only companies with a PEC",
            "type": "boolean",
            "description": "On: companies whose card publishes no PEC are skipped - not delivered and not charged - and the run keeps going until Maximum companies records WITH a PEC are delivered or the matches run out. Off: every company found is delivered.",
            "default": false
          },
          "includePec": {
            "title": "Look up missing PEC on INI-PEC",
            "type": "boolean",
            "description": "Accepted for compatibility. INI-PEC (inipec.gov.it) asks for a CAPTCHA on every company search, so it is not queried: pec_email comes from the company page (pec_source = page) or is null. No extra charge either way.",
            "default": true
          },
          "enrichEmails": {
            "title": "Enrich with contact emails",
            "type": "boolean",
            "description": "When on, each company's own website is looked for (the domain of its PEC, then its registered name as .it / .com domains) to attach contact_email, contact_website and an emailEnrichment object. A website counts only when one of its pages shows the company's codice fiscale or Partita IVA, its registered postcode next to its town, or its registered name with its legal form; website_matched_by says which, and an unconfirmed site goes to website_candidate with no email taken from it. Adds a few seconds per record and is charged per record with a verified website.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "ufficiocamerale.it answers Italian IPs only (datacenter and non-Italian IPs are refused by its Cloudflare), so the default is Apify RESIDENTIAL with country Italy. If another setting is refused with no success, the run switches to RESIDENTIAL Italy by itself.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ],
              "apifyProxyCountry": "IT"
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}