{
  "openapi": "3.0.1",
  "info": {
    "title": "Brazil Real Estate & Vehicle Auctions — Mega Leilões",
    "description": "Extract live Brazilian judicial & extrajudicial auctions from Mega Leilões: apartments, houses, rural land, cars, trucks, motorcycles & industrial machinery. Filter by State (UF), City, Max Price, and Minimum Discount % (2ª Praça).",
    "version": "1.0",
    "x-build-id": "cv7wsUTgHxBHXEflR"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/brdatahub~brazil-auctions-megaleiloes/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-brdatahub-brazil-auctions-megaleiloes",
        "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/brdatahub~brazil-auctions-megaleiloes/runs": {
      "post": {
        "operationId": "runs-sync-brdatahub-brazil-auctions-megaleiloes",
        "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/brdatahub~brazil-auctions-megaleiloes/run-sync": {
      "post": {
        "operationId": "run-sync-brdatahub-brazil-auctions-megaleiloes",
        "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": {
          "category": {
            "title": "Auction Category / Categoria do Leilão",
            "enum": [
              "imoveis",
              "imoveis/apartamentos",
              "imoveis/casas",
              "imoveis/terrenos-e-lotes",
              "imoveis/imoveis-comerciais",
              "imoveis/imoveis-rurais",
              "veiculos",
              "veiculos/carros",
              "veiculos/motos",
              "veiculos/caminhoes",
              "industrial",
              "industrial/maquinas",
              "bens-de-consumo",
              "animais",
              "leiloes-judiciais",
              "leiloes-extrajudiciais",
              "venda",
              "lotes-abertos"
            ],
            "type": "string",
            "description": "Select the asset type or auction modality.",
            "default": "imoveis"
          },
          "stateUf": {
            "title": "State (UF) / Estado (ex: sp, rj, mg, pr)",
            "type": "string",
            "description": "Two-letter Brazilian state code in lowercase (e.g. 'sp', 'rj', 'mg', 'pr', 'sc', 'rs', 'go', 'mt', 'ba'). Leave empty for all Brazil.",
            "default": ""
          },
          "citySlug": {
            "title": "City Slug / Cidade sem acento (Opcional)",
            "type": "string",
            "description": "Optional city slug when State (UF) is set, e.g. 'sao-paulo', 'campinas', 'araraquara', 'ribeirao-preto'.",
            "default": ""
          },
          "minDiscountPercent": {
            "title": "Minimum Discount % / Desconto Mínimo % (ex: 30)",
            "minimum": 0,
            "maximum": 95,
            "type": "integer",
            "description": "Only return lots with at least this percentage discount (e.g. 40 for 40%+ off in 2nd auction). Set 0 for all.",
            "default": 0
          },
          "maxPriceBrl": {
            "title": "Maximum Bid Price (BRL) / Valor Máximo em R$ (0 = sem limite)",
            "minimum": 0,
            "type": "integer",
            "description": "Filter out lots above this price in Brazilian Reais (BRL). Set 0 for no limit.",
            "default": 0
          },
          "keywordFilter": {
            "title": "Keyword Filter / Palavra-chave no Título ou Bairro (Opcional)",
            "type": "string",
            "description": "Optional keyword filter applied to title and location (e.g. 'Desocupado', 'Toyota', 'Centro').",
            "default": ""
          },
          "sortBy": {
            "title": "Sort Order / Ordenação",
            "enum": [
              "default",
              "menor_preco",
              "maior_preco",
              "popularidade"
            ],
            "type": "string",
            "description": "How listings should be ordered.",
            "default": "default"
          },
          "maxItems": {
            "title": "Max Items / Limite de Lotes",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum number of auction lots to extract.",
            "default": 60
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}