{
  "openapi": "3.0.1",
  "info": {
    "title": "Preço Público Comparável — CATMAT/CATSER",
    "description": "Pesquisa de preços públicos por CATMAT, CATSER ou descrição, direto do Compras.gov.br com conferência no PNCP. Cesta por código e unidade com média, mediana, menor valor e outliers, com link da fonte em cada preço. Você paga só por preços e cestas válidos.",
    "version": "1.0",
    "x-build-id": "hepQlHyVcKSYU7SS6"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/kman-br~preco-publico-comparavel/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-kman-br-preco-publico-comparavel",
        "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/kman-br~preco-publico-comparavel/runs": {
      "post": {
        "operationId": "runs-sync-kman-br-preco-publico-comparavel",
        "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/kman-br~preco-publico-comparavel/run-sync": {
      "post": {
        "operationId": "run-sync-kman-br-preco-publico-comparavel",
        "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": {
          "catmat": {
            "title": "Código CATMAT",
            "pattern": "^([0-9]{1,9})?$",
            "type": "string",
            "description": "Código de material. Limpe este campo para pesquisar apenas por descrição ou usar CATSER.",
            "default": "269520"
          },
          "catser": {
            "title": "Código CATSER",
            "pattern": "^([0-9]{1,9})?$",
            "type": "string",
            "description": "Código de serviço. Não combine com CATMAT.",
            "default": ""
          },
          "descricao": {
            "title": "Descrição para buscar no catálogo",
            "maxLength": 300,
            "type": "string",
            "description": "Quando não há código, busca termos no catálogo oficial. Códigos encontrados são cestas separadas; confira a especificação.",
            "default": ""
          },
          "tipoCatalogo": {
            "title": "Catálogo da descrição",
            "enum": [
              "material",
              "servico"
            ],
            "type": "string",
            "description": "Para busca textual: CATMAT (material) ou CATSER (servico). Um código CATSER determina o tipo automaticamente.",
            "default": "material"
          },
          "ufs": {
            "title": "UFs",
            "maxItems": 27,
            "uniqueItems": true,
            "type": "array",
            "description": "Vazio inclui todas as UFs. A UF ausente na fonte não é inferida.",
            "items": {
              "type": "string",
              "enum": [
                "AC",
                "AL",
                "AP",
                "AM",
                "BA",
                "CE",
                "DF",
                "ES",
                "GO",
                "MA",
                "MT",
                "MS",
                "MG",
                "PA",
                "PB",
                "PR",
                "PE",
                "PI",
                "RJ",
                "RN",
                "RS",
                "RO",
                "RR",
                "SC",
                "SP",
                "SE",
                "TO"
              ]
            },
            "default": []
          },
          "periodoMeses": {
            "title": "Período em meses",
            "minimum": 1,
            "maximum": 120,
            "type": "integer",
            "description": "Janela anterior à data de referência, inclusive.",
            "default": 12
          },
          "dataReferencia": {
            "title": "Data de referência",
            "pattern": "^([0-9]{4}-[0-9]{2}-[0-9]{2})?$",
            "type": "string",
            "description": "AAAA-MM-DD. O exemplo fixa 2026-10-13 para evitar que envelheça. Vazio usa hoje em UTC−03:00.",
            "default": "2026-10-13"
          },
          "minPrecos": {
            "title": "Mínimo de preços",
            "minimum": 3,
            "maximum": 100,
            "type": "integer",
            "description": "Mínimo por cesta de mesmo código e unidade. IN 65: indicador quantitativo, sem certificação jurídica.",
            "default": 3
          },
          "removerOutliers": {
            "title": "Excluir outliers das estatísticas",
            "type": "boolean",
            "description": "IQR 1,5 com quartis interpolados; requer pelo menos quatro preços. As linhas continuam visíveis e marcadas.",
            "default": true
          },
          "maxItems": {
            "title": "Máximo de preços",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Limite de linhas de preço; resumos e diagnósticos são adicionais. Limitado também por maxPages.",
            "default": 30
          },
          "incluirPncp": {
            "title": "Conferir resultados no PNCP",
            "type": "boolean",
            "description": "Rastreia compras encontradas ao PNCP e lê resultados homologados. Uma compra corroborada não é contada duas vezes.",
            "default": true
          },
          "maxComprasPncp": {
            "title": "Máximo de compras no PNCP",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Limita a descoberta e conferência no PNCP por execução.",
            "default": 3
          },
          "maxCatalogos": {
            "title": "Máximo de códigos na busca textual",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Descrições podem corresponder a vários códigos. Nunca agrega códigos diferentes numa cesta.",
            "default": 3
          },
          "maxPages": {
            "title": "Máximo de páginas por consulta",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Busca e preços têm paginação limitada; interrupção é registrada e impede avanço incremental.",
            "default": 10
          },
          "incremental": {
            "title": "Emitir só quando a fonte muda",
            "type": "boolean",
            "description": "false sempre entrega preços. true pula a entrega após conferir a primeira página se contagem e hash não mudaram, por até sete dias. Usa KV nomeado.",
            "default": false
          },
          "timeoutSecs": {
            "title": "Timeout por requisição",
            "minimum": 1,
            "maximum": 120,
            "type": "integer",
            "description": "Inclui a leitura da resposta. Retentativas limitadas para 429, 5xx e falhas de conexão, respeitando Retry-After.",
            "default": 30
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}