{
  "openapi": "3.0.1",
  "info": {
    "title": "Automobile.tn Scraper: Tunisia Used Cars, New Prices, Dealers",
    "description": "Scrape automobile.tn, the Tunisian car marketplace: used car ads with price in TND, mileage, fuel, gearbox and seller type, the new car price catalog with full spec sheets, and dealer directories. Filter by make, model, price, year and governorate. No login, no proxy.",
    "version": "0.1",
    "x-build-id": "gmEevcAJbQBUSxYZA"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/recordsdata~automobile-tn-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-recordsdata-automobile-tn-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~automobile-tn-scraper/runs": {
      "post": {
        "operationId": "runs-sync-recordsdata-automobile-tn-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~automobile-tn-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-recordsdata-automobile-tn-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 collect?",
            "enum": [
              "usedCars",
              "newCars",
              "dealers"
            ],
            "type": "string",
            "description": "Used cars = classified ads, new cars = price catalog, dealers = used-car sellers and official dealer groups. Example: Used cars.",
            "default": "usedCars"
          },
          "maxItems": {
            "title": "Max rows to return",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "Stops after this many rows. Free plans are capped at 10 rows per run. Example: 100.",
            "default": 50
          },
          "makes": {
            "title": "Brands (e.g. Peugeot)",
            "type": "array",
            "description": "One per line, as written on the site, for example Peugeot, Volkswagen, BMW. Empty searches every brand.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "models": {
            "title": "Models (e.g. 208)",
            "type": "array",
            "description": "Models of the brands above, for example 208 or Golf 7. A family name such as A3 also reads its variants.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "keyword": {
            "title": "Keyword (optional)",
            "type": "string",
            "description": "Free text matched by the site search in used and new car titles and descriptions. In dealers mode it keeps the dealers whose name or address contains the text.",
            "default": ""
          },
          "sort": {
            "title": "Sort results by",
            "enum": [
              "newest",
              "oldest",
              "price-asc",
              "price-desc",
              "mileage-asc",
              "mileage-desc",
              "year-desc",
              "year-asc",
              "best-ranked",
              "recently-refreshed"
            ],
            "type": "string",
            "description": "Order of the results. Used cars support every option. New cars support price-asc, price-desc, best-ranked and recently-refreshed; other values fall back to the site default with a warning. Monitor runs always read the newest used ads first.",
            "default": "newest"
          },
          "priceFrom": {
            "title": "Min price (TND)",
            "minimum": 0,
            "type": "integer",
            "description": "Lowest price in Tunisian dinars, for example 20000. Empty means no limit."
          },
          "priceTo": {
            "title": "Max price (TND)",
            "minimum": 0,
            "type": "integer",
            "description": "Highest price in Tunisian dinars, for example 60000. Empty means no limit."
          },
          "yearFrom": {
            "title": "Min model year (used cars)",
            "minimum": 0,
            "type": "integer",
            "description": "Oldest model year, for example 2015. Used cars only. Empty means no limit."
          },
          "yearTo": {
            "title": "Max model year (used cars)",
            "minimum": 0,
            "type": "integer",
            "description": "Newest model year, for example 2022. Used cars only. Empty means no limit."
          },
          "mileageFrom": {
            "title": "Min mileage (km, used cars)",
            "minimum": 0,
            "type": "integer",
            "description": "Lowest odometer reading in km, for example 0. Used cars only. Empty means no limit."
          },
          "mileageTo": {
            "title": "Max mileage (km, used cars)",
            "minimum": 0,
            "type": "integer",
            "description": "Highest odometer reading in km, for example 120000. Used cars only. Empty means no limit."
          },
          "bodyTypes": {
            "title": "Body type",
            "type": "array",
            "description": "Keep only these body styles. Minibus exists only for new cars and other only for used cars.",
            "items": {
              "type": "string",
              "enum": [
                "city-car",
                "compact",
                "sedan",
                "suv",
                "coupe",
                "minivan",
                "van",
                "pickup",
                "convertible",
                "minibus",
                "other"
              ],
              "enumTitles": [
                "City car (Citadine)",
                "Compact (Compacte)",
                "Sedan (Berline)",
                "SUV",
                "Coupe",
                "Minivan (Monospace)",
                "Van / utility (Utilitaire)",
                "Pickup",
                "Convertible (Cabriolet)",
                "Minibus (new cars only)",
                "Other (used cars only)"
              ]
            },
            "default": []
          },
          "fuelTypes": {
            "title": "Fuel type",
            "type": "array",
            "description": "Keep only these fuels. Hybrid, plug-in hybrid and mild hybrid are separate choices; range-extender exists only for new cars. The used-car list shows every hybrid as \"Hybride\", so with a hybrid choice and \"Open every page\" off a plug-in can appear among plain hybrids.",
            "items": {
              "type": "string",
              "enum": [
                "petrol",
                "diesel",
                "electric",
                "hybrid",
                "plugin-hybrid",
                "mild-hybrid",
                "range-extender"
              ],
              "enumTitles": [
                "Petrol (Essence)",
                "Diesel",
                "Electric",
                "Hybrid",
                "Plug-in hybrid",
                "Mild hybrid",
                "Range extender REEV (new cars only)"
              ]
            },
            "default": []
          },
          "gearboxes": {
            "title": "Gearbox",
            "type": "array",
            "description": "Keep only manual or automatic cars.",
            "items": {
              "type": "string",
              "enum": [
                "manual",
                "automatic"
              ],
              "enumTitles": [
                "Manual",
                "Automatic"
              ]
            },
            "default": []
          },
          "driveTypes": {
            "title": "Drive type",
            "type": "array",
            "description": "Keep only front-wheel (Traction), rear-wheel (Propulsion) or all-wheel (Integrale) drive.",
            "items": {
              "type": "string",
              "enum": [
                "fwd",
                "rwd",
                "awd"
              ],
              "enumTitles": [
                "Front-wheel drive (Traction)",
                "Rear-wheel drive (Propulsion)",
                "All-wheel drive (Integrale)"
              ]
            },
            "default": []
          },
          "taxHorsepowerFrom": {
            "title": "Min tax horsepower (CV)",
            "minimum": 0,
            "type": "integer",
            "description": "Fiscal horsepower (puissance fiscale, CV) from. This number sets the annual tax in Tunisia. 0 or empty means no limit."
          },
          "taxHorsepowerTo": {
            "title": "Max tax horsepower (CV)",
            "minimum": 0,
            "type": "integer",
            "description": "Fiscal horsepower (puissance fiscale, CV) up to. 0 or empty means no limit."
          },
          "seatsFrom": {
            "title": "Min seats (new cars)",
            "minimum": 0,
            "type": "integer",
            "description": "New cars: at least this many seats. 0 or empty means no limit."
          },
          "governorates": {
            "title": "Governorate (used cars)",
            "type": "array",
            "description": "Used cars: only ads located in these governorates.",
            "items": {
              "type": "string",
              "enum": [
                "tunis",
                "sfax",
                "tozeur",
                "ariana",
                "nabeul",
                "sousse",
                "bizerte",
                "ben-arous",
                "beja",
                "gabes",
                "gafsa",
                "jendouba",
                "kairouan",
                "kasserine",
                "kebili",
                "manouba",
                "kef",
                "mahdia",
                "medenine",
                "monastir",
                "sidi-bouzid",
                "siliana",
                "zaghouan"
              ],
              "enumTitles": [
                "Tunis",
                "Sfax",
                "Tozeur",
                "Ariana",
                "Nabeul",
                "Sousse",
                "Bizerte",
                "Ben Arous",
                "Béja",
                "Gabès",
                "Gafsa",
                "Jendouba",
                "Kairouan",
                "Kasserine",
                "Kébili",
                "La Manouba",
                "Le Kef",
                "Mahdia",
                "Médenine",
                "Monastir",
                "Sidi Bouzid",
                "Siliana",
                "Zaghouan"
              ]
            },
            "default": []
          },
          "colors": {
            "title": "Color (used cars, needs Open every page)",
            "type": "array",
            "description": "Used cars: exterior color. Checked on the ad page, so it needs \"Open every page\".",
            "items": {
              "type": "string",
              "enum": [
                "black",
                "silver",
                "anthracite",
                "shark-grey",
                "white",
                "red",
                "blue",
                "beige",
                "yellow",
                "orange",
                "green",
                "aubergine",
                "brown",
                "other"
              ],
              "enumTitles": [
                "Black",
                "Silver grey",
                "Anthracite grey",
                "Shark grey",
                "White",
                "Red",
                "Blue",
                "Beige",
                "Yellow",
                "Orange",
                "Green",
                "Aubergine",
                "Brown",
                "Other"
              ]
            },
            "default": []
          },
          "sellerType": {
            "title": "Seller type (used cars)",
            "enum": [
              "all",
              "professional",
              "private"
            ],
            "type": "string",
            "description": "Used cars: professional sellers only, private sellers only, or both. Each row says isPrivateSeller; private sellers never expose a name, phone or email.",
            "default": "all"
          },
          "priceTypes": {
            "title": "Price type (used cars)",
            "type": "array",
            "description": "Used cars: regular price, leasing offers or duty-unpaid cars.",
            "items": {
              "type": "string",
              "enum": [
                "regular",
                "leased",
                "duty-unpaid"
              ],
              "enumTitles": [
                "Regular price",
                "Under leasing",
                "Duty unpaid (Non dedouane)"
              ]
            },
            "default": []
          },
          "valuations": {
            "title": "Price vs market (used cars)",
            "type": "array",
            "description": "Used cars: keep ads that the site rates as a very good, good or fair price against the market.",
            "items": {
              "type": "string",
              "enum": [
                "very-good",
                "good",
                "fair"
              ],
              "enumTitles": [
                "Very good price",
                "Good price",
                "Fair price"
              ]
            },
            "default": []
          },
          "equipment": {
            "title": "Must-have equipment (used cars, needs Open every page)",
            "type": "array",
            "description": "Used cars: every selected item must be present on the ad (all of them, not any). Checked on the ad page, so it needs \"Open every page\".",
            "items": {
              "type": "string",
              "enum": [
                "abs",
                "front-airbags",
                "side-airbags",
                "curtain-airbags",
                "alarm",
                "immobilizer",
                "traction-control",
                "tyre-pressure-monitor",
                "isofix",
                "runflat-tyres",
                "tropicalised-radiator",
                "rear-camera",
                "camera-360",
                "electric-tailgate",
                "alloy-wheels",
                "parking-sensors",
                "metallic-paint",
                "led-lights",
                "xenon-headlights",
                "full-led-headlights",
                "fog-lights",
                "headlight-washers",
                "sunroof",
                "panoramic-roof",
                "tinted-windows",
                "auto-headlights",
                "keyless-entry",
                "start-stop-button",
                "air-conditioning",
                "automatic-climate",
                "power-steering",
                "rain-sensor",
                "central-locking",
                "trip-computer",
                "cruise-control",
                "semi-autonomous-driving",
                "electric-mirrors",
                "folding-mirrors",
                "electric-windows",
                "air-suspension",
                "park-assist",
                "front-armrest",
                "rear-armrest",
                "head-up-display",
                "radio",
                "radio-cd",
                "radio-cd-mp3",
                "apple-carplay",
                "android-auto",
                "bluetooth",
                "cooled-glovebox",
                "cd-changer",
                "aux-usb",
                "navigation",
                "paddle-shifters",
                "sport-seats",
                "heated-seats",
                "massage-seats",
                "ventilated-seats",
                "height-adjustable-seats",
                "electric-seats",
                "leather-steering-wheel",
                "multifunction-steering-wheel",
                "rear-headrests",
                "adjustable-steering-wheel",
                "heated-steering-wheel",
                "digital-cluster"
              ],
              "enumTitles": [
                "ABS",
                "Front airbags",
                "Side airbags",
                "Curtain airbags",
                "Alarm",
                "Electronic immobilizer",
                "Traction control",
                "Tyre pressure monitoring",
                "ISOFIX anchors",
                "Run-flat tyres",
                "Tropicalised radiator",
                "Rear camera",
                "360 cameras",
                "Electric tailgate",
                "Alloy wheels",
                "Rear parking sensors",
                "Metallic paint",
                "LED lights",
                "Xenon headlights",
                "Full LED headlights",
                "Fog lights",
                "Headlight washers",
                "Sunroof",
                "Panoramic roof",
                "Tinted windows",
                "Automatic headlights",
                "Keyless entry",
                "Start and stop button",
                "Air conditioning",
                "Automatic climate control",
                "Power steering",
                "Rain sensor",
                "Central locking",
                "Trip computer",
                "Cruise control",
                "Semi-autonomous driving",
                "Electric mirrors",
                "Folding mirrors",
                "Electric windows",
                "Air suspension",
                "Park assist",
                "Front armrest",
                "Rear armrest",
                "Head-up display",
                "Radio",
                "Radio CD",
                "Radio CD/MP3",
                "Apple CarPlay",
                "Android Auto",
                "Bluetooth",
                "Cooled glovebox",
                "CD changer",
                "Aux, USB, iPod connectivity",
                "Navigation",
                "Paddle shifters",
                "Sport seats",
                "Heated seats",
                "Massage seats",
                "Ventilated seats",
                "Height-adjustable seats",
                "Electric seats",
                "Leather steering wheel and gear lever",
                "Multifunction steering wheel",
                "3 rear headrests",
                "Steering wheel adjustable for height and depth",
                "Heated steering wheel",
                "Digital instrument cluster"
              ]
            },
            "default": []
          },
          "dealerKind": {
            "title": "Dealer kind (dealers mode)",
            "enum": [
              "all",
              "usedSellers",
              "officialDealers"
            ],
            "type": "string",
            "description": "dealers mode: professional used-car sellers, official new-car dealer groups, or both (alternating).",
            "default": "all"
          },
          "startUrls": {
            "title": "Page addresses (URLs)",
            "type": "array",
            "description": "Addresses copied from automobile.tn: a used ad (/fr/occasion/audi/a4/12345), a used search (/fr/occasion?brand[0]=audi), a seller stock (/fr/occasion/vendeurs-pro/name), the seller list, a new car search, model or version (/fr/neuf/skoda/fabia), the official dealer list or one dealer group. When filled, these replace the mode and the filters.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "listingIds": {
            "title": "Ad numbers (used cars)",
            "type": "array",
            "description": "Used car ad numbers (the number at the end of an ad address). The actor finds each ad in the site sitemap and reads its page.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "scrapeDetails": {
            "title": "Open every page (slower, richer rows)",
            "type": "boolean",
            "description": "On (default): used cars read each ad page (all photos, description, equipment, seller), new cars return one row per version with the full spec sheet. Off: list data only, much faster.",
            "default": true
          },
          "includeContactDetails": {
            "title": "Add business phones (professionals only)",
            "type": "boolean",
            "description": "Adds the business phone numbers and fax of professional sellers and dealers, and keeps phone numbers that a business wrote in its descriptions. Private seller names, phones and emails are never output.",
            "default": false
          },
          "includeRaw": {
            "title": "Add raw source data (debug)",
            "type": "boolean",
            "description": "Adds a raw object with the unparsed list card, structured data and spec tables of each row, for debugging.",
            "default": false
          },
          "onlyNew": {
            "title": "Only new results",
            "type": "boolean",
            "description": "Skips every record seen by an earlier run with the same monitor name, so scheduled runs return only what is new and you pay only for those. Used cars are read newest first and the scan stops at the first page of known ads.",
            "default": false
          },
          "stateKey": {
            "title": "Monitor name (optional)",
            "type": "string",
            "description": "Name of the memory used by Only new results. Use one name per saved search. Empty derives the name from your filters.",
            "default": ""
          },
          "resetSeen": {
            "title": "Forget previous results before this run",
            "type": "boolean",
            "description": "Clears the memory of the monitor name before this run.",
            "default": false
          },
          "maxConcurrency": {
            "title": "Parallel requests",
            "minimum": 1,
            "maximum": 4,
            "type": "integer",
            "description": "Pages read in parallel. Requests are also spaced at least 350 ms apart across all workers, so more parallelism only helps with slow pages.",
            "default": 3
          },
          "proxyConfiguration": {
            "title": "Proxy (not needed)",
            "type": "object",
            "description": "Leave off: direct requests work from Apify. Add a datacenter 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}