{
  "openapi": "3.0.1",
  "info": {
    "title": "Brazil Public Tenders (PNCP) Scraper",
    "description": "Search every Brazilian public tender from the official PNCP register by keyword, state, value and deadline. Public data, no API key. 27 flat fields, deduplicated, Excel-ready.",
    "version": "0.1",
    "x-build-id": "knfhonGZuOZnARaJW"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/dimitrigaulia~brazil-public-tenders-pncp/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-dimitrigaulia-brazil-public-tenders-pncp",
        "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/dimitrigaulia~brazil-public-tenders-pncp/runs": {
      "post": {
        "operationId": "runs-sync-dimitrigaulia-brazil-public-tenders-pncp",
        "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/dimitrigaulia~brazil-public-tenders-pncp/run-sync": {
      "post": {
        "operationId": "run-sync-dimitrigaulia-brazil-public-tenders-pncp",
        "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": {
          "diasRetroativos": {
            "title": "Days back",
            "minimum": 1,
            "maximum": 365,
            "type": "integer",
            "description": "How many days back from today to search. Ignored if you set explicit dates below. Use 1 for a daily monitor.",
            "default": 7
          },
          "dataInicial": {
            "title": "Start date (YYYY-MM-DD)",
            "type": "string",
            "description": "Explicit start of the publication window. Overrides 'Days back'."
          },
          "dataFinal": {
            "title": "End date (YYYY-MM-DD)",
            "type": "string",
            "description": "Explicit end of the publication window. Overrides 'Days back'."
          },
          "modalidades": {
            "title": "Procurement modes",
            "type": "array",
            "description": "PNCP requires exactly one mode per request. Pick as many as you like here and the Actor crawls each one for you.",
            "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"
              ]
            },
            "default": [
              "6"
            ]
          },
          "ufs": {
            "title": "States (UF)",
            "type": "array",
            "description": "Leave empty for the whole country.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "palavrasChave": {
            "title": "Must contain any of these words",
            "type": "array",
            "description": "Accent and case insensitive, matched against the tender object and complementary info. Empty means no keyword filter. This is the filter PNCP itself does not offer.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "palavrasExcluir": {
            "title": "Must NOT contain any of these words",
            "type": "array",
            "description": "Drop tenders whose object contains any of these words. Useful to strip out categories you never bid on.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "valorMin": {
            "title": "Minimum estimated value (BRL)",
            "type": "integer",
            "description": "Ignore tenders estimated below this value. Leave empty for no floor."
          },
          "valorMax": {
            "title": "Maximum estimated value (BRL)",
            "type": "integer",
            "description": "Ignore tenders estimated above this value. Leave empty for no ceiling."
          },
          "somenteAbertas": {
            "title": "Only tenders still open for bids",
            "type": "boolean",
            "description": "Drops anything whose proposal deadline has already passed.",
            "default": false
          },
          "cnpj": {
            "title": "Filter by buyer CNPJ",
            "type": "string",
            "description": "Digits only. Use it to watch one specific public body."
          },
          "maxResultados": {
            "title": "Max results",
            "minimum": 1,
            "type": "integer",
            "description": "Hard cap on rows. Keeps a broad query from running away.",
            "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}