{
  "openapi": "3.0.1",
  "info": {
    "title": "Brazil Case Law & Legal Research MCP: STJ, STF Jurisprudência",
    "description": "Legal research MCP server and LLM tool for official Brazilian case law (jurisprudência) from the STJ and STF. Search by legal terms, party, lawyer or company CNPJ; one search returns the newest matching decisions as compact JSON: citation, parties, ementa summary, tese, links. Priced per search.",
    "version": "0.2",
    "x-build-id": "MArTiL0kHqrLOi477"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/siteacs~brazil-case-law-mcp/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-siteacs-brazil-case-law-mcp",
        "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-mcp/runs": {
      "post": {
        "operationId": "runs-sync-siteacs-brazil-case-law-mcp",
        "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-mcp/run-sync": {
      "post": {
        "operationId": "run-sync-siteacs-brazil-case-law-mcp",
        "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": {
          "query": {
            "title": "Query",
            "type": "string",
            "description": "Legal terms in Portuguese (jurisprudência), at most 500 characters. Words are combined with AND; use quotes for a phrase, OR / NOT between terms and parentheses to group. Example: \"dano moral\" bagagem (extravio OR atraso). Optional when \"party\" or \"cnpj\" is set."
          },
          "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, never the decision text; accents and case are ignored. 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 \"query\". CPF numbers are refused. Party searches return no 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 free. 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 left out. 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 \"query\". CNPJ searches return no match counts."
          },
          "court": {
            "title": "Court",
            "enum": [
              "both",
              "STJ",
              "STF"
            ],
            "type": "string",
            "description": "STJ (Superior Tribunal de Justiça) decides federal law; STF (Supremo Tribunal Federal) decides constitutional questions. \"both\" searches the two and shares maxResults between them.",
            "default": "both"
          },
          "decisionType": {
            "title": "Decision type",
            "enum": [
              "acordao",
              "monocratica",
              "both"
            ],
            "type": "string",
            "description": "acordao = collegiate judgments with an ementa, best for citing precedent. monocratica = decisions signed by one minister. both = either.",
            "default": "acordao"
          },
          "dateFrom": {
            "title": "Published from",
            "type": "string",
            "description": "Earliest publication date, format YYYY-MM-DD, e.g. 2025-01-01. Narrows broad queries. Leave empty for no lower limit."
          },
          "dateTo": {
            "title": "Published until",
            "type": "string",
            "description": "Latest publication date, format YYYY-MM-DD, e.g. 2025-12-31. Leave empty for no upper limit."
          },
          "relator": {
            "title": "Reporting minister (relator)",
            "type": "string",
            "description": "Name of the minister who reported the decision, e.g. Nancy Andrighi or Cármen Lúcia. Ministers only. Accents and case are ignored. Leave empty for any relator."
          },
          "caseClass": {
            "title": "Case class",
            "type": "string",
            "description": "Case class abbreviation, 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 decisions",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How many of the newest matching decisions to return: an integer from 1 to 20, e.g. 10 (default); with full text 1 to 5, default 3. A search costs the same for 1 or 20 decisions."
          },
          "includeFullText": {
            "title": "Include full text",
            "type": "boolean",
            "description": "true or false (default false). Adds the full text (inteiro teor) of each decision (up to 60,000 characters each), charged as a search-with-full-text event instead of a search event. The call takes 30-60 s. Leave off to search first, then open a decision's fullTextUrl.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}