{
  "openapi": "3.0.1",
  "info": {
    "title": "Licitações PNCP Monitor – Brazil Public Tenders",
    "description": "Monitor licitações públicas do PNCP: pregão eletrônico, dispensa, concorrência. Brazil public procurement tenders from the official PNCP API, filtered by keywords, UF, município, modalidade and value. Schedule it and get only tenders new since your last run. $0.01 per new tender.",
    "version": "0.1",
    "x-build-id": "N9Vvam988mTSg4UOY"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/wlubrigati~pncp-licitacoes-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-wlubrigati-pncp-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/wlubrigati~pncp-licitacoes-monitor/runs": {
      "post": {
        "operationId": "runs-sync-wlubrigati-pncp-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/wlubrigati~pncp-licitacoes-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-wlubrigati-pncp-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": {
          "mode": {
            "title": "Mode",
            "enum": [
              "open",
              "published"
            ],
            "type": "string",
            "description": "'open' = tenders currently accepting proposals (closing within the window below). 'published' = tenders published in the last N days (any status).",
            "default": "open"
          },
          "keywords": {
            "title": "Keywords (any match)",
            "type": "array",
            "description": "Match if ANY keyword appears in the tender object/description. Accent- and case-insensitive. Leave empty for all.",
            "items": {
              "type": "string"
            }
          },
          "excludeKeywords": {
            "title": "Exclude keywords",
            "type": "array",
            "description": "Drop tenders containing any of these words.",
            "items": {
              "type": "string"
            }
          },
          "ufs": {
            "title": "States (UF)",
            "type": "array",
            "description": "Two-letter state codes, e.g. SP, SC. Empty = all of Brazil (slower).",
            "items": {
              "type": "string"
            }
          },
          "municipiosIbge": {
            "title": "Municipality IBGE codes",
            "type": "array",
            "description": "Optional 7-digit IBGE codes (e.g. 4209102 for Joinville).",
            "items": {
              "type": "string"
            }
          },
          "modalidades": {
            "title": "Modalidades",
            "type": "array",
            "description": "PNCP modality codes. Empty = all. 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.",
            "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",
                "Inexigibilidade",
                "Manifestação de interesse",
                "Pré-qualificação",
                "Credenciamento",
                "Leilão presencial"
              ]
            }
          },
          "minValue": {
            "title": "Min estimated value (R$)",
            "minimum": 0,
            "type": "integer",
            "description": "Keep only tenders with estimated value at or above this (R$). Tenders without a value are kept unless 'Require estimated value' is on."
          },
          "maxValue": {
            "title": "Max estimated value (R$)",
            "minimum": 0,
            "type": "integer",
            "description": "Keep only tenders with estimated value at or below this (R$)."
          },
          "requireValue": {
            "title": "Require estimated value",
            "type": "boolean",
            "description": "Drop tenders with no/secret estimated value when a value range is set.",
            "default": false
          },
          "closingWithinDays": {
            "title": "Open mode: closing within (days)",
            "minimum": 1,
            "maximum": 730,
            "type": "integer",
            "description": "Open mode: tenders whose proposal deadline is within this many days from today.",
            "default": 60
          },
          "publishedWithinDays": {
            "title": "Published mode: published in the last (days)",
            "minimum": 1,
            "maximum": 90,
            "type": "integer",
            "description": "Published mode: look back this many days.",
            "default": 7
          },
          "onlyNew": {
            "title": "Only new since last run",
            "type": "boolean",
            "description": "Remember what was already delivered (per monitor ID) and output only new tenders. You pay only for new ones.",
            "default": true
          },
          "monitorId": {
            "title": "Monitor ID",
            "type": "string",
            "description": "Name your monitor to keep separate 'already seen' memories for different searches.",
            "default": "default"
          },
          "maxItems": {
            "title": "Max results",
            "minimum": 1,
            "maximum": 50000,
            "type": "integer",
            "description": "Maximum tenders to output (and charge) in this run. Default 1000; the form is prefilled with 10, so a first test costs $0.10 or less. Raise it (e.g. 100–1000) for real monitors.",
            "default": 1000
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}