{
  "openapi": "3.0.1",
  "info": {
    "title": "MF Rural Scraper: Brazil Tractors, Trucks & Farm Machinery",
    "description": "Scrape mfrural.com.br, Brazil's farm and heavy machinery marketplace: tractor, harvester, truck and implement ads with price in BRL, make, model, year, hours, location and photos, plus official shops and tractor prices by year. Filter by category, brand, state, price and year. No login.",
    "version": "0.1",
    "x-build-id": "MtZILZu8PuKH0989O"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/recordsdata~mfrural-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-recordsdata-mfrural-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/recordsdata~mfrural-scraper/runs": {
      "post": {
        "operationId": "runs-sync-recordsdata-mfrural-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/recordsdata~mfrural-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-recordsdata-mfrural-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": {
          "mode": {
            "title": "What to collect",
            "enum": [
              "search",
              "urls",
              "dealers",
              "valuations"
            ],
            "type": "string",
            "description": "search = ads for the categories, brands, states and filters below (or a text search). urls = the ad, list, search, shop or price page addresses and ad numbers you list. dealers = official shop (Loja Oficial) profiles. valuations = average tractor prices per year of manufacture, from the site's price evaluation tool.",
            "default": "search"
          },
          "maxItems": {
            "title": "Maximum items",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "Stops after this many rows (all record types together). Free plans are limited to 10 items per run.",
            "default": 50
          },
          "categories": {
            "title": "Categories",
            "type": "array",
            "description": "Sections of the site to read (search mode). Each category is read page by page until it ends. Empty reads agricultural tractors, or the whole marketplace when a text search is given.",
            "items": {
              "type": "string",
              "enum": [
                "tractors",
                "harvesters",
                "heavy-machinery",
                "implements",
                "machinery-equipment",
                "trucks",
                "truck-bodies",
                "vehicles",
                "buses",
                "aircraft",
                "parts",
                "tires",
                "installations",
                "farms",
                "services",
                "fertilizers",
                "animal-nutrition",
                "seeds",
                "seedlings",
                "pesticides",
                "utensils",
                "packaging",
                "livestock",
                "medicines",
                "food",
                "import-export",
                "miscellaneous"
              ],
              "enumTitles": [
                "Agricultural tractors",
                "Combine harvesters",
                "Heavy and construction machinery",
                "Implements",
                "Machines and equipment",
                "Trucks",
                "Truck bodies and vans",
                "Cars, pickups and motorcycles",
                "Buses",
                "Aircraft",
                "Parts, additives and accessories",
                "Tires",
                "Farm installations",
                "Farms and rural property",
                "Services",
                "Fertilizers",
                "Animal nutrition",
                "Seeds",
                "Seedlings and cuttings",
                "Crop protection",
                "Farm utensils",
                "Packaging",
                "Animals",
                "Veterinary medicines",
                "Food",
                "Import and export",
                "Miscellaneous"
              ]
            }
          },
          "searchQuery": {
            "title": "Text search",
            "type": "string",
            "description": "Optional. Words to search on the site, for example John Deere 6125 or colheitadeira. The site search is fuzzy and returns its own relevance order, up to 110 pages (3,300 ads) per search. Combines with categories, states and cities, not with brands."
          },
          "brands": {
            "title": "Brands",
            "type": "array",
            "description": "Optional. Brands as listed in the site's own filter of each chosen category, for example John Deere, Massey Ferguson, New Holland or Valtra (tractors, trucks, heavy machinery). In other categories the same filter holds sub-types. A name the site does not list for a category is skipped with a warning that shows the available names. In the price references mode these are tractor brands.",
            "items": {
              "type": "string"
            }
          },
          "states": {
            "title": "States",
            "type": "array",
            "description": "Optional. Brazilian states to read, one list per state. Empty reads the whole country. In the price references mode each state gets its own state-level prices (empty = national prices).",
            "items": {
              "type": "string",
              "enum": [
                "Acre",
                "Alagoas",
                "Amapá",
                "Amazonas",
                "Bahia",
                "Ceará",
                "Distrito Federal",
                "Espírito Santo",
                "Goiás",
                "Maranhão",
                "Mato Grosso",
                "Mato Grosso do Sul",
                "Minas Gerais",
                "Pará",
                "Paraíba",
                "Paraná",
                "Pernambuco",
                "Piauí",
                "Rio de Janeiro",
                "Rio Grande do Norte",
                "Rio Grande do Sul",
                "Rondônia",
                "Roraima",
                "Santa Catarina",
                "São Paulo",
                "Sergipe",
                "Tocantins"
              ]
            }
          },
          "cities": {
            "title": "Cities",
            "type": "array",
            "description": "Optional. City names inside the one chosen state, for example Mirandópolis. Needs exactly one state. A city the site has no page for is skipped with a warning.",
            "items": {
              "type": "string"
            }
          },
          "condition": {
            "title": "Condition",
            "enum": [
              "all",
              "new",
              "used"
            ],
            "type": "string",
            "description": "New or used. The site writes the condition only on the ad page, so with this filter every candidate ad is opened and checked; ads without a stated condition are left out.",
            "default": "all"
          },
          "sellerType": {
            "title": "Seller type",
            "enum": [
              "all",
              "shop",
              "private"
            ],
            "type": "string",
            "description": "Official shops (Loja Oficial, businesses) or private sellers. Opens every candidate ad. Ads whose seller cannot be told are left out.",
            "default": "all"
          },
          "minPrice": {
            "title": "Minimum price (BRL)",
            "minimum": 0,
            "type": "integer",
            "description": "Only ads priced at or above this amount in reais. The listed price is compared whatever its unit. Ads with price on request are left out when a price limit is set. Leave empty for no limit."
          },
          "maxPrice": {
            "title": "Maximum price (BRL)",
            "minimum": 0,
            "type": "integer",
            "description": "Only ads priced at or below this amount in reais. Ads with price on request are left out when a price limit is set. Leave empty for no limit."
          },
          "minYear": {
            "title": "Earliest year",
            "minimum": 1900,
            "maximum": 2100,
            "type": "integer",
            "description": "Only machines of this year of manufacture or later. The year is read from the ad title and text, so every candidate ad is opened and ads without a stated year are left out."
          },
          "maxYear": {
            "title": "Latest year",
            "minimum": 1900,
            "maximum": 2100,
            "type": "integer",
            "description": "Only machines of this year of manufacture or earlier. Ads without a stated year are left out."
          },
          "onlyWithPrice": {
            "title": "Only ads with a price",
            "type": "boolean",
            "description": "Leaves out ads that show \"Preço sob consulta\" (price on request) instead of an amount.",
            "default": false
          },
          "startUrls": {
            "title": "Addresses",
            "type": "array",
            "description": "urls mode: mfrural.com.br addresses. Ads (/detalhe/962016), category lists (/produtos/1-44/tratores-agricolas, also with brand, state and city), text searches (/busca/trator-valtra), official shop pages (/jmtratoresadamantina) and tractor price pages (/avaliacao-preco-de-trator/...).",
            "items": {
              "type": "string"
            }
          },
          "listingIds": {
            "title": "Ad numbers",
            "type": "array",
            "description": "urls mode: ad numbers, the number after /detalhe/ in an ad address.",
            "items": {
              "type": "string"
            }
          },
          "dealerQuery": {
            "title": "Shop address contains",
            "type": "string",
            "description": "Dealers mode: keep only official shops whose address name (the part after mfrural.com.br/) contains these letters, for example tratores. Empty reads all official shops.",
            "default": ""
          },
          "models": {
            "title": "Tractor models",
            "type": "array",
            "description": "Price references mode: only models whose name contains one of these, for example 6125 or MX 135. Together with brands and states it narrows the price pages to read.",
            "items": {
              "type": "string"
            }
          },
          "fetchDetails": {
            "title": "Open every ad",
            "type": "boolean",
            "description": "Adds the full description, all photos, category path, brand and model, condition, year, hours, power, view count and, for official shops, the shop name. Costs one extra site request per ad and uses the detail event price. Switched on automatically by the condition, seller type and year filters.",
            "default": false
          },
          "includeContactDetails": {
            "title": "Keep shop contact details",
            "type": "boolean",
            "description": "Keeps phone numbers and e-mails written in the texts of official shops. Private sellers never get contact data: their phones, e-mails and names are removed from every text.",
            "default": false
          },
          "includeRaw": {
            "title": "Include raw fields",
            "type": "boolean",
            "description": "Adds a raw object with the unprocessed price text and the category path.",
            "default": false
          },
          "onlyNew": {
            "title": "Only new ads (monitor)",
            "type": "boolean",
            "description": "Return only ads this search has not returned before. The memory is stored in your own account. Schedule the run to watch the market.",
            "default": false
          },
          "trackPriceChanges": {
            "title": "Report price changes",
            "type": "boolean",
            "description": "With Only new ads: ads already seen whose price changed are returned again as changed-listing rows with the previous price.",
            "default": false
          },
          "stateKey": {
            "title": "Monitor name",
            "type": "string",
            "description": "Name of the memory used by Only new ads. Use one name per saved search. Empty derives a name from your filters.",
            "default": ""
          },
          "resetSeen": {
            "title": "Forget seen ads",
            "type": "boolean",
            "description": "Clears the memory of this search before the run.",
            "default": false
          },
          "maxSearchPages": {
            "title": "Maximum pages per list",
            "minimum": 1,
            "maximum": 600,
            "type": "integer",
            "description": "Stops each list or search after this many pages (24 ads per list page, 30 per search page). A text search is never longer than 110 pages because the site stops there.",
            "default": 100
          },
          "maxScanMinutes": {
            "title": "Time limit (minutes)",
            "minimum": 1,
            "maximum": 55,
            "type": "integer",
            "description": "Stops the run after this many minutes and keeps the rows already delivered. Condition, seller type and year filters open one ad page per candidate, which takes long when few ads match.",
            "default": 30
          },
          "maxConcurrency": {
            "title": "Parallel requests",
            "minimum": 1,
            "maximum": 6,
            "type": "integer",
            "description": "Ad pages read at the same time.",
            "default": 3
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}