{
  "openapi": "3.0.1",
  "info": {
    "title": "Brazil Government Tenders & Contracts (PNCP Licitações)",
    "description": "Brazilian public tenders (licitações) and signed contracts from the official PNCP API as clean JSON: agency, state, city, modality, proposal deadline, estimated value in BRL, document links, winning company and contract value. Keyword, state and agency filters, new-only alerts.",
    "version": "0.1",
    "x-build-id": "aZ4y9uYaDpX36UGRK"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/dottti~brazil-pncp-tenders/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-dottti-brazil-pncp-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/dottti~brazil-pncp-tenders/runs": {
      "post": {
        "operationId": "runs-sync-dottti-brazil-pncp-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/dottti~brazil-pncp-tenders/run-sync": {
      "post": {
        "operationId": "run-sync-dottti-brazil-pncp-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": {
          "recordTypes": {
            "title": "Record types",
            "type": "array",
            "description": "Tenders are notices from the PNCP (editais, pregões, dispensas). Awards are signed contracts with the winning company and the contract value.",
            "items": {
              "type": "string",
              "enum": [
                "tenders",
                "awards"
              ],
              "enumTitles": [
                "Tenders (licitações)",
                "Awards (signed contracts)"
              ]
            },
            "default": [
              "tenders"
            ]
          },
          "tenderStatus": {
            "title": "Which tenders",
            "enum": [
              "open",
              "published"
            ],
            "type": "string",
            "description": "open: tenders still receiving proposals, newest first. published: every tender published in the date window, open or not.",
            "default": "open"
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Words matched against the object (objeto), extra information, agency and unit. Accents and case are ignored, so licitacao matches licitação. Portuguese works best, for example software, veículos or merenda escolar. Leave empty for everything.",
            "items": {
              "type": "string"
            }
          },
          "matchMode": {
            "title": "Keyword match mode",
            "enum": [
              "any",
              "all"
            ],
            "type": "string",
            "description": "any: at least one keyword. all: every keyword.",
            "default": "any"
          },
          "states": {
            "title": "States (UF)",
            "type": "array",
            "description": "Keep records from these states. One query is sent per state.",
            "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": "Modalities (tenders)",
            "type": "array",
            "description": "PNCP contracting modality. Pregão Eletrônico (6) is the most common competitive one. Leave empty for all.",
            "items": {
              "type": "string",
              "enum": [
                "1",
                "2",
                "3",
                "4",
                "5",
                "6",
                "7",
                "8",
                "9",
                "10",
                "11",
                "12",
                "13"
              ],
              "enumTitles": [
                "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 de Licitação",
                "9 - Inexigibilidade",
                "10 - Manifestação de Interesse",
                "11 - Pré-qualificação",
                "12 - Credenciamento",
                "13 - Leilão - Presencial"
              ]
            }
          },
          "agencyCnpj": {
            "title": "Agency CNPJ",
            "type": "string",
            "description": "14-digit CNPJ of the buying agency (órgão), for example 00394445000101. Sent to the API, so it is fast."
          },
          "agencyContains": {
            "title": "Agency name contains",
            "type": "string",
            "description": "Keep records whose agency or unit name contains this text, for example prefeitura de campinas or ministério da saúde."
          },
          "cityContains": {
            "title": "City contains",
            "type": "string",
            "description": "Keep records whose city (município) contains this text, for example Recife."
          },
          "supplierContains": {
            "title": "Supplier contains (awards)",
            "type": "string",
            "description": "Keep contracts whose supplier company name or CNPJ contains this text."
          },
          "minValueBrl": {
            "title": "Minimum value, BRL",
            "minimum": 0,
            "type": "integer",
            "description": "Tenders: estimated value. Awards: total contract value. In Brazilian reais."
          },
          "publishedWithinDays": {
            "title": "Published in the last N days",
            "minimum": 1,
            "maximum": 365,
            "type": "integer",
            "description": "Date window for published tenders and for awards. Not used for open tenders.",
            "default": 3
          },
          "publishedSince": {
            "title": "Published on or after",
            "pattern": "^(\\d{4}-\\d{2}-\\d{2})?$",
            "type": "string",
            "description": "Date in YYYY-MM-DD format. Overrides the N days setting."
          },
          "includeDocuments": {
            "title": "Include document links (tenders)",
            "type": "boolean",
            "description": "Adds the list of published files (edital, termo de referência, ETP) with direct download links. One extra request per tender.",
            "default": true
          },
          "onlyNew": {
            "title": "Only records not delivered before",
            "type": "boolean",
            "description": "Remember delivered IDs and skip them next time. Use it with a daily schedule for alerts.",
            "default": false
          },
          "stateKey": {
            "title": "Alert name",
            "type": "string",
            "description": "Separate memory for each alert when you run several schedules with onlyNew.",
            "default": "default"
          },
          "maxItems": {
            "title": "Maximum records per type",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Hard cap on delivered tenders and, separately, on delivered awards, newest first. You pay per record delivered, so this is also your cost cap.",
            "default": 20
          },
          "maxPages": {
            "title": "Pages per query",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Tender pages hold 50 rows, contract pages 200. Keyword filters are applied on our side, so raise this to search deeper.",
            "default": 20
          },
          "requestDelayMs": {
            "title": "Delay between requests (ms)",
            "minimum": 500,
            "maximum": 10000,
            "type": "integer",
            "description": "Pause before each request to the public API. Never lower than 500 ms.",
            "default": 500
          },
          "maxRetries": {
            "title": "Retries per request",
            "minimum": 0,
            "maximum": 8,
            "type": "integer",
            "description": "Retries with backoff when the API fails or asks to slow down.",
            "default": 4
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}