{
  "openapi": "3.0.1",
  "info": {
    "title": "PNCP Licitações API: Brazil Tenders, Values, Files",
    "description": "Brazilian public tenders (licitações) from PNCP: agency, CNPJ, object, modality, estimated value, deadlines, edital files, line items. Filter by keyword, UF, modality, dates; onlyNew alerts. No API key, no login. MCP-ready for AI agents. Errors and empty results are free. $2 per 1,000 tenders",
    "version": "0.1",
    "x-build-id": "fvg7COBYSnuZhvQnX"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/actose~brazil-pncp-tenders/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-actose-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/actose~brazil-pncp-tenders/runs": {
      "post": {
        "operationId": "runs-sync-actose-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/actose~brazil-pncp-tenders/run-sync": {
      "post": {
        "operationId": "run-sync-actose-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": {
          "keywords": {
            "title": "Keywords (palavras-chave)",
            "type": "array",
            "description": "Full-text search terms, in Portuguese for best results (e.g. \"software\", \"limpeza\", \"merenda escolar\", \"pavimentação\"). Each keyword is a separate search; duplicates across keywords are removed. Leave empty to get every tender matching the other filters.",
            "items": {
              "type": "string"
            }
          },
          "state": {
            "title": "State (UF)",
            "type": "string",
            "description": "Two-letter Brazilian state code (UF) of the buying agency, e.g. SP, RJ, MG, DF. Leave empty for all of Brazil."
          },
          "states": {
            "title": "Additional states (UF list)",
            "type": "array",
            "description": "Optional: several UF codes at once (e.g. [\"RJ\", \"MG\"]). Combined with \"State\".",
            "items": {
              "type": "string"
            }
          },
          "modalities": {
            "title": "Modalities (modalidade de contratação)",
            "type": "array",
            "description": "Procurement modalities to keep. 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 (electronic auction)",
                "2 - Diálogo Competitivo (competitive dialogue)",
                "3 - Concurso (contest)",
                "4 - Concorrência - Eletrônica (electronic open tender)",
                "5 - Concorrência - Presencial (in-person open tender)",
                "6 - Pregão - Eletrônico (electronic reverse auction)",
                "7 - Pregão - Presencial (in-person reverse auction)",
                "8 - Dispensa de Licitação (direct award, waiver)",
                "9 - Inexigibilidade (sole source)",
                "10 - Manifestação de Interesse (expression of interest)",
                "11 - Pré-qualificação (pre-qualification)",
                "12 - Credenciamento (accreditation)",
                "13 - Leilão - Presencial (in-person auction)"
              ]
            }
          },
          "status": {
            "title": "Status",
            "enum": [
              "all",
              "open",
              "closed"
            ],
            "type": "string",
            "description": "\"open\" = still receiving proposals (recebendo proposta), \"closed\" = proposals closed (encerradas), \"all\" = every status (including suspended, revoked, cancelled).",
            "default": "all"
          },
          "daysBack": {
            "title": "Published in the last N days",
            "minimum": 0,
            "maximum": 365,
            "type": "integer",
            "description": "Keep tenders published on PNCP in the last N days (Brasília time). Ignored when \"Published from\" is set. 0 = today only.",
            "default": 7
          },
          "dateFrom": {
            "title": "Published from (YYYY-MM-DD)",
            "pattern": "^$|^\\d{4}-\\d{2}-\\d{2}$|^\\d{2}/\\d{2}/\\d{4}$",
            "type": "string",
            "description": "Optional start of the publication window, e.g. 2026-10-01. Overrides \"daysBack\"."
          },
          "dateTo": {
            "title": "Published until (YYYY-MM-DD)",
            "pattern": "^$|^\\d{4}-\\d{2}-\\d{2}$|^\\d{2}/\\d{2}/\\d{4}$",
            "type": "string",
            "description": "Optional end of the publication window (inclusive). Default: today."
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Maximum number of tenders delivered (and charged) in this run, all keywords together.",
            "default": 100
          },
          "includeDetails": {
            "title": "Include detail sheet and attachments",
            "type": "boolean",
            "description": "Fetch the official detail sheet (process number, proposal opening/closing dates, estimated and approved value, legal basis) and the list of attached documents (edital, termo de referência, ETP...) with direct download links.",
            "default": true
          },
          "includeItems": {
            "title": "Include line items (itens)",
            "type": "boolean",
            "description": "Also fetch the purchase line items: description, quantity, unit, unit and total estimated value. Slower (one or more extra requests per tender).",
            "default": false
          },
          "onlyNew": {
            "title": "Only new tenders since last run",
            "type": "boolean",
            "description": "For scheduled daily monitoring: skip tenders already delivered by a previous run with the same keywords, states, modalities and status (remembered in a named key-value store for 120 days). You only pay for new tenders.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}