{
  "openapi": "3.0.1",
  "info": {
    "title": "Romanian Courts Case Lookup (portal.just.ro)",
    "description": "Romanian court case lookup from portal.just.ro for due diligence: search a company's litigation by CUI, look up a case by file number, or pull a court's cause-list for a date. Penal-matter flag, procedural stage, MCP-native, pay-per-event. Private individuals pseudonymized by design.",
    "version": "0.1",
    "x-build-id": "anO3VCSohaZUPRi13"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/apnoda~portal-just/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-apnoda-portal-just",
        "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/apnoda~portal-just/runs": {
      "post": {
        "operationId": "runs-sync-apnoda-portal-just",
        "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/apnoda~portal-just/run-sync": {
      "post": {
        "operationId": "run-sync-apnoda-portal-just",
        "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": {
          "caseNumbers": {
            "title": "Case file numbers",
            "maxItems": 100,
            "uniqueItems": true,
            "type": "array",
            "description": "Court case file numbers to look up, e.g. \"6597/2/2021\" (optionally with an annex suffix \"6597/2/2021/a1\"). Each resolves to one case record. Max 100 per run; a cache miss triggers a quota-bounded on-demand portal.just.ro fetch.",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64
            },
            "default": []
          },
          "companyCuis": {
            "title": "Company tax codes (CUI)",
            "maxItems": 100,
            "uniqueItems": true,
            "type": "array",
            "description": "Romanian company tax codes (CUI) whose litigation to search. Accepts \"14399840\", \"RO14399840\", or \"RO 14399840\", all are normalized. The orchestrator resolves each CUI to its legal name and searches cases by that name; there is NO free-text party-name input (the re-identification guardrail). Max 100 per run; each search returns up to 1000 cases.",
            "items": {
              "type": "string",
              "pattern": "^(?:[Rr][Oo]\\s*)?[0-9]{2,10}$"
            },
            "default": []
          },
          "court": {
            "title": "Court filter (optional)",
            "type": "string",
            "description": "Optional court to narrow the company-CUI search, e.g. \"Curtea de Apel București\" or \"Tribunalul Cluj\" (diacritics optional; matched to the official ECRIS court list, or pass the portal.just.ro token directly). Applies to companyCuis only, case-number lookups are already court-specific. An unrecognized court name skips every companyCuis search with INVALID_INPUT, so leave it blank to search all courts."
          },
          "periodStart": {
            "title": "Registered on/after (optional)",
            "type": "string",
            "description": "Optional lower bound on case registration date for the company-CUI search, a date \"2024-01-01\" or an offset-aware ISO datetime \"2024-01-01T00:00:00Z\". Applies to companyCuis only."
          },
          "periodEnd": {
            "title": "Registered on/before (optional)",
            "type": "string",
            "description": "Optional upper bound on case registration date for the company-CUI search, a date \"2024-12-31\" (inclusive of the whole day) or an offset-aware ISO datetime. Applies to companyCuis only."
          },
          "maxAcceptableLagMinutes": {
            "title": "Max acceptable cache lag (minutes)",
            "minimum": 1,
            "type": "integer",
            "description": "Optional hard-staleness bound. When a cached result was fetched longer ago than this, the actor re-fetches from portal.just.ro (quota-bounded) rather than serving the cached rows. Omit to accept the default cache freshness."
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}