RAGJur Alertas API

Alertas jurimétricos

GitHub OpenAPI

Operations 4

GET /api/v1/alertas Lista alertas jurimétricos (até 200) #
POST /api/v1/alertas Cria alerta (webhook HTTPS ou e-mail) #
DELETE /api/v1/alertas Remove alerta #
POST /api/v1/alertas/check Executa a checagem de todos os alertas (cron) #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/ragjur-ai:ragjur-ai-alertas-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

ragjur-ai-alertas-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: RAGJur Alertas API
  version: 1.3.0
  summary: Busca jurisprudencial e jurimetria sobre 114 milhões de julgados de 90+ tribunais brasileiros.
  description: 'API REST da RAGJur (Beans Tech Inova Simples (I.S.), CNPJ 64.160.205/0001-17).


    - **Busca**: BM25 sobre ementas/inteiro teor com analisador jurídico pt-BR; modo híbrido com kNN (`multilingual-e5-large-instruct`, 1024d) + rerank.

    - **Jurimetria**: taxa de provimento por tema/turma/relator, evolução, divergência (χ²), mudança de entendimento (CUSUM), predição multi-fator, intervalos de Wilson, decaimento temporal.

    - **IA**: verificação anti-alucinação de citações, chat com fontes e geração de peças fundamentadas em precedentes reais.


    Todas as rotas exigem `x-api-key` (exceto `/health` e `/openapi.json`). Também aceitamos tokens OAuth 2.1 emitidos pelo servidor MCP (`https://mcp.ragjur.ai`) para integrações Claude/ChatGPT/Copilot — ver `securitySchemes.OAuth2`.


    Convenções: `fonte` identifica a base (`GET /filtros`); sem `fonte`/`tribunal` os endpoints jurimétricos usam `tst_jurisprudencia`. Respostas em JSON UTF-8; percentuais em 0–100.'
  termsOfService: https://ragjur.ai/termos
  contact:
    name: Suporte RAGJur
    email: suporte@ragjur.ai
    url: https://ragjur.ai/suporte
  license:
    name: Proprietária — ver Termos de Uso
    url: https://ragjur.ai/termos
  x-logo:
    url: https://ragjur.ai/logo-512.png
    altText: RAGJur
servers:
- url: https://api.ragjur.ai
  description: Produção
- url: https://api.ragjur.com.br
  description: Legado (redireciona 301 para api.ragjur.ai)
security:
- ApiKeyAuth: []
- OAuth2:
  - ragjur:read
tags:
- name: Alertas
  description: Alertas jurimétricos
paths:
  /api/v1/alertas:
    get:
      tags:
      - Alertas
      operationId: listarAlertas
      summary: Lista alertas jurimétricos (até 200)
      responses:
        '200':
          description: Alertas
          content:
            application/json:
              schema:
                type: object
                properties:
                  total:
                    type: integer
                  alertas:
                    type: array
                    items:
                      $ref: '#/components/schemas/Alerta'
        '401':
          description: Sem `x-api-key` ou chave inválida
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Erro'
              example:
                error: Missing x-api-key header
        '403':
          description: Chave desativada
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Erro'
              example:
                error: API key is deactivated. Contact support.
        '429':
          description: Rate limit excedido (janela deslizante por chave). Ver `Retry-After`, `X-RateLimit-Limit`, `X-RateLimit-Remaining`.
          headers:
            Retry-After:
              schema:
                type: integer
              description: Segundos até a próxima janela
            X-RateLimit-Limit:
              schema:
                type: integer
            X-RateLimit-Remaining:
              schema:
                type: integer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Erro'
              example:
                error: Rate limit exceeded
        '500':
          description: Erro interno
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Erro'
              example:
                error: Erro interno
    post:
      tags:
      - Alertas
      operationId: criarAlerta
      summary: Cria alerta (webhook HTTPS ou e-mail)
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AlertaInput'
            example:
              tipo: taxa_queda
              fonte: stj_integras
              busca: dano moral negativação indevida
              threshold: 5
              webhook_url: https://exemplo.com/hooks/ragjur
      responses:
        '201':
          description: Criado
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Alerta'
        '400':
          description: Parâmetro obrigatório ausente ou inválido
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Erro'
              example:
                error: Busca deve ter ao menos 3 caracteres
        '401':
          description: Sem `x-api-key` ou chave inválida
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Erro'
              example:
                error: Missing x-api-key header
        '403':
          description: Chave desativada
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Erro'
              example:
                error: API key is deactivated. Contact support.
        '429':
          description: Rate limit excedido (janela deslizante por chave). Ver `Retry-After`, `X-RateLimit-Limit`, `X-RateLimit-Remaining`.
          headers:
            Retry-After:
              schema:
                type: integer
              description: Segundos até a próxima janela
            X-RateLimit-Limit:
              schema:
                type: integer
            X-RateLimit-Remaining:
              schema:
                type: integer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Erro'
              example:
                error: Rate limit exceeded
        '500':
          description: Erro interno
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Erro'
              example:
                error: Erro interno
    delete:
      tags:
      - Alertas
      operationId: removerAlerta
      summary: Remove alerta
      parameters:
      - name: id
        in: query
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Removido
          content:
            application/json:
              schema:
                type: object
                properties:
                  ok:
                    type: boolean
                additionalProperties: true
        '400':
          description: Parâmetro obrigatório ausente ou inválido
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Erro'
              example:
                error: Busca deve ter ao menos 3 caracteres
        '401':
          description: Sem `x-api-key` ou chave inválida
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Erro'
              example:
                error: Missing x-api-key header
        '403':
          description: Chave desativada
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Erro'
              example:
                error: API key is deactivated. Contact support.
        '429':
          description: Rate limit excedido (janela deslizante por chave). Ver `Retry-After`, `X-RateLimit-Limit`, `X-RateLimit-Remaining`.
          headers:
            Retry-After:
              schema:
                type: integer
              description: Segundos até a próxima janela
            X-RateLimit-Limit:
              schema:
                type: integer
            X-RateLimit-Remaining:
              schema:
                type: integer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Erro'
              example:
                error: Rate limit exceeded
        '500':
          description: Erro interno
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Erro'
              example:
                error: Erro interno
  /api/v1/alertas/check:
    post:
      tags:
      - Alertas
      operationId: checarAlertas
      summary: Executa a checagem de todos os alertas (cron)
      responses:
        '200':
          description: Resultado
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        '401':
          description: Sem `x-api-key` ou chave inválida
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Erro'
              example:
                error: Missing x-api-key header
        '403':
          description: Chave desativada
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Erro'
              example:
                error: API key is deactivated. Contact support.
        '429':
          description: Rate limit excedido (janela deslizante por chave). Ver `Retry-After`, `X-RateLimit-Limit`, `X-RateLimit-Remaining`.
          headers:
            Retry-After:
              schema:
                type: integer
              description: Segundos até a próxima janela
            X-RateLimit-Limit:
              schema:
                type: integer
            X-RateLimit-Remaining:
              schema:
                type: integer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Erro'
              example:
                error: Rate limit exceeded
        '500':
          description: Erro interno
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Erro'
              example:
                error: Erro interno
components:
  schemas:
    AlertaInput:
      type: object
      required:
      - tipo
      - fonte
      properties:
        tipo:
          type: string
          enum:
          - taxa_queda
          - taxa_alta
          - nova_decisao
          - mudanca_entendimento
        fonte:
          type: string
        busca:
          type: string
        turma:
          type: string
        threshold:
          type: number
          description: Obrigatório para `taxa_queda`/`taxa_alta` (pontos percentuais)
        webhook_url:
          type: string
          format: uri
          description: HTTPS público (hosts privados rejeitados)
        email:
          type: string
          format: email
        descricao:
          type: string
    Erro:
      type: object
      required:
      - error
      properties:
        error:
          type: string
      additionalProperties: true
    Alerta:
      allOf:
      - $ref: '#/components/schemas/AlertaInput'
      - type: object
        properties:
          id:
            type: string
          criado_em:
            type: string
            format: date-time
          ativo:
            type: boolean
        additionalProperties: true
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: Chave `rj_…` criada no painel (https://app.ragjur.ai/painel/chaves). Nunca exponha em front-end.
    OAuth2:
      type: oauth2
      description: OAuth 2.1 (PKCE S256, DCR RFC 7591, metadata RFC 8414/9728) do servidor MCP. Escopo único `ragjur:read`.
      flows:
        authorizationCode:
          authorizationUrl: https://mcp.ragjur.ai/oauth/authorize
          tokenUrl: https://mcp.ragjur.ai/oauth/token
          refreshUrl: https://mcp.ragjur.ai/oauth/token
          scopes:
            ragjur:read: Busca jurisprudencial e jurimetria (somente leitura)
externalDocs:
  description: Documentação para desenvolvedores
  url: https://docs.ragjur.ai