Automobile.tn explained
In Tunisia, a car's fiscal horsepower (puissance fiscale, in CV) is a tax rating rather than a measure of engine output, and regulators can revise a model's rating, which then changes its registration and annual vehicle taxes. Tunisia itself is divided into 24 governorates, the country's first-level administrative divisions, each further split into delegations, municipalities and sectors. A used car advertised as 'non dédouané' has not yet cleared customs, so its import duties and paperwork remain unresolved before a sale.
Automobile.tn API: finding a brand and model before searching
Call automobile-tn-makes with no body.brand to read every brand with live used-car adverts, each with a count of how many. Send one of those slugs back as body.brand (also accepted as make) to the same operation and it answers that brand's models instead, each with its own count.
Either slug then feeds automobile-tn-search: body.brand alone narrows a search to one brand, and body.model on top of it narrows further to one model within that brand, rather than searching across the whole catalogue on every call. This brand and model pairing covers only the used-car side: the new-car price list behind automobile-tn-new-search, automobile-tn-new-version and automobile-tn-new-versions uses its own separate brand slugs from automobile-tn-new-brands, so a slug read from automobile-tn-makes does not necessarily work on those three operations.
Searching used-car listings, then opening one in full
Send body.brand, body.fuel or any of the other filters to automobile-tn-search and read each row's own url. Passing that url straight on as body.url to automobile-tn-listing opens the same car's full record — price, mileage, equipment, photos and seller — without re-sending any of the filters that found it in the first place.
body.query (also accepted as q or keyword) works the same way alongside body.brand and body.fuel, narrowing by a model name or keyword before any row is opened. The sequence below searches Volkswagen listings sold on petrol (essence) before opening one result in full.
- Send
body.brandset tovolkswagenandbody.fuelset toessencetoautomobile-tn-search. - Pick a row from
listingsand copy itsurl. - Send that row's
urlasbody.urltoautomobile-tn-listing.
Paging through a used-car search without losing track
automobile-tn-search answers 12 listings at a time; raising body.page on the next call moves further into the same filtered search rather than starting it over, as long as every other filter is sent again unchanged. has_more marks whether a further page follows the one just read, while page_clamped marks a different case: a body.page value that is valid on its own but runs past the matching listings this search actually has. Treat the two separately rather than stopping a paged walk only once an empty page comes back — page_clamped can mark that the last useful page has already been read.
Narrowing a used-car search by governorate and price type
body.governorate takes one governorate name or a comma-separated list, written with letters, spaces, apostrophes and hyphens and with accents optional, so la manouba and le kef are both valid as sent. body.price_type set to duty_unpaid narrows to cars still priced without duty paid, kept apart from regular and leased pricing; combine it with body.governorate in the same call to find such cars in one region, since the two filters apply together rather than overriding each other. Checking the facets object on the same response, rather than guessing, is what confirms which governorates still have matches once body.price_type has already narrowed the result set this far.
Browsing the new-car catalogue from a model card to one version's spec
Call automobile-tn-new-search with body.body_type and body.price_max to page through model cards, each with a price_from_tnd for its cheapest version. A card's badge and discount_tnd mark a promotion before you ever open a version, so filtering first on automobile-tn-new-search can narrow a long model list down to only the ones worth opening in full.
A card that already names a single_version_slug can be read in full straight away; otherwise call automobile-tn-new-versions with the card's brand_slug and model_slug first, to list every version of that model. Either path ends at automobile-tn-new-version, called with body.url or with body.brand, body.model and body.version together, for that one version's full spec sheet.
- Send
body.body_typeset tosuvandbody.price_maxset to120000toautomobile-tn-new-search. - Send the card's
brand_slugandmodel_slugasbody.brandandbody.modeltoautomobile-tn-new-versions. - Send a
version_slugfrom that list asbody.version, together with the samebody.brandandbody.model, toautomobile-tn-new-version.
Reading a new car's duty-free USD price next to its TND price
automobile-tn-new-version and automobile-tn-new-versions both carry price_tnd for every version, while automobile-tn-new-version's price_usd_duty_free appears only where the importer has published a duty-free USD figure for that version. Reading the two side by side, rather than assuming one always accompanies the other, is what tells a buyer whether a duty-free comparison is actually available for a given version before relying on it.
automobile-tn-new-versions also carries discount_computed_tnd next to each version's own badge, separate from the discount_tnd badge that an automobile-tn-new-search model card shows. That computed figure is built from comparing a version's price_old_tnd against its current price_tnd, so a caller does not need to subtract the two itself to see the size of a promotion.
[
{
"body": {
"brand": "volkswagen",
"fuel": ["essence"],
"sort": "price_asc"
}
},
{
"body": {
"url": "https://www.automobile.tn/fr/occasion/audi/q5/131079"
}
}
]{
"body": {
"body_type": ["suv"],
"price_max": 120000,
"sort": "price_asc"
}
}Server-side request template
This server-side template shows authentication and request identity using the first operation of this API. Choose the operation for your use case and check its current availability and price on the API page. After a timeout, resend the unchanged request with the same Idempotency-Key.
The gateway request is always POST.
Use a JSON object with the documented path, query, headers and body locations; omit unused locations. input.headers is JSON data for the operation, not browser request headers. Do not put credentials here. Keep body arrays, scalar values and null as documented; omission is different from null.
# Server-side only. Set KAKIAPI_API_KEY in your secret manager.
# Every gateway operation is called with POST.
# Only operations shown as enabled on the API page can be called.
# Generate once per intent; retain the same value on status checks.
REQUEST_ID="$(uuidgen)"
curl --request POST 'https://kakiapi.com/api/v1/automobile-tn/automobile-tn-listing' \
--header "Content-Type: application/json" \
--header "x-api-key: $KAKIAPI_API_KEY" \
--header "Idempotency-Key: $REQUEST_ID" \
--data '{"body":{"url":"https://www.automobile.tn/fr/occasion/audi/q5/131079"}}'Integration checklist
- The API key is stored in a server-side secret manager and never sent to a browser.
- Each request carries its own Idempotency-Key, kept until the request has a final answer.
- The integration reads ok and error.code and handles each error code as the error table describes.
- An uncertain POST is inspected using its original identity, never blindly repeated with a new one.
- The operation’s current availability and price have been checked on its API page.
Automobile.tn Tunisia Car Listings and Prices API overview and prices · Read the API reference · Try it in the playground