{
  "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": "RlHLo0aoTyUwAiNP4"
  },
  "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 do you want to do?",
            "enum": [
              "search",
              "urls",
              "dealers",
              "valuations"
            ],
            "type": "string",
            "description": "Search ads = ads by category, brand, state and filters (default). Addresses = ad, list, search or shop pages you paste. Official shops = Loja Oficial profiles. Price references = average tractor price per year of manufacture.",
            "default": "search"
          },
          "maxItems": {
            "title": "Max results (rows)",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "Stops after this many rows, all record types together. Example: 50. Free plans are capped at 10 per run.",
            "default": 50
          },
          "categories": {
            "title": "Category",
            "type": "array",
            "description": "Sections of the site to read. Example: Tractors, Harvesters, Trucks. Empty reads tractors, or the whole marketplace when you give a text search.",
            "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": "Search words",
            "type": "string",
            "description": "Example: John Deere 6125 or colheitadeira. Fuzzy search, up to 3,300 ads per search. Combines with category, state and city, not with brand."
          },
          "brands": {
            "title": "Brand",
            "type": "array",
            "description": "Brands from the site's own filter. Example: John Deere, Massey Ferguson, New Holland, Valtra. A name the site does not list is skipped with a warning showing the available names.",
            "items": {
              "type": "string"
            }
          },
          "states": {
            "title": "State",
            "type": "array",
            "description": "Brazilian states to read. Example: Goias. Empty reads the whole country (national prices in Price references mode).",
            "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": "City (needs exactly one state)",
            "type": "array",
            "description": "Example: Mirandopolis. Pick exactly one State first. A city the site has no page for is skipped with a warning.",
            "items": {
              "type": "string"
            }
          },
          "minPrice": {
            "title": "Min price (BRL)",
            "minimum": 0,
            "type": "integer",
            "description": "Reais. Example: 100000. Ads with price on request are left out when a price limit is set. Empty means no limit."
          },
          "maxPrice": {
            "title": "Max price (BRL)",
            "minimum": 0,
            "type": "integer",
            "description": "Reais. Example: 400000. Empty means no limit."
          },
          "onlyWithPrice": {
            "title": "Hide 'price on request' ads",
            "type": "boolean",
            "description": "Leaves out ads that show 'Preco sob consulta' instead of an amount. Default: off.",
            "default": false
          },
          "minYear": {
            "title": "Earliest year of manufacture (opens every ad)",
            "minimum": 1900,
            "maximum": 2100,
            "type": "integer",
            "description": "Example: 2015. Read from the ad text; ads without a stated year are left out."
          },
          "maxYear": {
            "title": "Latest year of manufacture (opens every ad)",
            "minimum": 1900,
            "maximum": 2100,
            "type": "integer",
            "description": "Example: 2024. Ads without a stated year are left out."
          },
          "condition": {
            "title": "New or used (opens every ad)",
            "enum": [
              "all",
              "new",
              "used"
            ],
            "type": "string",
            "description": "The site shows condition only on the ad page, so every candidate ad is opened and checked; ads without a stated condition are left out. Default: all.",
            "default": "all"
          },
          "sellerType": {
            "title": "Seller type (opens every ad)",
            "enum": [
              "all",
              "shop",
              "private"
            ],
            "type": "string",
            "description": "Official shops (businesses) or private sellers. Ads whose seller cannot be told are left out. Default: all.",
            "default": "all"
          },
          "startUrls": {
            "title": "Ad, list, search or shop addresses",
            "type": "array",
            "description": "mfrural.com.br addresses. Example: /detalhe/962016 (ad), /produtos/1-44/tratores-agricolas (list), /busca/trator-valtra (search), /jmtratoresadamantina (shop).",
            "items": {
              "type": "string"
            }
          },
          "listingIds": {
            "title": "Ad numbers",
            "type": "array",
            "description": "The number after /detalhe/ in an ad address. Example: 962016.",
            "items": {
              "type": "string"
            }
          },
          "dealerQuery": {
            "title": "Shop address contains",
            "type": "string",
            "description": "Keeps official shops whose address name (the part after mfrural.com.br/) contains this text. Example: tratores. Empty reads all official shops.",
            "default": ""
          },
          "models": {
            "title": "Tractor models",
            "type": "array",
            "description": "Only models whose name contains one of these. Example: 6125, MX 135. Together with Brand and State it narrows the price pages read.",
            "items": {
              "type": "string"
            }
          },
          "fetchDetails": {
            "title": "Open every ad for full detail",
            "type": "boolean",
            "description": "Adds full description, all photos, category path, brand, model, condition, year, hours, power, views and shop name. One extra request per ad, billed as a detail event. Switched on automatically by the condition, seller and year filters. Default: off.",
            "default": false
          },
          "includeContactDetails": {
            "title": "Keep official 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. Default: off.",
            "default": false
          },
          "includeRaw": {
            "title": "Include raw fields",
            "type": "boolean",
            "description": "Adds a raw object with the unprocessed price text and category path. Default: off.",
            "default": false
          },
          "onlyNew": {
            "title": "Only new ads since last run",
            "type": "boolean",
            "description": "Returns only ads this search has not returned before. Memory is stored in your own account. Use with a schedule. Default: off.",
            "default": false
          },
          "trackPriceChanges": {
            "title": "Report price changes",
            "type": "boolean",
            "description": "Needs 'Only new ads'. Ads already seen whose price changed come back as changed-listing rows with the previous price.",
            "default": false
          },
          "stateKey": {
            "title": "Monitor name",
            "type": "string",
            "description": "One name per saved search. Example: tractors-goias. Empty derives a name from your filters.",
            "default": ""
          },
          "resetSeen": {
            "title": "Start monitoring from scratch",
            "type": "boolean",
            "description": "Clears the memory of this search before the run. Default: off.",
            "default": false
          },
          "maxSearchPages": {
            "title": "Max 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). Text search ends at 110 pages. Default: 100.",
            "default": 100
          },
          "maxScanMinutes": {
            "title": "Time limit (minutes)",
            "minimum": 1,
            "maximum": 55,
            "type": "integer",
            "description": "Stops the run after this long and keeps rows already delivered. Filters that open every ad take long when few ads match. Default: 30.",
            "default": 30
          },
          "maxConcurrency": {
            "title": "Parallel requests (1 to 6)",
            "minimum": 1,
            "maximum": 6,
            "type": "integer",
            "description": "Ad pages read at the same time. Default: 3.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}