{
  "openapi": "3.0.1",
  "info": {
    "title": "Mascus Scraper — Global Heavy Equipment Marketplace",
    "description": "Scrape used machinery listings from Mascus, the world's largest marketplace for heavy equipment. Extract price, make, model, year, hours, location, dealer info, and specs across construction, agriculture, forestry, and material handling categories. Covers 50+ countries.",
    "version": "0.8",
    "x-build-id": "USopCZBUwyRgIvf3f"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/rastriq~mascus-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-rastriq-mascus-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/rastriq~mascus-scraper/runs": {
      "post": {
        "operationId": "runs-sync-rastriq-mascus-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/rastriq~mascus-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-rastriq-mascus-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": {
          "maxResults": {
            "title": "Maximo de resultados (recomendado para pruebas)",
            "minimum": 0,
            "maximum": 1000000,
            "type": "integer",
            "description": "Detiene el actor cuando se han enviado N anuncios al dataset, sin importar cuantas subcategorias o paginas queden. Para una primera prueba rapida (~1 min) usa 50. Deja 0 (o vacio) para extraer TODO sin limite -- comportamiento original. Recomendado en la primera ejecucion.",
            "default": 0
          },
          "cat_construction": {
            "title": "Construction - maquinaria de construccion",
            "type": "boolean",
            "description": "Excavadoras, gruas, compactadoras, hormigoneras... (~240K listings)",
            "default": true
          },
          "cat_agriculture": {
            "title": "Agriculture - maquinaria agricola",
            "type": "boolean",
            "description": "Tractores, cosechadoras, remolques agricolas... (~78K listings)",
            "default": true
          },
          "cat_forestry": {
            "title": "Forestry - maquinaria forestal",
            "type": "boolean",
            "description": "Harvesters, forwarders, astilladoras... (~25K listings)",
            "default": true
          },
          "cat_material_handling": {
            "title": "Material Handling - elevacion y manutencion",
            "type": "boolean",
            "description": "Carretillas elevadoras, transpaletas, plataformas... (~28K listings)",
            "default": true
          },
          "cat_groundcare": {
            "title": "Groundcare - jardineria y espacios verdes",
            "type": "boolean",
            "description": "Cortacesped, tractores de jardin, motoazadas... (~9K listings)",
            "default": true
          },
          "cat_transport": {
            "title": "Transport - camiones y vehiculos",
            "type": "boolean",
            "description": "Camiones, furgonetas, semirremolques. Desactivado por defecto.",
            "default": false
          },
          "subcategories": {
            "title": "Subcategorias especificas (modo preciso)",
            "type": "array",
            "description": "Opcional. MAXIMA PRECEDENCIA: si se rellena, bypasea el discovery automatico y extrae exactamente estas subcategorias. Formato: {catalog}/{slug}. Ejemplos: construction/crawler-excavators, construction/wheel-loaders, construction/cranes, material-handling/forklift-trucks, construction/telescopic-handlers, construction/aerial-platforms, construction/dumpers, construction/backhoe-loaders, construction/skid-steer-loaders, construction/graders, construction/crawler-dozers.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "catalogs": {
            "title": "Catalogos personalizados (avanzado)",
            "type": "array",
            "description": "Opcional. REGLA DE PRECEDENCIA: si se rellena, los checkboxes son ignorados. Slugs validos: construction, agriculture, forestry, material-handling, groundcare, transport.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "sortOrder": {
            "title": "Orden de resultados",
            "enum": [
              "relevance",
              "newest",
              "priceasc",
              "pricedesc"
            ],
            "type": "string",
            "description": "Orden de clasificacion de los resultados. Verificado en produccion.",
            "default": "relevance"
          },
          "brands": {
            "title": "Filtrar por marca (opcional)",
            "type": "array",
            "description": "Opcional. Lista de marcas a filtrar. Acepta nombres en cualquier formato: el actor los convierte a slugs Mascus (minusculas, espacios a guion_bajo). Ejemplos: Fendt, John Deere, Deutz-Fahr, Komatsu, CAT. Sin valor: extrae todas las marcas. Param URL: brands=X (confirmado en produccion).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "lastCreatedDays": {
            "title": "Anuncios de los ultimos N dias (opcional)",
            "minimum": 1,
            "maximum": 9999,
            "type": "integer",
            "description": "Opcional. Si se indica, solo extrae anuncios publicados en los ultimos N dias. Ejemplo: 30 = ultimo mes, 7 = ultima semana. Sin valor: extrae todos los anuncios. Param URL: lastcreateddays=N (confirmado en produccion)."
          },
          "continents": {
            "title": "Filtrar por continente (opcional)",
            "type": "array",
            "description": "Opcional. Lista con el continente a filtrar. ATENCION: Mascus solo acepta un continente a la vez; si introduces varios, solo se usa el primero. Valores validos: Europe (150), Americas (019), Asia (142), Oceania (009), Africa (002). Tambien acepta los codigos UN M49 directamente. Param URL: continentcodes=N (confirmado en produccion).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "forceRestart": {
            "title": "Forzar reinicio desde cero",
            "type": "boolean",
            "description": "Si esta activo, borra el checkpoint del run anterior y empieza desde el principio. Usar si cambias los catalogos o filtros entre sesiones.",
            "default": false
          },
          "maxPages": {
            "title": "Paginas maximas por subcategoria",
            "minimum": 1,
            "maximum": 9999,
            "type": "integer",
            "description": "40 items por pagina. Usa 1-2 para tests rapidos, 9999 para extraccion completa.",
            "default": 9999
          },
          "delaySeconds": {
            "title": "Pausa entre paginas (segundos)",
            "minimum": 0.5,
            "maximum": 10,
            "type": "number",
            "description": "Pausa base entre peticiones. Se anade un margen aleatorio de 1s automaticamente.",
            "default": 2
          },
          "proxyConfiguration": {
            "title": "Configuracion de proxy",
            "type": "object",
            "description": "Proxy de Apify recomendado. El actor rota IP automaticamente por subcategoria para evitar bloqueos."
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}