{
  "openapi": "3.0.1",
  "info": {
    "title": "PNCP Brazil Public Tenders Scraper",
    "description": "Search Brazilian public tenders on PNCP: open bids by default, with buyer, CNPJ, state, municipality, method, status, estimated value in BRL, publication date and proposal deadline. Filter by keyword, state, method, government level, buyer and date for daily tender alerts.",
    "version": "0.1",
    "x-build-id": "08BimFSPJD2q7GjqZ"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/automatic~pncp-tenders-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-automatic-pncp-tenders-scraper",
        "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/automatic~pncp-tenders-scraper/runs": {
      "post": {
        "operationId": "runs-sync-automatic-pncp-tenders-scraper",
        "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/automatic~pncp-tenders-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-automatic-pncp-tenders-scraper",
        "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": "string",
            "description": "Words searched in the tender subject, buyer and notice, e.g. 'software' or 'merenda escolar'. Every word must match; accents and case do not matter. PNCP also matches related word forms, so titles may not contain your exact words. Up to 200 characters.",
            "default": ""
          },
          "status": {
            "title": "Status",
            "enum": [
              "open",
              "closed",
              "all"
            ],
            "type": "string",
            "description": "Open: tenders still accepting proposals (deadline in the future). Closed: proposal period ended. All: both.",
            "default": "open"
          },
          "states": {
            "title": "States (UF)",
            "uniqueItems": true,
            "type": "array",
            "description": "Brazilian states of the buyer. Leave empty for the whole country.",
            "items": {
              "type": "string",
              "enum": [
                "AC",
                "AL",
                "AP",
                "AM",
                "BA",
                "CE",
                "DF",
                "ES",
                "GO",
                "MA",
                "MT",
                "MS",
                "MG",
                "PA",
                "PB",
                "PR",
                "PE",
                "PI",
                "RJ",
                "RN",
                "RS",
                "RO",
                "RR",
                "SC",
                "SP",
                "SE",
                "TO"
              ],
              "enumTitles": [
                "Acre (AC)",
                "Alagoas (AL)",
                "Amapá (AP)",
                "Amazonas (AM)",
                "Bahia (BA)",
                "Ceará (CE)",
                "Distrito Federal (DF)",
                "Espírito Santo (ES)",
                "Goiás (GO)",
                "Maranhão (MA)",
                "Mato Grosso (MT)",
                "Mato Grosso do Sul (MS)",
                "Minas Gerais (MG)",
                "Pará (PA)",
                "Paraíba (PB)",
                "Paraná (PR)",
                "Pernambuco (PE)",
                "Piauí (PI)",
                "Rio de Janeiro (RJ)",
                "Rio Grande do Norte (RN)",
                "Rio Grande do Sul (RS)",
                "Rondônia (RO)",
                "Roraima (RR)",
                "Santa Catarina (SC)",
                "São Paulo (SP)",
                "Sergipe (SE)",
                "Tocantins (TO)"
              ]
            },
            "default": []
          },
          "modalities": {
            "title": "Procurement methods",
            "uniqueItems": true,
            "type": "array",
            "description": "Procurement method (modalidade), e.g. Pregão - Eletrônico. Leave empty for all methods.",
            "items": {
              "type": "string",
              "enum": [
                "1",
                "2",
                "3",
                "4",
                "5",
                "6",
                "7",
                "8",
                "9",
                "10",
                "11",
                "12",
                "13",
                "14"
              ],
              "enumTitles": [
                "Leilão - Eletrônico",
                "Diálogo Competitivo",
                "Concurso",
                "Concorrência - Eletrônica",
                "Concorrência - Presencial",
                "Pregão - Eletrônico",
                "Pregão - Presencial",
                "Dispensa",
                "Inexigibilidade",
                "Manifestação de Interesse",
                "Pré-qualificação",
                "Credenciamento",
                "Leilão - Presencial",
                "Inaplicabilidade da Licitação"
              ]
            },
            "default": []
          },
          "spheres": {
            "title": "Government level",
            "uniqueItems": true,
            "type": "array",
            "description": "Federal, state, municipal or Federal District buyers. Leave empty for all.",
            "items": {
              "type": "string",
              "enum": [
                "F",
                "E",
                "M",
                "D"
              ],
              "enumTitles": [
                "Federal",
                "Estadual",
                "Municipal",
                "Distrital"
              ]
            },
            "default": []
          },
          "buyerCnpjs": {
            "title": "Buyer CNPJs",
            "type": "array",
            "description": "Only tenders of these buying organisations, by CNPJ (14 digits, with or without punctuation, e.g. 08.829.974/0001-94). Up to 20.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "publishedSince": {
            "title": "Published or updated since",
            "type": "string",
            "description": "Only tenders published or changed on or after this date (YYYY-MM-DD, Brasília time). Use it for daily monitoring: schedule a run with yesterday's date.",
            "default": ""
          },
          "includeDetails": {
            "title": "Include details",
            "type": "boolean",
            "description": "Also collect document links, item category codes, item count, a description excerpt and the deadline from the official record. Slower: about 3 seconds per tender, up to 1,000 tenders per run.",
            "default": false
          },
          "maxItems": {
            "title": "Maximum tenders",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Maximum tenders returned, newest first. Up to 10,000 (1,000 with details).",
            "default": 50
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}