{
  "openapi": "3.0.1",
  "info": {
    "title": "Brazil Public Tenders & Auctions (PNCP) – Licitações e Leilões",
    "description": "Daily Brazilian government tenders AND public auctions (vehicles, scrap, real estate) from official PNCP API. Licitações, pregões e leilões. CSV/Excel. $5/1k.",
    "version": "0.1",
    "x-build-id": "TyqPsGudagUZIyudb"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/joao_marini~pncp-licitacoes/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-joao_marini-pncp-licitacoes",
        "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/joao_marini~pncp-licitacoes/runs": {
      "post": {
        "operationId": "runs-sync-joao_marini-pncp-licitacoes",
        "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/joao_marini~pncp-licitacoes/run-sync": {
      "post": {
        "operationId": "run-sync-joao_marini-pncp-licitacoes",
        "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": {
          "mode": {
            "title": "Mode",
            "enum": [
              "open",
              "published"
            ],
            "type": "string",
            "description": "open = tenders still accepting proposals until dateTo (/contratacoes/proposta). published = tenders published between dateFrom and dateTo.",
            "default": "open"
          },
          "onlyAuctions": {
            "title": "Only public auctions (leilões)",
            "type": "boolean",
            "description": "Return only public auctions: modalities 1 (Leilão eletrônico) and 13 (Leilão presencial) — vehicles, unserviceable goods, machinery and real estate sold by public bodies. Overrides 'modalidades'.",
            "default": false
          },
          "wholeWord": {
            "title": "Whole-word / exact-phrase match",
            "type": "boolean",
            "description": "Each keyword is matched as an exact phrase on word boundaries (e.g. 'software' won't match 'softwares'; use both if needed).",
            "default": true
          },
          "keywords": {
            "title": "Keywords / Palavras-chave",
            "type": "array",
            "description": "Match any keyword in the procurement object (accent/case-insensitive). Empty = all.",
            "items": {
              "type": "string"
            }
          },
          "excludeKeywords": {
            "title": "Exclude keywords",
            "type": "array",
            "description": "Skip results whose object contains any of these.",
            "items": {
              "type": "string"
            }
          },
          "uf": {
            "title": "State (UF)",
            "type": "string",
            "description": "Two-letter state code, e.g. SP. Empty = all states.",
            "default": ""
          },
          "municipioIbge": {
            "title": "City IBGE code",
            "type": "string",
            "description": "7-digit IBGE city code, e.g. 3550308 (São Paulo).",
            "default": ""
          },
          "modalidades": {
            "title": "Modalities",
            "type": "array",
            "description": "Modalities. Empty in 'open' mode = all modalities; 'published' mode defaults to 6 and 8.",
            "items": {
              "type": "string",
              "enum": [
                "1",
                "2",
                "3",
                "4",
                "5",
                "6",
                "7",
                "8",
                "9",
                "10",
                "11",
                "12",
                "13"
              ],
              "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"
              ]
            }
          },
          "dateFrom": {
            "title": "Published from (YYYY-MM-DD)",
            "type": "string",
            "description": "Only for 'published' mode. Default: 30 days ago (computed at run time)."
          },
          "dateTo": {
            "title": "Date to (YYYY-MM-DD)",
            "type": "string",
            "description": "'open': latest proposal deadline to include (default: today+30 days, computed at run time); API returns only tenders still open. 'published': end of publication range (default: today)."
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Maximum number of records to return (each record is charged as one 'result' event). The run stops as soon as this limit is reached.",
            "default": 20
          },
          "maxPagesPerModality": {
            "title": "Max pages per modality (50 records/page)",
            "minimum": 1,
            "type": "integer",
            "description": "Max pages per modality (50 records/page)",
            "default": 200
          },
          "requestDelaySecs": {
            "title": "Delay between requests (s)",
            "minimum": 0,
            "type": "number",
            "description": "Delay between requests (s)",
            "default": 0.5
          },
          "concurrency": {
            "title": "Concurrency (parallel page requests)",
            "minimum": 1,
            "maximum": 16,
            "type": "integer",
            "description": "Pages fetched in parallel. A shared cooldown applies on HTTP 429; requestDelaySecs is the minimum spacing between request starts.",
            "default": 4
          },
          "maxRunTimeSecs": {
            "title": "Time budget (seconds)",
            "minimum": 0,
            "type": "integer",
            "description": "Stop gracefully after this many seconds and keep the results found so far (keyword searches scan many pages). 0 = no limit.",
            "default": 240
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}