{
  "openapi": "3.0.1",
  "info": {
    "title": "Tractor Junction Scraper: Used & New Tractors India",
    "description": "Scrape tractorjunction.com, India's tractor and farm machinery marketplace: used tractor, harvester and implement ads with price, year, location and photos, new tractor specs and prices, and certified dealers. No login, no proxy. Export JSON, CSV or Excel.",
    "version": "0.1",
    "x-build-id": "vad9uZiIqE0fjY2Wk"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/recordsdata~tractorjunction-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-recordsdata-tractorjunction-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~tractorjunction-scraper/runs": {
      "post": {
        "operationId": "runs-sync-recordsdata-tractorjunction-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~tractorjunction-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-recordsdata-tractorjunction-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": [
              "used-tractors",
              "used-harvesters",
              "used-implements",
              "new-tractors",
              "new-harvesters",
              "new-implements",
              "dealers",
              "urls"
            ],
            "type": "string",
            "description": "used-tractors, used-harvesters and used-implements = second-hand ads for the filters below. new-tractors, new-harvesters and new-implements = one row per new model with specifications and price. dealers = certified dealers. urls = addresses you list.",
            "default": "used-tractors"
          },
          "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
          },
          "states": {
            "title": "States",
            "type": "array",
            "description": "Indian states as written on the site, for example Uttar Pradesh, Madhya Pradesh, Rajasthan or Punjab. Used modes: only ads in these states. dealers: only dealers in these states. Odisha and Orissa both work. An unknown state is reported with the available ones. Empty means all of India.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "brands": {
            "title": "Brands",
            "type": "array",
            "description": "Brand names as written on the site, for example Mahindra, Swaraj, Massey Ferguson, John Deere or Sonalika. Case does not matter. Used tractors and new tractors read the site's brand list and report an unknown brand with the available ones. Used harvesters and implements take the brand address the site uses. dealers: only dealers of this brand. Empty means every brand.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "categories": {
            "title": "Implement categories",
            "type": "array",
            "description": "Implement categories as written on the site, for example Super Seeder, Rotary Tiller Rotavator, Cultivator, Thresher, Plough or Trolley. used-implements and new-implements only. Empty means every category.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "titleContains": {
            "title": "Model words",
            "type": "string",
            "description": "Only rows whose title contains all these words, for example 575 DI or XP Plus. Applies to used ads (by title) and to new models (by brand and model address).",
            "default": ""
          },
          "certifiedOnly": {
            "title": "Certified tractors only",
            "type": "boolean",
            "description": "used-tractors: only ads carrying the Certified badge (inspected by Tractor Junction).",
            "default": false
          },
          "priceFrom": {
            "title": "Minimum price (INR)",
            "minimum": 0,
            "maximum": 1000000000,
            "type": "integer",
            "description": "Only rows priced at or above this amount in rupees. Rows without a price are left out when a price limit is set. 0 or empty means no limit."
          },
          "priceTo": {
            "title": "Maximum price (INR)",
            "minimum": 0,
            "maximum": 1000000000,
            "type": "integer",
            "description": "Only rows priced at or below this amount in rupees."
          },
          "yearFrom": {
            "title": "Minimum year (used ads)",
            "minimum": 0,
            "maximum": 2100,
            "type": "integer",
            "description": "Only used ads of this year or newer (purchase or model year)."
          },
          "yearTo": {
            "title": "Maximum year (used ads)",
            "minimum": 0,
            "maximum": 2100,
            "type": "integer",
            "description": "Only used ads of this year or older."
          },
          "hpBands": {
            "title": "Horsepower bands (used tractors)",
            "type": "array",
            "description": "used-tractors only: ads whose engine falls in any of these bands. Empty means all powers.",
            "items": {
              "type": "string",
              "enum": [
                "1-20",
                "21-30",
                "31-40",
                "41-45",
                "46-50",
                "51-60",
                "61-75",
                "76-150"
              ],
              "enumTitles": [
                "Up to 20 HP",
                "21 to 30 HP",
                "31 to 40 HP",
                "41 to 45 HP",
                "46 to 50 HP",
                "51 to 60 HP",
                "61 to 75 HP",
                "76 HP and above"
              ]
            },
            "default": []
          },
          "powerFrom": {
            "title": "Minimum engine power (HP, new models)",
            "minimum": 0,
            "maximum": 1000,
            "type": "integer",
            "description": "new-tractors and new-harvesters: only models with at least this horsepower. The model pages are read first, so a narrow range reads more pages than it delivers."
          },
          "powerTo": {
            "title": "Maximum engine power (HP, new models)",
            "minimum": 0,
            "maximum": 1000,
            "type": "integer",
            "description": "new-tractors and new-harvesters: only models with at most this horsepower."
          },
          "startUrls": {
            "title": "Addresses",
            "type": "array",
            "description": "urls mode. tractorjunction.com addresses: a used-ad page (/used-tractor/mahindra/.../123456/), a used list (/used-tractors-for-sell/?brandid=55, /used-harvester-for-sell/, /used-farm-implements-in-punjab/), a model page (/mahindra-tractor/475-di/, /harvester/2/preet-987/, /implement/fieldking/sugar-cane-loader/), a brand page (/mahindra-tractor/) or a dealer page (/certified-dealers/madhya-pradesh/swastik-motors-satna/).",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "scrapeDetails": {
            "title": "Read each ad page (details)",
            "type": "boolean",
            "description": "Used modes: opens every ad page to add the full description, horsepower, tyre and engine condition, reference number, comparison price and inspection checklist (tractors) or power source, crop and listing date (harvesters and implements). Slower, one extra page per ad, and billed as a detail record.",
            "default": false
          },
          "onlyNew": {
            "title": "Only new rows (monitor)",
            "type": "boolean",
            "description": "Skips every row delivered in an earlier run with the same monitor name, so scheduled runs return only what is new and you pay only for those.",
            "default": false
          },
          "trackPriceChanges": {
            "title": "Also report price changes",
            "type": "boolean",
            "description": "With Only new rows: an ad or model already delivered is delivered again when its price changed, with the previous price, the difference and the change type.",
            "default": false
          },
          "stateKey": {
            "title": "Monitor name",
            "type": "string",
            "description": "Name of the memory used by Only new rows. Use one name per saved search. Empty derives a name from your filters.",
            "default": ""
          },
          "resetSeen": {
            "title": "Reset the monitor memory",
            "type": "boolean",
            "description": "Forgets what earlier runs delivered for this monitor name before this run starts.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Optional. Empty means direct requests, which work. Add a proxy only if your own network needs one."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}