{
  "openapi": "3.0.1",
  "info": {
    "title": "Brazil Tenders Scraper: PNCP Licitações to Excel",
    "description": "Scrape Brazilian public tenders (licitações, editais, dispensas) from PNCP, the official national portal, via its open API, no key. Federal, state and municipal buyers. Filter by keyword, modality, state, city, value, open deadline. \"Only new\" daily alerts. Excel, CSV, JSON.",
    "version": "1.0",
    "x-build-id": "7hazJkLKqHaY0fB5L"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/tenderfeed~brazil-pncp-tenders/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-tenderfeed-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/tenderfeed~brazil-pncp-tenders/runs": {
      "post": {
        "operationId": "runs-sync-tenderfeed-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/tenderfeed~brazil-pncp-tenders/run-sync": {
      "post": {
        "operationId": "run-sync-tenderfeed-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",
            "type": "array",
            "description": "Words to look for in the object (objeto) and complementary information, accent-insensitive, e.g. [\"software\", \"limpeza\", \"pavimentação\"]. Empty = all notices.",
            "items": {
              "type": "string"
            }
          },
          "keywordMode": {
            "title": "Keyword match",
            "enum": [
              "any",
              "all"
            ],
            "type": "string",
            "description": "Match ANY or ALL keywords.",
            "default": "any"
          },
          "modalities": {
            "title": "Modalities (modalidades)",
            "type": "array",
            "description": "PNCP procurement modalities. Empty = Pregão Eletrônico, Concorrência Eletrônica and Dispensa (the main opportunities for suppliers).",
            "items": {
              "type": "string",
              "enum": [
                "1",
                "2",
                "3",
                "4",
                "5",
                "6",
                "7",
                "8",
                "9",
                "10",
                "11",
                "12",
                "13",
                "14",
                "15",
                "16",
                "17",
                "18",
                "19"
              ],
              "enumTitles": [
                "Leilão - Eletrônico (auction)",
                "Diálogo Competitivo (competitive dialogue)",
                "Concurso (design contest)",
                "Concorrência - Eletrônica (e-competition)",
                "Concorrência - Presencial",
                "Pregão - Eletrônico (e-reverse auction)",
                "Pregão - Presencial",
                "Dispensa (direct purchase / small value)",
                "Inexigibilidade (sole source)",
                "Manifestação de Interesse",
                "Pré-qualificação",
                "Credenciamento (accreditation)",
                "Leilão - Presencial",
                "Inaplicabilidade da Licitação",
                "Chamada pública (public call)",
                "Concorrência - Eletrônica Internacional",
                "Concorrência - Presencial Internacional",
                "Pregão - Eletrônico Internacional",
                "Pregão - Presencial Internacional"
              ]
            }
          },
          "states": {
            "title": "States (UF)",
            "type": "array",
            "description": "Buyer state. Empty = all of Brazil.",
            "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"
              ]
            }
          },
          "cities": {
            "title": "Cities (municípios)",
            "type": "array",
            "description": "Exact buyer city names, accent-insensitive, e.g. [\"Natal\", \"São Paulo\"].",
            "items": {
              "type": "string"
            }
          },
          "spheres": {
            "title": "Government level (esfera)",
            "type": "array",
            "description": "Empty = all.",
            "items": {
              "type": "string",
              "enum": [
                "F",
                "E",
                "M",
                "D"
              ],
              "enumTitles": [
                "Federal",
                "State (estadual)",
                "Municipal",
                "Federal District (distrital)"
              ]
            }
          },
          "buyerName": {
            "title": "Buyer name contains",
            "type": "string",
            "description": "Buyer organization or unit name contains (accent-insensitive), e.g. \"universidade\", \"saúde\"."
          },
          "buyerCnpj": {
            "title": "Buyer CNPJ",
            "type": "string",
            "description": "Only notices of one buyer organization (14-digit CNPJ, punctuation allowed)."
          },
          "publishedFrom": {
            "title": "Published from",
            "type": "string",
            "description": "YYYY-MM-DD or relative (\"7 days\"). Default: 2 days ago. Newest days are read first."
          },
          "publishedTo": {
            "title": "Published to",
            "type": "string",
            "description": "YYYY-MM-DD. Default: today."
          },
          "onlyOpen": {
            "title": "Only open for proposals",
            "type": "boolean",
            "description": "Keep only active notices whose proposal deadline (dataEncerramentoProposta) is still in the future.",
            "default": false
          },
          "minValue": {
            "title": "Minimum estimated value (BRL)",
            "minimum": 0,
            "type": "integer",
            "description": "Applied to valorTotalEstimado."
          },
          "maxValue": {
            "title": "Maximum estimated value (BRL)",
            "minimum": 0,
            "type": "integer",
            "description": "Applied to valorTotalEstimado."
          },
          "includeUnknownValue": {
            "title": "Include notices without a value",
            "type": "boolean",
            "description": "Keep notices with a confidential or missing estimate when a value filter is set.",
            "default": true
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 0,
            "type": "integer",
            "description": "0 = no limit. Default 50. PNCP publishes roughly 1,300+ Pregão/Concorrência/Dispensa notices per business day.",
            "default": 50
          },
          "includeDocuments": {
            "title": "Include document links (edital, annexes)",
            "type": "boolean",
            "description": "One extra API call per notice: adds `documents` with title, type and download URL of each file (edital, termo de referência...).",
            "default": false
          },
          "onlyNew": {
            "title": "Only new notices (monitoring mode)",
            "type": "boolean",
            "description": "Remember what earlier runs delivered and return (and charge for) only notices you have not received yet. Ideal for scheduled daily alerts.",
            "default": false
          },
          "monitoringId": {
            "title": "Monitoring ID",
            "type": "string",
            "description": "Name of the watch-list memory used by 'Only new'. Use a different ID per saved search/schedule."
          },
          "includeRawData": {
            "title": "Include raw PNCP record",
            "type": "boolean",
            "description": "Adds the full PNCP API record under `raw` (bigger output).",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}