{
  "openapi": "3.0.1",
  "info": {
    "title": "DataJud Scraper - Brazil Court Cases & Processos (CNJ API)",
    "description": "Query Brazil's official DataJud API (CNJ) for judicial process data across 91 federal, state, labor, electoral and military courts. Look up by process number, filter by class/court, or pull recent activity, with full movement history.",
    "version": "0.1",
    "x-build-id": "92Y5sZts5mMlaAzJu"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/punkrecordsdata~datajud-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-punkrecordsdata-datajud-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/punkrecordsdata~datajud-scraper/runs": {
      "post": {
        "operationId": "runs-sync-punkrecordsdata-datajud-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/punkrecordsdata~datajud-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-punkrecordsdata-datajud-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",
        "required": [
          "tribunals"
        ],
        "properties": {
          "tribunals": {
            "title": "Tribunals (courts)",
            "type": "array",
            "description": "One or more Brazilian courts to query, by their official DataJud alias.",
            "items": {
              "type": "string",
              "enum": [
                "tst",
                "tse",
                "stj",
                "stm",
                "trf1",
                "trf2",
                "trf3",
                "trf4",
                "trf5",
                "trf6",
                "tjac",
                "tjal",
                "tjam",
                "tjap",
                "tjba",
                "tjce",
                "tjdft",
                "tjes",
                "tjgo",
                "tjma",
                "tjmg",
                "tjms",
                "tjmt",
                "tjpa",
                "tjpb",
                "tjpe",
                "tjpi",
                "tjpr",
                "tjrj",
                "tjrn",
                "tjro",
                "tjrr",
                "tjrs",
                "tjsc",
                "tjse",
                "tjsp",
                "tjto",
                "trt1",
                "trt2",
                "trt3",
                "trt4",
                "trt5",
                "trt6",
                "trt7",
                "trt8",
                "trt9",
                "trt10",
                "trt11",
                "trt12",
                "trt13",
                "trt14",
                "trt15",
                "trt16",
                "trt17",
                "trt18",
                "trt19",
                "trt20",
                "trt21",
                "trt22",
                "trt23",
                "trt24",
                "tre-ac",
                "tre-al",
                "tre-am",
                "tre-ap",
                "tre-ba",
                "tre-ce",
                "tre-dft",
                "tre-es",
                "tre-go",
                "tre-ma",
                "tre-mg",
                "tre-ms",
                "tre-mt",
                "tre-pa",
                "tre-pb",
                "tre-pe",
                "tre-pi",
                "tre-pr",
                "tre-rj",
                "tre-rn",
                "tre-ro",
                "tre-rr",
                "tre-rs",
                "tre-sc",
                "tre-se",
                "tre-sp",
                "tre-to",
                "tjmmg",
                "tjmrs",
                "tjmsp"
              ],
              "enumTitles": [
                "TST",
                "TSE",
                "STJ",
                "STM",
                "TRF1",
                "TRF2",
                "TRF3",
                "TRF4",
                "TRF5",
                "TRF6",
                "TJAC",
                "TJAL",
                "TJAM",
                "TJAP",
                "TJBA",
                "TJCE",
                "TJDFT",
                "TJES",
                "TJGO",
                "TJMA",
                "TJMG",
                "TJMS",
                "TJMT",
                "TJPA",
                "TJPB",
                "TJPE",
                "TJPI",
                "TJPR",
                "TJRJ",
                "TJRN",
                "TJRO",
                "TJRR",
                "TJRS",
                "TJSC",
                "TJSE",
                "TJSP",
                "TJTO",
                "TRT1",
                "TRT2",
                "TRT3",
                "TRT4",
                "TRT5",
                "TRT6",
                "TRT7",
                "TRT8",
                "TRT9",
                "TRT10",
                "TRT11",
                "TRT12",
                "TRT13",
                "TRT14",
                "TRT15",
                "TRT16",
                "TRT17",
                "TRT18",
                "TRT19",
                "TRT20",
                "TRT21",
                "TRT22",
                "TRT23",
                "TRT24",
                "TRE-AC",
                "TRE-AL",
                "TRE-AM",
                "TRE-AP",
                "TRE-BA",
                "TRE-CE",
                "TRE-DFT",
                "TRE-ES",
                "TRE-GO",
                "TRE-MA",
                "TRE-MG",
                "TRE-MS",
                "TRE-MT",
                "TRE-PA",
                "TRE-PB",
                "TRE-PE",
                "TRE-PI",
                "TRE-PR",
                "TRE-RJ",
                "TRE-RN",
                "TRE-RO",
                "TRE-RR",
                "TRE-RS",
                "TRE-SC",
                "TRE-SE",
                "TRE-SP",
                "TRE-TO",
                "TJMMG",
                "TJMRS",
                "TJMSP"
              ]
            }
          },
          "numerosProcesso": {
            "title": "Process numbers (optional)",
            "type": "array",
            "description": "Exact CNJ process numbers to look up (20-digit unique numbering, digits only). Searched in every selected tribunal. Leave empty to use class/court filters or pull recent activity instead.",
            "items": {
              "type": "string"
            }
          },
          "classeCodigo": {
            "title": "Filter by Classe Processual code (optional)",
            "type": "integer",
            "description": "CNJ procedural class code (e.g. 1116 = Execução Fiscal). See the Glossário de Dados on the DataJud wiki for the full code table."
          },
          "orgaoJulgadorCodigo": {
            "title": "Filter by Órgão Julgador code (optional)",
            "type": "integer",
            "description": "Code of the specific judging unit/chamber within the tribunal."
          },
          "maxItemsPerTribunal": {
            "title": "Max processes per tribunal",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum number of process records to collect from each selected tribunal.",
            "default": 100
          },
          "includeMovements": {
            "title": "Include movement history",
            "type": "boolean",
            "description": "Also emit one record per procedural movement (movimento) in each process's timeline. Billed as a separate event.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}