{
  "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": "8TLcapAm9L9mvcZQT"
  },
  "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 to collect",
            "enum": [
              "usedCars",
              "newCars",
              "dealers"
            ],
            "type": "string",
            "description": "usedCars = classified ads for used cars. newCars = the new car price catalog (one row per model, or one row per version with the full spec sheet when \"Open every page\" is on). dealers = professional used-car sellers and official dealer groups. Addresses or ad numbers below replace this choice.",
            "default": "usedCars"
          },
          "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
          },
          "makes": {
            "title": "Makes",
            "type": "array",
            "description": "Car brands as written on the site, for example Peugeot, Volkswagen, Mercedes-Benz or BMW. Empty searches every brand. Several brands are read in one search. In dealers mode it keeps the official dealers that sell the brand.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "models": {
            "title": "Models",
            "type": "array",
            "description": "Models of the chosen makes, for example 208, Golf 7 or Classe C. A name that starts a family (for example A3) also reads its variants (A3 Sportback). Without makes, every brand that has such a model is searched.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "keyword": {
            "title": "Keyword",
            "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",
            "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": "Minimum price (TND)",
            "minimum": 0,
            "type": "integer",
            "description": "Only cars priced at or above this amount in Tunisian dinars. 0 or empty means no limit. For new cars the price of each version is checked."
          },
          "priceTo": {
            "title": "Maximum price (TND)",
            "minimum": 0,
            "type": "integer",
            "description": "Only cars priced at or below this amount in Tunisian dinars. 0 or empty means no limit."
          },
          "yearFrom": {
            "title": "Minimum year (used)",
            "minimum": 0,
            "type": "integer",
            "description": "Used cars: model year from. 0 or empty means no limit."
          },
          "yearTo": {
            "title": "Maximum year (used)",
            "minimum": 0,
            "type": "integer",
            "description": "Used cars: model year to. 0 or empty means no limit."
          },
          "mileageFrom": {
            "title": "Minimum mileage km (used)",
            "minimum": 0,
            "type": "integer",
            "description": "Used cars: odometer from, in kilometres. 0 or empty means no limit."
          },
          "mileageTo": {
            "title": "Maximum mileage km (used)",
            "minimum": 0,
            "type": "integer",
            "description": "Used cars: odometer up to, in kilometres. 0 or empty means no limit."
          },
          "taxHorsepowerFrom": {
            "title": "Minimum 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": "Maximum tax horsepower (CV)",
            "minimum": 0,
            "type": "integer",
            "description": "Fiscal horsepower (puissance fiscale, CV) up to. 0 or empty means no limit."
          },
          "seatsFrom": {
            "title": "Minimum seats (new)",
            "minimum": 0,
            "type": "integer",
            "description": "New cars: at least this many seats. 0 or empty means no limit."
          },
          "bodyTypes": {
            "title": "Body types",
            "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 types",
            "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": "Gearboxes",
            "type": "array",
            "description": "Keep only manual or automatic cars.",
            "items": {
              "type": "string",
              "enum": [
                "manual",
                "automatic"
              ],
              "enumTitles": [
                "Manual",
                "Automatic"
              ]
            },
            "default": []
          },
          "driveTypes": {
            "title": "Drive types",
            "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": []
          },
          "governorates": {
            "title": "Governorates (used)",
            "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": "Colors (used)",
            "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)",
            "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 types (used)",
            "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 rating (used)",
            "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": "Equipment (used)",
            "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": []
          },
          "startUrls": {
            "title": "Addresses",
            "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",
            "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"
            }
          },
          "dealerKind": {
            "title": "Dealer kind",
            "enum": [
              "all",
              "usedSellers",
              "officialDealers"
            ],
            "type": "string",
            "description": "dealers mode: professional used-car sellers, official new-car dealer groups, or both (alternating).",
            "default": "all"
          },
          "scrapeDetails": {
            "title": "Open every page",
            "type": "boolean",
            "description": "On: used cars read each ad page (full photo gallery, description, equipment, color, seller block; vehicle-detail-record), new cars return one row per version with the full spec sheet (new-version-record), dealers add stock counts or map coordinates. Off: only the list data, much faster (vehicle-record, new-model-record).",
            "default": true
          },
          "includeContactDetails": {
            "title": "Include business contact details",
            "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": "Include raw data",
            "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 (monitor)",
            "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",
            "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 seen records",
            "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",
            "type": "object",
            "description": "Optional. Empty means direct requests, which 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}