{
  "openapi": "3.0.1",
  "info": {
    "title": "Brazil Public Tenders Scraper (PNCP) — Licitações e Editais",
    "description": "Brazilian government tenders (licitações, pregão eletrônico, dispensa, concorrência, editais) from the official PNCP API. Filter by keyword, state (UF), procurement type, value and agency CNPJ; daily only-new alerts for B2G sales. Pay only per tender delivered.",
    "version": "1.0",
    "x-build-id": "mro96iUo3gYLGsu1J"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/joao_crevellari~licitacoes-pncp/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-joao_crevellari-licitacoes-pncp",
        "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/joao_crevellari~licitacoes-pncp/runs": {
      "post": {
        "operationId": "runs-sync-joao_crevellari-licitacoes-pncp",
        "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/joao_crevellari~licitacoes-pncp/run-sync": {
      "post": {
        "operationId": "run-sync-joao_crevellari-licitacoes-pncp",
        "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": "Palavras-chave / Keywords",
            "type": "array",
            "description": "Returns tenders whose object or agency contains ANY of these words (accent- and case-insensitive), e.g. [\"notebook\",\"software\"]. Empty = all. / Entrega licitações cujo objeto ou órgão contenha QUALQUER uma destas palavras (acentos e maiúsculas não importam). Vazio = todas.",
            "items": {
              "type": "string"
            }
          },
          "excludeKeywords": {
            "title": "Excluir palavras / Exclude keywords",
            "type": "array",
            "description": "Descarta licitações que contenham qualquer uma destas palavras. / Drops tenders containing any of these words.",
            "items": {
              "type": "string"
            }
          },
          "status": {
            "title": "Situação / Status",
            "enum": [
              "open",
              "all"
            ],
            "type": "string",
            "description": "Open = only tenders still receiving proposals. All = every tender published in the period. / Abertas = só as que ainda recebem propostas. Todas = tudo o que foi publicado no período.",
            "default": "open"
          },
          "publishedWithinDays": {
            "title": "Publicadas nos últimos N dias / Published in the last N days",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "1 = só hoje (ideal para alerta diário agendado). Máximo 30. / 1 = today only (best for a daily schedule). Max 30.",
            "default": 1
          },
          "states": {
            "title": "Estados (UF) / States",
            "type": "array",
            "description": "Two-letter Brazilian state codes (UF), e.g. [\"SP\",\"RJ\"]. Empty = all of Brazil (slower: 10–15 min). / Siglas das UFs. Vazio = Brasil inteiro (mais lento).",
            "items": {
              "type": "string",
              "enum": [
                "AC",
                "AL",
                "AM",
                "AP",
                "BA",
                "CE",
                "DF",
                "ES",
                "GO",
                "MA",
                "MG",
                "MS",
                "MT",
                "PA",
                "PB",
                "PE",
                "PI",
                "PR",
                "RJ",
                "RN",
                "RO",
                "RR",
                "RS",
                "SC",
                "SE",
                "SP",
                "TO"
              ]
            }
          },
          "modalities": {
            "title": "Modalidades / Procurement types",
            "type": "array",
            "description": "Procurement type codes (strings). Most used: \"6\" = Pregão Eletrônico, \"8\" = Dispensa de Licitação, \"4\" = Concorrência Eletrônica, \"9\" = Inexigibilidade, \"12\" = Credenciamento. Empty = all 13 types. / Códigos das modalidades. Vazio = todas.",
            "items": {
              "type": "string",
              "enum": [
                "1",
                "2",
                "3",
                "4",
                "5",
                "6",
                "7",
                "8",
                "9",
                "10",
                "11",
                "12",
                "13"
              ],
              "enumTitles": [
                "Leilão - Eletrônico",
                "Diálogo Competitivo",
                "Concurso",
                "Concorrência - Eletrônica",
                "Concorrência - Presencial",
                "Pregão - Eletrônico",
                "Pregão - Presencial",
                "Dispensa de Licitação",
                "Inexigibilidade",
                "Manifestação de Interesse",
                "Pré-qualificação",
                "Credenciamento",
                "Leilão - Presencial"
              ]
            }
          },
          "spheres": {
            "title": "Esfera / Government level",
            "type": "array",
            "description": "Federal, state, municipal or Federal District. Empty = all. / Federal, estadual, municipal ou distrital. Vazio = todas.",
            "items": {
              "type": "string",
              "enum": [
                "F",
                "E",
                "M",
                "D"
              ],
              "enumTitles": [
                "Federal",
                "Estadual / State",
                "Municipal",
                "Distrital"
              ]
            }
          },
          "agencyCnpj": {
            "title": "CNPJ do órgão / Agency CNPJ",
            "type": "string",
            "description": "Opcional: só licitações deste órgão. / Optional: only this agency."
          },
          "minValue": {
            "title": "Valor estimado mínimo (R$) / Min estimated value",
            "minimum": 0,
            "type": "integer",
            "description": "Minimum estimated value in BRL. / Valor estimado mínimo, em reais."
          },
          "maxValue": {
            "title": "Valor estimado máximo (R$) / Max estimated value",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum estimated value in BRL. / Valor estimado máximo, em reais."
          },
          "onlyNew": {
            "title": "Só novidades / Only new",
            "type": "boolean",
            "description": "Não repete licitações já entregues em execuções anteriores com o mesmo nome de monitor. / Skips tenders delivered in previous runs with the same monitor name.",
            "default": false
          },
          "monitorName": {
            "title": "Nome do monitor / Monitor name",
            "type": "string",
            "description": "Use um nome por alerta quando tiver vários agendamentos. / One name per alert.",
            "default": "padrao"
          },
          "maxResults": {
            "title": "Máximo de resultados / Max results",
            "minimum": 1,
            "type": "integer",
            "description": "Stop after N tenders. You only pay for delivered tenders (US$ 0.003 each). / Para depois de N licitações. Você só paga pelas entregues.",
            "default": 100
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}