{
  "openapi": "3.0.1",
  "info": {
    "title": "Licitações Brasil | PNCP Public Tenders",
    "description": "Busque licitações por palavra-chave, órgão, UF, modalidade e publicação. Search Brazilian tenders from the official public PNCP API.",
    "version": "1.0",
    "x-build-id": "Gx4o0bT9gJhPmUmLa"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/prized_rainstorm~licitacoes-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-prized_rainstorm-licitacoes-monitor",
        "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/prized_rainstorm~licitacoes-monitor/runs": {
      "post": {
        "operationId": "runs-sync-prized_rainstorm-licitacoes-monitor",
        "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/prized_rainstorm~licitacoes-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-prized_rainstorm-licitacoes-monitor",
        "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": {
          "startDate": {
            "title": "Data inicial / Start date",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Obrigatória em published/updated, YYYY-MM-DD; ignorada em open. Required in published/updated, ignored in open."
          },
          "endDate": {
            "title": "Data final / End date",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Obrigatória YYYY-MM-DD; janela published/updated de até 31 dias; em open enviada como dataFinal ao PNCP. Required; published/updated window up to 31 days; open passes dataFinal to PNCP."
          },
          "keywords": {
            "title": "Palavras-chave / Keywords",
            "maxItems": 20,
            "type": "array",
            "description": "OU entre termos; busca literal sem acentos em objeto e informação complementar. OR across terms; accent-insensitive literal substring search in object and additional information.",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            },
            "default": []
          },
          "agencyName": {
            "title": "Nome do órgão / Agency name",
            "minLength": 1,
            "maxLength": 200,
            "type": "string",
            "description": "Trecho do nome, sem diferenciar acentos/maiúsculas. Substring of agency name, case/accent insensitive."
          },
          "agencyCnpj": {
            "title": "CNPJ do órgão / Agency CNPJ",
            "pattern": "^(\\d{14}|\\d{2}\\.\\d{3}\\.\\d{3}/\\d{4}-\\d{2})$",
            "type": "string",
            "description": "14 dígitos ou formato pontuado; filtro PNCP. 14 digits or formatted CNPJ; PNCP filter."
          },
          "state": {
            "title": "UF / State",
            "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"
            ],
            "type": "string",
            "description": "Opcional; uma UF. Optional; one Brazilian state."
          },
          "modalities": {
            "title": "Modalidades PNCP / PNCP modalities",
            "minItems": 1,
            "maxItems": 19,
            "type": "array",
            "description": "IDs ativos / Active IDs (2026-10-15): 1 = Leilão - Eletrônico; 2 = Diálogo Competitivo; 3 = Concurso; 4 = Concorrência - Eletrônica; 5 = Concorrência - Presencial; 6 = Pregão - Eletrônico; 7 = Pregão - Presencial; 8 = Dispensa; 9 = Inexigibilidade; 10 = Manifestação de Interesse; 11 = Pré-qualificação; 12 = Credenciamento; 13 = Leilão - Presencial; 14 = Inaplicabilidade da Licitação; 15 = Chamada pública; 16 = Concorrência – Eletrônica Internacional; 17 = Concorrência – Presencial Internacional; 18 = Pregão – Eletrônico Internacional; 19 = Pregão – Presencial Internacional. Padrão / Default: [6]. Validação de IDs ativos no runtime / Active IDs validated at runtime.",
            "items": {
              "type": "integer",
              "minimum": 1,
              "maximum": 19
            },
            "default": [
              6
            ]
          },
          "maxResults": {
            "title": "Máximo de resultados / Maximum results",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Teto de licitações únicas correspondentes. Maximum unique matching tenders.",
            "default": 100
          },
          "maxRequests": {
            "title": "Máximo de páginas / Maximum pages",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Orçamento global de páginas (50 registros/página). Retry HTTP pode gerar até 3 tentativas por página. Global page budget, 50 records/page, up to 3 HTTP attempts/page.",
            "default": 20
          },
          "mode": {
            "title": "Modo / Mode",
            "enum": [
              "published",
              "updated",
              "open"
            ],
            "type": "string",
            "description": "published: publicação; updated: atualização global; open: propostas abertas até dataFinal, sem filtro de publicação. Publication / global update / currently open proposals through dataFinal, without publication filtering.",
            "default": "published"
          },
          "stateStoreName": {
            "title": "Estado entre execuções / Cross-run state",
            "pattern": "^[a-zA-Z0-9][a-zA-Z0-9-]{0,62}$",
            "type": "string",
            "description": "Opcional: store nomeado estável para suprimir versões entregues; omitir desliga estado. Use um nome por monitor, sem execuções concorrentes. Optional stable named store for delivered versions; omit to disable. Use one name per monitor, no concurrent runs."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}