{
  "openapi": "3.0.1",
  "info": {
    "title": "PNCP Brazil Procurement — licitações, contratos, atas",
    "description": "Scrape Brazil's PNCP: editais/licitações (pregão, dispensa, concorrência), signed contracts with supplier CNPJ and value, and atas de registro de preço. Filter by date, modality, state, keywords, value. Official API.",
    "version": "1.0",
    "x-build-id": "mJHi65J5VRYVTCtAp"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/t0ld~pncp-licitacoes-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-t0ld-pncp-licitacoes-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/t0ld~pncp-licitacoes-scraper/runs": {
      "post": {
        "operationId": "runs-sync-t0ld-pncp-licitacoes-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/t0ld~pncp-licitacoes-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-t0ld-pncp-licitacoes-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": {
          "datasetType": {
            "title": "What to scrape",
            "enum": [
              "editais",
              "open",
              "contratos",
              "atas"
            ],
            "type": "string",
            "description": "editais = procurement notices (licitações, dispensas, etc.) by publication date; open = editais still open for proposals; contratos = signed contracts; atas = price registration records (atas de registro de preço) created/updated in the period.",
            "default": "editais"
          },
          "daysBack": {
            "title": "Last N days",
            "minimum": 1,
            "maximum": 365,
            "type": "integer",
            "description": "Used when 'Date from' is empty: collect records from the last N days up to today (or 'Date to'). Default 7.",
            "default": 7
          },
          "dateFrom": {
            "title": "Date from",
            "pattern": "^(\\d{4}-\\d{2}-\\d{2})?$",
            "type": "string",
            "description": "Start date in YYYY-MM-DD format (e.g. 2026-11-01). Leave empty to use 'Last N days'."
          },
          "dateTo": {
            "title": "Date to",
            "pattern": "^(\\d{4}-\\d{2}-\\d{2})?$",
            "type": "string",
            "description": "End date in YYYY-MM-DD format. Leave empty for today. For 'open' editais this is the latest proposal deadline (empty = 90 days from today)."
          },
          "modalities": {
            "title": "Modalities (editais only)",
            "type": "array",
            "description": "Procurement modalities to collect for editais / open editais. Each selected modality is queried separately. For 'open' editais, leave empty to include all modalities. Ignored for contratos and atas.",
            "items": {
              "type": "string",
              "enum": [
                "6",
                "7",
                "8",
                "9",
                "4",
                "5",
                "12",
                "1",
                "13",
                "3",
                "2",
                "10",
                "11"
              ],
              "enumTitles": [
                "Pregão Eletrônico",
                "Pregão Presencial",
                "Dispensa de Licitação",
                "Inexigibilidade",
                "Concorrência Eletrônica",
                "Concorrência Presencial",
                "Credenciamento",
                "Leilão Eletrônico",
                "Leilão Presencial",
                "Concurso",
                "Diálogo Competitivo",
                "Manifestação de Interesse",
                "Pré-qualificação"
              ]
            },
            "default": [
              "6"
            ]
          },
          "uf": {
            "title": "State (UF)",
            "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"
            ],
            "type": "string",
            "description": "Filter by Brazilian state of the contracting unit. Not available for atas (the source has no state data).",
            "default": ""
          },
          "cnpj": {
            "title": "Organization CNPJ",
            "type": "string",
            "description": "Only records from this contracting organization (órgão), 14 digits, e.g. 46395000000139. Punctuation is ignored."
          },
          "municipalityIbge": {
            "title": "Municipality IBGE code",
            "type": "string",
            "description": "Only editais from this municipality, 7-digit IBGE code (e.g. 3550308 for São Paulo). Editais and open editais only."
          },
          "keywords": {
            "title": "Keywords (objeto)",
            "type": "array",
            "description": "Keep only records whose object text (objeto) contains at least one of these words or phrases. Case- and accent-insensitive, applied after download. Leave empty for no filter.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "minValue": {
            "title": "Minimum value (R$)",
            "minimum": 0,
            "type": "number",
            "description": "Keep only editais with estimated/homologated value, or contracts with global value, of at least this amount in BRL. 0 = no filter. Not applied to atas.",
            "default": 0
          },
          "maxItems": {
            "title": "Max results",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum number of records to return (total). Each saved record is billed.",
            "default": 100
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}