{
  "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 number, pull a court's cause-list, or get the daily national export of modified cases. MCP-native, pay-per-event. Penal cases excluded; private individuals pseudonymized.",
    "version": "0.1",
    "x-build-id": "DMqyLVgYcySoH7Ci0"
  },
  "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."
          },
          "dailyExport": {
            "title": "Deliver the daily national export",
            "type": "boolean",
            "description": "Turn this on to get the daily national export instead of looking cases up. Cannot be combined with case file numbers or company tax codes. By turning it on you accept the recipient terms in the README: no re-identification of private individuals, deletion within 12 months, and erasure passed on within 30 days of our notice, which we send to the contact email below. The download link is written to this run's OUTPUT (also what the run-sync API returns) and stays valid for 7 days (the file itself is kept 28 days).",
            "default": false
          },
          "exportKind": {
            "title": "Which file",
            "enum": [
              "daily",
              "upcoming"
            ],
            "type": "string",
            "description": "Daily export (default): every case updated on one day, with its parties and hearings. Upcoming hearings: every hearing scheduled at every court from the day the file was built through the next 13 days, with the parties of each case (one row per hearing and company or institution party), built every morning, usually ready by 12:00 Romanian time. Both files follow the same rules and recipient terms, and are billed the same.",
            "default": "daily"
          },
          "exportDate": {
            "title": "Export date (optional)",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Romanian calendar day to deliver, as YYYY-MM-DD. Leave empty for the most recently completed day, which is what a daily schedule wants. Each day stays available for 28 days, so a missed day can be requested here, and should be: a case updated only on that day is in no other file. For the upcoming-hearings file, the day it was built; leave empty for the newest (today's, or yesterday's while today's is still being built)."
          },
          "exportFormat": {
            "title": "File format",
            "enum": [
              "csv",
              "jsonl"
            ],
            "type": "string",
            "description": "CSV (default): a zip with one row per company or institution party in each case (and per sole trader in commercial-litigation and bankruptcy cases; private individuals are counted on the row, not listed), separated by ; in UTF-8 so Romanian Excel opens it directly, with the last hearing, its outcome and the next hearing on every row. JSONL: gzipped JSON Lines, one full case per line with every hearing and appeal, for programs.",
            "default": "csv"
          },
          "contactEmail": {
            "title": "Contact email for erasure notices (required for the export)",
            "pattern": "^\\s*[^\\s@,;]+@[^\\s@,;]+\\.[^\\s@,;]+\\s*$",
            "type": "string",
            "description": "Required when Deliver the daily national export is on. An address apnoda can reach you at: it is stored with each delivered file for 13 months and used only to tell you when data in a file you received must be erased, which the recipient terms oblige you to apply within 30 days. Unlike the address below, this one is received and kept by apnoda."
          },
          "notifyEmail": {
            "title": "Email the download link to (optional)",
            "pattern": "^\\s*[^\\s@,;]+@[^\\s@,;]+\\.[^\\s@,;]+(\\s*,\\s*[^\\s@,;]+@[^\\s@,;]+\\.[^\\s@,;]+)*\\s*$",
            "type": "string",
            "description": "Address(es) to email the download link to, comma-separated, at most 20. The mail is sent from your own Apify account through the apify/send-mail Actor (a few cents of platform usage); apnoda never receives or stores this address. On Apify's free plan, mail can only go to your own account's address."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}