{
  "openapi": "3.0.1",
  "info": {
    "title": "LATAM Industrial, Fleet & Real Estate Auction Aggregator",
    "description": "Multi-modal B2B auction intelligence aggregator across Superbid Exchange (BR, AR, CO, CL, PE), Brazil's official PNCP public asset auctions, and user-supplied CAIXA real estate CSV feeds. Extracts bid velocity, discount vs appraisal/FIPE, judicial/fiduciary metadata, and edital/matricula PDFs.",
    "version": "0.1",
    "x-build-id": "mumMWV40j49O108g0"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/francescopacifico1905~latam-auction-aggregator/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-francescopacifico1905-latam-auction-aggregator",
        "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/francescopacifico1905~latam-auction-aggregator/runs": {
      "post": {
        "operationId": "runs-sync-francescopacifico1905-latam-auction-aggregator",
        "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/francescopacifico1905~latam-auction-aggregator/run-sync": {
      "post": {
        "operationId": "run-sync-francescopacifico1905-latam-auction-aggregator",
        "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": "Execution Mode",
            "enum": [
              "search",
              "watchlist_refresh"
            ],
            "type": "string",
            "description": "Select 'search' to discover and filter active auction lots, or 'watchlist_refresh' to poll current bids, prices, and status changes for specific lot IDs.",
            "default": "search"
          },
          "countries": {
            "title": "Countries (Superbid Exchange)",
            "type": "array",
            "description": "Target LATAM countries for Superbid Exchange queries: BR (Brazil), AR (Argentina), CO (Colombia), CL (Chile), PE (Peru). PNCP and CAIXA feeds are Brazil-only.",
            "items": {
              "type": "string"
            },
            "default": [
              "BR"
            ]
          },
          "assetCategory": {
            "title": "Asset Category",
            "enum": [
              "ALL",
              "INDUSTRIAL_MACHINERY",
              "HEAVY_AND_AGRI",
              "TRUCKS_AND_BUSES",
              "CARS_AND_MOTOS",
              "REAL_ESTATE",
              "TECH_AND_IT",
              "SCRAP_AND_MATERIALS",
              "MARINE_AND_AVIATION"
            ],
            "type": "string",
            "description": "Filter by normalized industrial, fleet, real estate, or material asset category.",
            "default": "ALL"
          },
          "saleModality": {
            "title": "Sale Modality",
            "enum": [
              "ALL",
              "AUCTION",
              "SEALED_RFQ_OR_DIRECT",
              "JUDICIAL_ONLY"
            ],
            "type": "string",
            "description": "Filter by auction legal modality (public auction, sealed RFQ/direct offer, or judicial-only).",
            "default": "ALL"
          },
          "keyword": {
            "title": "Keyword Query",
            "type": "string",
            "description": "Optional search keyword matched against lot title, description, asset model, or CNPJ seller (e.g., 'Caterpillar', 'empilhadeira', 'Scania', 'galpao', 'terreno')."
          },
          "stateUf": {
            "title": "State / UF Filter",
            "maxLength": 2,
            "type": "string",
            "description": "Optional 2-letter Brazilian state code filter (e.g., SP, MG, PR, RJ, RS, BA)."
          },
          "minDiscountPercent": {
            "title": "Minimum Discount vs Appraisal / FIPE (%)",
            "minimum": 0,
            "maximum": 99,
            "type": "integer",
            "description": "Keep only lots with computed discount >= this percentage (0 to 99). Computed from appraisal/FIPE/accounting reference price when published.",
            "default": 0
          },
          "minPrice": {
            "title": "Minimum Current Price (Local Currency)",
            "minimum": 0,
            "type": "integer",
            "description": "Optional lower bound on currentPrice (in the lot's local currency, e.g., BRL/ARS/COP/CLP/PEN)."
          },
          "maxPrice": {
            "title": "Maximum Current Price (Local Currency)",
            "minimum": 0,
            "type": "integer",
            "description": "Optional upper bound on currentPrice (in the lot's local currency)."
          },
          "sortBy": {
            "title": "Sort Order",
            "enum": [
              "RELEVANCE",
              "CLOSING_SOON",
              "MOST_BIDS",
              "PRICE_ASC",
              "PRICE_DESC",
              "DISCOUNT_DESC"
            ],
            "type": "string",
            "description": "Result ordering strategy applied across Superbid API sorting and multi-source merging.",
            "default": "MOST_BIDS"
          },
          "includeSuperbid": {
            "title": "Include Superbid Exchange (BR, AR, CO, CL, PE)",
            "type": "boolean",
            "description": "Query live public auction lots across Superbid LATAM corporate, judicial, fleet, and machinery portals.",
            "default": true
          },
          "includePncpPublicAuctions": {
            "title": "Include Brazil PNCP Public Asset Auctions",
            "type": "boolean",
            "description": "Query Brazil's official federal/state/municipal Portal Nacional de Contratacoes Publicas (PNCP) for active public auctions (Leilao Eletronico and Leilao Presencial).",
            "default": false
          },
          "caixaCsvText": {
            "title": "Optional CAIXA Imoveis CSV Text (Bring-Your-Own)",
            "type": "string",
            "description": "Optional raw CSV text downloaded from CAIXA Imoveis (Lista_imoveis_<UF>.csv, ISO-8859-1 or UTF-8 semicolon-delimited) to parse and merge into the unified schema."
          },
          "caixaCsvUrls": {
            "title": "Optional CAIXA CSV Hosted Mirror URLs",
            "type": "array",
            "description": "Optional HTTPS URLs to your own hosted copies/mirrors of CAIXA Lista_imoveis_<UF>.csv (S3, GCS, Apify KVS). Direct *.caixa.gov.br URLs are skipped cleanly with a free CAPTCHA_GATED diagnostic record.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "watchlistLotIds": {
            "title": "Watchlist Lot IDs (watchlist_refresh mode)",
            "type": "array",
            "description": "Lot identifiers to monitor in 'watchlist_refresh' mode. Accepts numeric Superbid IDs ('1234567'), 'superbid:1234567', or 'pncp:<cnpj>-1-<seq>/<year>[:itemNumber]'.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "onlyEmitChanges": {
            "title": "Only Emit Lots With Price, Bid, or Status Changes",
            "type": "boolean",
            "description": "When enabled, lots whose currentPrice, bidsCount, and lotStatus match the previous Key-Value Store snapshot are updated silently without emitting dataset rows or charging PPE.",
            "default": false
          },
          "stateStoreName": {
            "title": "Named Key-Value Store (Optional)",
            "type": "string",
            "description": "Optional named Apify Key-Value Store to persist watchlist/search snapshots across independent runs (recommended for scheduled monitoring). Uses default run KVS if omitted."
          },
          "stateRecordName": {
            "title": "State Snapshot Record Name",
            "type": "string",
            "description": "Record name inside the Key-Value Store holding the consolidated auction state snapshots.",
            "default": "AUCTION_MONITOR_STATE"
          },
          "webhookUrl": {
            "title": "Change Alert Webhook URL (Optional)",
            "type": "string",
            "description": "Optional HTTP/HTTPS endpoint to receive a JSON summary payload when lots are newly discovered or change price/bids/status."
          },
          "notifyOnNoChange": {
            "title": "Send Webhook Even When Nothing Changed",
            "type": "boolean",
            "description": "If enabled, fires webhookUrl even when 0 new or changed lots are observed in the run.",
            "default": false
          },
          "maxItems": {
            "title": "Maximum Billed Lots",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Maximum number of OK auction lot records to emit and charge per run (1 to 5000). Free diagnostic rows are excluded from this cap.",
            "default": 25
          },
          "concurrency": {
            "title": "Upstream Request Concurrency",
            "minimum": 1,
            "maximum": 15,
            "type": "integer",
            "description": "Maximum concurrent API enrichment requests (1 to 15).",
            "default": 5
          },
          "proxyConfiguration": {
            "title": "Proxy Configuration",
            "type": "object",
            "description": "Optional Apify Proxy or custom proxy URLs for outbound API requests (not required for standard Superbid or PNCP runs).",
            "default": {
              "useApifyProxy": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}