{
  "openapi": "3.0.1",
  "info": {
    "title": "Romania New Company Registrations (ONRC) by County & CAEN",
    "description": "Fresh lead list of companies newly registered in Romania: name, CUI, registration number, date, county, locality, status and authorized CAEN activities. Filter by date, county, legal form and industry. Official trade register open data (ONRC, CC BY 4.0); natural persons excluded.",
    "version": "0.1",
    "x-build-id": "9rofQQ1e5HStQ2vuD"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/dontknow07~ro-new-companies/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-dontknow07-ro-new-companies",
        "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/dontknow07~ro-new-companies/runs": {
      "post": {
        "operationId": "runs-sync-dontknow07-ro-new-companies",
        "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/dontknow07~ro-new-companies/run-sync": {
      "post": {
        "operationId": "run-sync-dontknow07-ro-new-companies",
        "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": "Registered in the last N days",
            "minimum": 1,
            "maximum": 20000,
            "type": "integer",
            "description": "Used when 'Registered from' is empty. Counted back from 'Registered to' (default today). The register is published about every 2 weeks, so the newest days may not be in it yet.",
            "default": 30
          },
          "registeredFrom": {
            "title": "Registered from (YYYY-MM-DD)",
            "pattern": "^([0-9]{4}-[0-9]{2}-[0-9]{2})?$",
            "type": "string",
            "description": "Optional start date. Overrides 'Registered in the last N days'."
          },
          "registeredTo": {
            "title": "Registered to (YYYY-MM-DD)",
            "pattern": "^([0-9]{4}-[0-9]{2}-[0-9]{2})?$",
            "type": "string",
            "description": "Optional end date. Empty = today."
          },
          "counties": {
            "title": "Counties",
            "type": "array",
            "description": "County names or codes: Cluj or CJ, Bucuresti or B, Ilfov or IF. Empty = whole country.",
            "items": {
              "type": "string"
            }
          },
          "caenCodes": {
            "title": "CAEN activity codes",
            "type": "array",
            "description": "Keep companies authorized for at least one activity starting with these codes, e.g. 6210, 62, 4120, 56. New companies use CAEN Rev.3 codes. Empty = all activities.",
            "items": {
              "type": "string"
            }
          },
          "legalForms": {
            "title": "Legal forms",
            "type": "array",
            "description": "Optional: SRL, SA, SNC, SCS, CA (cooperative), ... Empty = all legal entities. Natural persons (PFA, II, IF) are never included.",
            "items": {
              "type": "string"
            }
          },
          "onlyActive": {
            "title": "Only active companies",
            "type": "boolean",
            "description": "Keep only companies whose register status includes 'functiune' (operating).",
            "default": true
          },
          "includeActivities": {
            "title": "Include authorized activities",
            "type": "boolean",
            "description": "Adds the list of authorized CAEN activities with their names. The first run per register snapshot then takes ~4 minutes longer (the activity file is large and served slowly); later runs read it from the cache. A CAEN filter reads it anyway.",
            "default": false
          },
          "maxItems": {
            "title": "Max companies",
            "minimum": 1,
            "type": "integer",
            "description": "Newest first. You pay per company returned.",
            "default": 1000
          },
          "useCache": {
            "title": "Cache the recent register",
            "type": "boolean",
            "description": "Keeps the companies registered in the last 400 days (~5 MB) in your named key-value store 'ro-open-data-cache', refreshed when ONRC publishes a new snapshot. Later runs take seconds. Turn off to read the full register every time.",
            "default": true
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "data.gov.ro refuses direct connections from Apify's cloud, so the downloads go through Apify Proxy (automatic datacenter IPs, included in every plan). Keep it on.",
            "default": {
              "useApifyProxy": true
            }
          },
          "probe": {
            "title": "Connectivity check only",
            "type": "boolean",
            "description": "Debug: test the connection to data.gov.ro directly and through Apify Proxy, save the results, and stop.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}