{
  "openapi": "3.0.1",
  "info": {
    "title": "Romanian Company Financials by CAEN & County + Benchmarks",
    "description": "Every Romanian company's official annual figures (turnover, profit, employees, assets, debts) filtered by CAEN industry code and county, with growth vs last year and percentile rank against its sector. Official Ministry of Finance + ONRC open data (CC BY 4.0).",
    "version": "0.1",
    "x-build-id": "QZkeHYacKWHtyfqqB"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/dontknow07~ro-company-financials/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-dontknow07-ro-company-financials",
        "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-company-financials/runs": {
      "post": {
        "operationId": "runs-sync-dontknow07-ro-company-financials",
        "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-company-financials/run-sync": {
      "post": {
        "operationId": "run-sync-dontknow07-ro-company-financials",
        "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": {
          "caenCodes": {
            "title": "CAEN industry codes",
            "type": "array",
            "description": "CAEN codes or prefixes, e.g. 6201 (software, CAEN Rev.2), 6210 (software, CAEN Rev.3), 41 (all construction of buildings), 5610. Filings use both Rev.2 and Rev.3 codes, so list both for a sector. Empty = all industries.",
            "items": {
              "type": "string"
            }
          },
          "counties": {
            "title": "Counties",
            "type": "array",
            "description": "County names or codes: Cluj or CJ, Bucuresti or B, Timis or TM. Empty = whole country.",
            "items": {
              "type": "string"
            }
          },
          "cuis": {
            "title": "Specific companies (CUI)",
            "type": "array",
            "description": "Optional list of fiscal codes (CUI/CIF, with or without RO). When set, only these companies are returned.",
            "items": {
              "type": "string"
            }
          },
          "year": {
            "title": "Financial year",
            "minimum": 2019,
            "maximum": 2035,
            "type": "integer",
            "description": "Year of the annual statements (2019 or later). Empty = the latest year published."
          },
          "minTurnover": {
            "title": "Minimum turnover (RON)",
            "minimum": 0,
            "type": "integer",
            "description": "Keep companies with net turnover (cifra de afaceri neta) at or above this."
          },
          "maxTurnover": {
            "title": "Maximum turnover (RON)",
            "minimum": 0,
            "type": "integer",
            "description": "Keep companies with net turnover at or below this."
          },
          "minEmployees": {
            "title": "Minimum employees",
            "minimum": 0,
            "type": "integer",
            "description": "Average number of employees in the year."
          },
          "maxEmployees": {
            "title": "Maximum employees",
            "minimum": 0,
            "type": "integer",
            "description": "Keep companies with at most this many employees."
          },
          "onlyProfitable": {
            "title": "Only profitable companies",
            "type": "boolean",
            "description": "Keep only companies with a net profit in the year.",
            "default": false
          },
          "legalForms": {
            "title": "Legal forms",
            "type": "array",
            "description": "Optional: SRL, SA, SNC, SCS, ... Empty = all legal entities. Natural persons (PFA, II, IF) are never included.",
            "items": {
              "type": "string"
            }
          },
          "includePreviousYear": {
            "title": "Add previous year and growth",
            "type": "boolean",
            "description": "Adds last year's turnover, net result, employees and turnover growth %.",
            "default": true
          },
          "benchmarkScope": {
            "title": "Benchmark peers",
            "enum": [
              "national",
              "county"
            ],
            "type": "string",
            "description": "Compare each company with all companies of the same CAEN code in Romania, or only in its county.",
            "default": "national"
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "turnover",
              "netResult",
              "employees",
              "turnoverGrowthPct",
              "netMarginPct",
              "totalAssets"
            ],
            "type": "string",
            "description": "Order of the results; the best come first and Max companies cuts the list.",
            "default": "turnover"
          },
          "maxItems": {
            "title": "Max companies",
            "minimum": 1,
            "type": "integer",
            "description": "The run stops after this many companies (best first by the sort). You pay per company returned.",
            "default": 1000
          },
          "useCache": {
            "title": "Cache the trade register",
            "type": "boolean",
            "description": "Keeps a compact copy (~60 MB) of the ONRC register in your named key-value store 'ro-company-financials-cache', refreshed when ONRC publishes a new snapshot (about every 2 weeks). Later runs are faster and cheaper. Turn off to read the register fresh 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}