{
  "openapi": "3.0.1",
  "info": {
    "title": "Licitações PNCP Scraper: Brazil Public Tenders",
    "description": "Flat JSON of Brazilian government tenders from PNCP: object, agency, city, state, modality, estimated value, proposal dates and edital links. Search by keyword, state, city, agency and value. Monitor mode returns only new licitações, ideal for daily bid alerts. No login, no API key, no proxy.",
    "version": "0.2",
    "x-build-id": "rgqaSb26yF5CzpMcV"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/allanmxr~brazil-public-tenders/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-allanmxr-brazil-public-tenders",
        "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/allanmxr~brazil-public-tenders/runs": {
      "post": {
        "operationId": "runs-sync-allanmxr-brazil-public-tenders",
        "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/allanmxr~brazil-public-tenders/run-sync": {
      "post": {
        "operationId": "run-sync-allanmxr-brazil-public-tenders",
        "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": {
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum number of tenders in the output.",
            "default": 100
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Words searched in the tender title and object (Portuguese works best). Only tenders whose title or object contains the words are returned (accent and case insensitive), even if PNCP matched them through line items or attachments. Words in the same item must all appear (AND): \"notebook\" returns far more tenders than \"notebook manutencao\". Separate items are alternatives (OR): each runs as its own search and results are merged without duplicates. Leave empty for no keyword filter.",
            "items": {
              "type": "string"
            }
          },
          "excludeKeywords": {
            "title": "Exclude keywords",
            "type": "array",
            "description": "Drop tenders whose title or object contains any of these words (accent and case insensitive), e.g. \"manutencao\", \"locacao\".",
            "items": {
              "type": "string"
            }
          },
          "status": {
            "title": "Status",
            "enum": [
              "open",
              "proposalsClosed",
              "closed",
              "all"
            ],
            "type": "string",
            "description": "Open = still receiving proposals. Proposals closed = deadline passed, being judged. Closed = concluded (awarded, revoked, annulled, failed). All = the three.",
            "default": "open"
          },
          "modalities": {
            "title": "Modalities",
            "type": "array",
            "description": "Procurement modalities, ordered by how many tenders each has. Empty means every modality.",
            "items": {
              "type": "string",
              "enum": [
                "6",
                "12",
                "4",
                "8",
                "7",
                "5",
                "11",
                "1",
                "13",
                "9",
                "15",
                "10",
                "3",
                "14",
                "2"
              ],
              "enumTitles": [
                "Pregão Eletrônico",
                "Credenciamento",
                "Concorrência Eletrônica",
                "Dispensa de Licitação",
                "Pregão Presencial",
                "Concorrência Presencial",
                "Pré-qualificação",
                "Leilão Eletrônico",
                "Leilão Presencial",
                "Inexigibilidade",
                "Chamada Pública",
                "Manifestação de Interesse",
                "Concurso",
                "Inaplicabilidade da Licitação",
                "Diálogo Competitivo"
              ]
            }
          },
          "onlyActive": {
            "title": "Only active tenders",
            "type": "boolean",
            "description": "Skip tenders that were suspended, revoked or annulled.",
            "default": false
          },
          "onlyPriceRegistry": {
            "title": "Only price registry (SRP)",
            "type": "boolean",
            "description": "Only tenders for a price registry (Sistema de Registro de Preços).",
            "default": false
          },
          "states": {
            "title": "States (UF)",
            "type": "array",
            "description": "Brazilian states of the contracting unit. Empty means the whole country.",
            "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"
              ],
              "enumTitles": [
                "AC - Acre",
                "AL - Alagoas",
                "AM - Amazonas",
                "AP - Amapá",
                "BA - Bahia",
                "CE - Ceará",
                "DF - Distrito Federal",
                "ES - Espírito Santo",
                "GO - Goiás",
                "MA - Maranhão",
                "MG - Minas Gerais",
                "MS - Mato Grosso do Sul",
                "MT - Mato Grosso",
                "PA - Pará",
                "PB - Paraíba",
                "PE - Pernambuco",
                "PI - Piauí",
                "PR - Paraná",
                "RJ - Rio de Janeiro",
                "RN - Rio Grande do Norte",
                "RO - Rondônia",
                "RR - Roraima",
                "RS - Rio Grande do Sul",
                "SC - Santa Catarina",
                "SE - Sergipe",
                "SP - São Paulo",
                "TO - Tocantins"
              ]
            }
          },
          "municipalities": {
            "title": "Municipalities",
            "type": "array",
            "description": "City names (\"Barueri\", or \"Barueri/SP\" to disambiguate) or 7-digit IBGE codes (3505708).",
            "items": {
              "type": "string"
            }
          },
          "spheres": {
            "title": "Government sphere",
            "type": "array",
            "description": "Federal, state or municipal agencies. Empty means all.",
            "items": {
              "type": "string",
              "enum": [
                "F",
                "E",
                "M"
              ],
              "enumTitles": [
                "Federal",
                "State",
                "Municipal"
              ]
            }
          },
          "branches": {
            "title": "Branch of government",
            "type": "array",
            "description": "Executive, legislative or judiciary. Empty means all.",
            "items": {
              "type": "string",
              "enum": [
                "E",
                "L",
                "J"
              ],
              "enumTitles": [
                "Executive",
                "Legislative",
                "Judiciary"
              ]
            }
          },
          "agencyCnpj": {
            "title": "Agency CNPJ",
            "pattern": "^\\d{2}\\.?\\d{3}\\.?\\d{3}/?\\d{4}-?\\d{2}$",
            "type": "string",
            "description": "Only tenders from this contracting agency (14 digits, punctuation allowed)."
          },
          "agencyName": {
            "title": "Agency name contains",
            "type": "string",
            "description": "Only tenders whose agency or unit name contains this text (accent and case insensitive)."
          },
          "minValue": {
            "title": "Minimum estimated value (BRL)",
            "minimum": 0,
            "type": "integer",
            "description": "Tenders with undisclosed value are excluded when a value range is set."
          },
          "maxValue": {
            "title": "Maximum estimated value (BRL)",
            "minimum": 0,
            "type": "integer",
            "description": "Must not be lower than the minimum."
          },
          "publishedWithinDays": {
            "title": "Published in the last N days",
            "minimum": 0,
            "type": "integer",
            "description": "Relative to the day of the run, so it works on a schedule. 1 = today and yesterday."
          },
          "minDaysToDeadline": {
            "title": "Proposal deadline at least N days away",
            "minimum": 0,
            "type": "integer",
            "description": "Relative to the day of the run. Use it to skip tenders that are about to close, e.g. 3. Tenders without a deadline are excluded."
          },
          "publicationDateFrom": {
            "title": "Published from",
            "type": "string",
            "description": "Fixed publication date on PNCP (for a one-off search). Use the last N days field on schedules."
          },
          "publicationDateTo": {
            "title": "Published until",
            "type": "string",
            "description": "Only tenders published on or before this date."
          },
          "includeAttachments": {
            "title": "Include attachment links",
            "type": "boolean",
            "description": "Adds the edital and annex download links. Costs one extra request per tender.",
            "default": true
          },
          "includeItems": {
            "title": "Include item list",
            "type": "boolean",
            "description": "Adds each tender's line items (description, quantity, unit, estimated unit price), up to 500 per tender. Costs one extra request per tender.",
            "default": false
          },
          "onlyNewSinceLastRun": {
            "title": "Only new tenders since the last run",
            "type": "boolean",
            "description": "Remembers the tenders already returned (in a named key-value store that survives between runs) and outputs only new ones. Schedule the Actor daily to get a feed of new tenders.",
            "default": false
          },
          "monitorName": {
            "title": "Monitor name",
            "type": "string",
            "description": "Only used in monitor mode. Use a different name for each scheduled search so each keeps its own history. Keeping the same name between runs preserves that history.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}