{
  "openapi": "3.0.1",
  "info": {
    "title": "Brazil Public Tenders Feed - Licitações PNCP (no key)",
    "description": "New Brazilian government tenders (licitações: pregão, concorrência, dispensa, leilão) and signed public contracts from the official PNCP API. Filter by state, municipality, buyer CNPJ, keyword, value or open deadline. No API key.",
    "version": "0.1",
    "x-build-id": "RaaPrYiJOP8uy8DgO"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/moment-data~brazil-pncp-tenders-feed/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-moment-data-brazil-pncp-tenders-feed",
        "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/moment-data~brazil-pncp-tenders-feed/runs": {
      "post": {
        "operationId": "runs-sync-moment-data-brazil-pncp-tenders-feed",
        "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/moment-data~brazil-pncp-tenders-feed/run-sync": {
      "post": {
        "operationId": "run-sync-moment-data-brazil-pncp-tenders-feed",
        "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": [
              "window",
              "sinceLastRun"
            ],
            "type": "string",
            "description": "window (default): records published in the lookback window, no saved state. sinceLastRun: only records not delivered before for this State key; use for daily schedules.",
            "default": "window"
          },
          "recordTypes": {
            "title": "Record types",
            "type": "array",
            "description": "tenders: new procurement notices (editais / avisos de contratação). contracts: signed contracts and purchase orders (with the supplier company). Max records is split fairly between them.",
            "items": {
              "type": "string",
              "enum": [
                "tenders",
                "contracts"
              ],
              "enumTitles": [
                "Tenders (licitações / contratações)",
                "Contracts (contratos / empenhos)"
              ]
            },
            "default": [
              "tenders",
              "contracts"
            ]
          },
          "modalities": {
            "title": "Tender modalities",
            "type": "array",
            "description": "Procurement modalities (Lei 14.133/2021) to query for tenders.",
            "items": {
              "type": "string",
              "enum": [
                "pregaoEletronico",
                "pregaoPresencial",
                "concorrenciaEletronica",
                "concorrenciaPresencial",
                "dispensa",
                "inexigibilidade",
                "leilaoEletronico",
                "leilaoPresencial",
                "dialogoCompetitivo",
                "concurso",
                "credenciamento",
                "preQualificacao",
                "manifestacaoInteresse"
              ],
              "enumTitles": [
                "Pregão eletrônico",
                "Pregão presencial",
                "Concorrência eletrônica",
                "Concorrência presencial",
                "Dispensa (direct purchase, often open for quotes)",
                "Inexigibilidade (sole source)",
                "Leilão eletrônico (government auction)",
                "Leilão presencial (auction)",
                "Diálogo competitivo",
                "Concurso",
                "Credenciamento",
                "Pré-qualificação",
                "Manifestação de interesse"
              ]
            },
            "default": [
              "pregaoEletronico",
              "concorrenciaEletronica",
              "dispensa"
            ]
          },
          "lookbackDays": {
            "title": "Lookback (days)",
            "minimum": 1,
            "maximum": 60,
            "type": "integer",
            "description": "Publication-date window in Brasília time (today and the previous days). Also the first-run window in sinceLastRun mode.",
            "default": 2
          },
          "ufs": {
            "title": "States (UF)",
            "type": "array",
            "description": "Buyer's state, 2-letter codes, e.g. SP, RJ, MG, PR, DF. Empty = all of Brazil.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "municipalityIbgeCodes": {
            "title": "Municipalities (IBGE codes)",
            "type": "array",
            "description": "7-digit IBGE municipality codes of the buying unit, e.g. 3550308 (São Paulo), 3304557 (Rio de Janeiro).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "buyerCnpjs": {
            "title": "Buyer CNPJs",
            "type": "array",
            "description": "14-digit CNPJs of public bodies to follow (digits only or formatted).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "spheres": {
            "title": "Government spheres",
            "type": "array",
            "description": "Empty = all.",
            "items": {
              "type": "string",
              "enum": [
                "F",
                "E",
                "M",
                "D"
              ],
              "enumTitles": [
                "Federal",
                "Estadual (state)",
                "Municipal",
                "Distrital"
              ]
            },
            "default": []
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Keep records whose object (objeto) contains any of these words; accent- and case-insensitive, e.g. 'merenda', 'software', 'evento', 'pavimentação'.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "excludeKeywords": {
            "title": "Exclude keywords",
            "type": "array",
            "description": "Drop records whose object contains any of these words.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "minValue": {
            "title": "Minimum value (BRL)",
            "minimum": 0,
            "type": "integer",
            "description": "Tenders: estimated total value; contracts: global value. Records without a value are dropped when set."
          },
          "onlyOpen": {
            "title": "Only open tenders",
            "type": "boolean",
            "description": "Keep only tenders whose proposal deadline is in the future (drops contracts).",
            "default": false
          },
          "priceRegistrationOnly": {
            "title": "Only price registrations (SRP)",
            "type": "boolean",
            "description": "Keep only tenders under the Sistema de Registro de Preços (framework / ata de registro de preços).",
            "default": false
          },
          "maxItems": {
            "title": "Max records",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Maximum records delivered (and charged) per run, newest first.",
            "default": 30
          },
          "objectChars": {
            "title": "Object text length",
            "minimum": 0,
            "maximum": 5000,
            "type": "integer",
            "description": "Characters of the object description kept (emails, phones and CPFs masked).",
            "default": 1000
          },
          "maxPagesPerQuery": {
            "title": "Max pages per query",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Safety cap: pages of 50 records read per modality / contract query (newest pages first). Raise for big backfills with client-side filters.",
            "default": 10
          },
          "autoWiden": {
            "title": "Widen window when empty",
            "type": "boolean",
            "description": "Window mode only: if the window has fewer than Max records (weekends, early morning), look back up to 7 days.",
            "default": true
          },
          "stateKey": {
            "title": "State key",
            "type": "string",
            "description": "Only for sinceLastRun: separate saved state per saved search, e.g. 'sp-software'.",
            "default": "default"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}