{
  "openapi": "3.0.1",
  "info": {
    "title": "Brazil Court Decisions & Case Law (STJ, STF Jurisprudência)",
    "description": "Search Brazilian court decisions (jurisprudência, acórdãos) from the STJ and STF, the superior courts (tribunal superior), by keyword, party, lawyer or company CNPJ. Get ementa, relator, parties, dates, legislation cited and inteiro teor, from the courts' official search services.",
    "version": "0.2",
    "x-build-id": "SE2iEpXHrE0wkRKCf"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/siteacs~brazil-case-law/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-siteacs-brazil-case-law",
        "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/siteacs~brazil-case-law/runs": {
      "post": {
        "operationId": "runs-sync-siteacs-brazil-case-law",
        "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/siteacs~brazil-case-law/run-sync": {
      "post": {
        "operationId": "run-sync-siteacs-brazil-case-law",
        "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": {
          "keywords": {
            "title": "Keywords",
            "type": "string",
            "description": "Legal terms in Portuguese (jurisprudência), at most 500 characters. Words are combined with AND; use quotes for a phrase (\"dano moral\"), OR / NOT between terms, and parentheses to group. Example: \"dano moral\" bagagem (extravio OR avaria). Optional when \"party\" or \"cnpj\" is set. STF searches ementa, indexing, thesis, legislation and observation fields and, for monocratic decisions, the decision text; STJ searches the fields SCON searches by default, party index included."
          },
          "party": {
            "title": "Party or lawyer (parte ou advogado)",
            "type": "string",
            "description": "Only decisions where this name is listed as a party or lawyer, e.g. Banco do Brasil, Petrobras, INSS or a lawyer's name (3 to 200 characters). Matched as a phrase against each court's own party list (STF \"Partes\" field, STJ party index); accents and case are ignored. A longer name containing the phrase also matches. A trailing S.A., S/A, SA, Ltda, ME, EPP or EIRELI is dropped and \"-\" is read as a space; a company form mid-name ends the name (Petróleo Brasileiro S.A. - Petrobras searches Petróleo Brasileiro). Works alone or with keywords. CPF numbers are refused. Party searches return decisions, not match counts."
          },
          "cnpj": {
            "title": "Company CNPJ (pesquisa por CNPJ)",
            "type": "string",
            "description": "Only decisions about this company: its registered name (razão social, and its trade name when it names the company) in the party list, or the CNPJ printed in the decision text. Formatted (00.000.000/0001-91) or 14 digits, with valid check digits. The name is looked up in a free public CNPJ registry (BrasilAPI, falling back to Minha Receita); only the number is sent. Natural persons with a CNPJ (empresário individual, MEI, produtor rural and the other pessoa física legal natures, or any record without a legal nature) are refused, as are unknown CNPJs and searches while the registries are down, all without charge. The registered name is searched with its company form (BANCO DO BRASIL S.A., S/A, SA); rows whose party list names a different company with a similar name are dropped and not charged. STJ rows without a party list (monocratic decisions, acórdãos without full text) are not verified. Not together with \"party\"; works alone or with keywords. CNPJ searches return decisions, not match counts."
          },
          "court": {
            "title": "Court",
            "enum": [
              "both",
              "STJ",
              "STF"
            ],
            "type": "string",
            "description": "Which court to search: STJ, STF or both (the default). Example: STJ.",
            "default": "both"
          },
          "decisionType": {
            "title": "Decision type",
            "enum": [
              "acordao",
              "monocratica",
              "both"
            ],
            "type": "string",
            "description": "Acórdãos are collegiate judgments with an ementa; monocratic decisions are signed by one minister. Broad monocratic searches at the STJ can time out: add a date range or specific terms.",
            "default": "acordao"
          },
          "dateType": {
            "title": "Date filter applies to",
            "enum": [
              "publication",
              "judgment"
            ],
            "type": "string",
            "description": "Whether the date range below filters by publication date or judgment date. STJ monocratic decisions have a publication date only.",
            "default": "publication"
          },
          "dateFrom": {
            "title": "From date",
            "type": "string",
            "description": "Earliest date, format YYYY-MM-DD, e.g. 2025-01-01. Narrows broad searches. Leave empty for no lower limit."
          },
          "dateTo": {
            "title": "To date",
            "type": "string",
            "description": "Latest date, format YYYY-MM-DD, e.g. 2025-12-31. Leave empty for no upper limit."
          },
          "relator": {
            "title": "Relator (reporting minister)",
            "type": "string",
            "description": "Name of the minister who reported the decision (relator), e.g. Nancy Andrighi or Cármen Lúcia. Accents and case are ignored. Leave empty for any relator."
          },
          "orgaoJulgador": {
            "title": "Court division (órgão julgador)",
            "type": "string",
            "description": "E.g. Terceira Turma, Segunda Seção, Corte Especial (STJ) or Primeira Turma, Tribunal Pleno (STF). Set \"court\" too: division names differ between the courts, and STF monocratic decisions have no division."
          },
          "caseClass": {
            "title": "Case class",
            "type": "string",
            "description": "Abbreviation of the case class, letters and spaces only, e.g. REsp, AgInt no AREsp, HC (STJ) or RE, ARE, ADI (STF). Leave empty for any class."
          },
          "maxResults": {
            "title": "Maximum results",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Maximum number of decisions to save in total, 1 to 10,000, e.g. 50 (default). Each saved decision is charged $0.002. With several courts or decision types the limit is shared between them.",
            "default": 50
          },
          "includeFullText": {
            "title": "Include full text",
            "type": "boolean",
            "description": "true or false (default false). Adds the full text (inteiro teor) of each decision at no extra charge. For STJ acórdãos the actor reads the official PDF, which adds a few seconds per decision.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Not needed: the courts' sites answer datacenter IPs. Turn it on only if requests get blocked.",
            "default": {
              "useApifyProxy": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}