Documentation
Automobile.tn API reference for 7 operations
Reference for the Automobile.tn API: what each of its 7 operations' inputs accept, and what each operation's response fields mean.
See also: Automobile.tn Tunisia Car Listings and Prices API overview and prices · Automobile.tn API Guide: Used and New-Car Search
On this page
Automobile.tn API reference: automobile-tn-listing, passing url or id
body.url is the advert's own page address — the same address a row from automobile-tn-search already carries — and reads straight from it. body.id is the numeric id alone, also accepted as listing_id, and automobile-tn-listing resolves it through the site's own sitemap first, one extra request beyond reading body.url directly. Sending one of the two is enough; there is no third input name that reaches the same record.
Fields in this section (3)
automobile-tn-listing, body.url, body.id
automobile-tn-listing: fields in the returned record
The record returned by automobile-tn-listing holds these fields:
| Field | What it tells you |
|---|---|
id, url, title, version | the advert's own identifiers and page address |
price_tnd, price_label, price_ld_json, currency | the asking price as a number, a formatted label and a structured block, in the listing's currency |
price_mismatch | whether the number priced in price_tnd and the page's own price label do not line up |
price_rating, price_rating_code | how the asking price compares, as a label and a matching short code |
mileage_km, mileage_ld_json | the distance driven, as a number and as a structured block |
first_registration, year | when the car was first registered and its model year |
fuel, gearbox, fiscal_power_cv, drivetrain | the car's fuel, gearbox, fiscal power and driven wheels |
body_type, condition, previous_owners | the car's body style, condition and number of previous owners |
published_date, governorate | when the advert was published and where the car is listed |
brand, model | the car's brand and model |
exterior_color, interior_color, upholstery | the car's exterior colour, interior colour and upholstery |
seats, doors, engine_cc, main_specs, spec_groups | the seat count, door count, engine size and two separate groupings of further technical detail |
equipment, equipment_count | every equipment item grouped under its own heading, with a count |
description, images, images_count | the seller's free text, the photo set and its count |
seller | the seller's type, name, phone, logo, address, stock_url and slug |
The seller block describes whichever dealer or private seller posted the advertisement, rather than the car itself.
Fields in this section (1)
automobile-tn-listing
automobile-tn-makes: brand and model counts
automobile-tn-makes behaves two ways depending on body.brand (also accepted as make):
- left out: answers every brand with live used-car adverts, as
brand,totaland amakesarray ofslug,name,countentries - set to a brand's slug: answers that brand's models instead, as
brand,totaland amodelsarray of the sameslug,name,countshape
The slugs either array returns are what automobile-tn-search's body.brand and body.model expect.
Fields in this section (3)
automobile-tn-makes, automobile-tn-search, body.brand
automobile-tn-new-brands: the new-car brand list
automobile-tn-new-brands takes no input and answers brand_count, the number of brands in Automobile.tn's new-car price list, next to a brands array. Each entry carries a slug, a name, the brand's own url and its logo. This brand list is separate from the one automobile-tn-makes returns for used-car adverts: the two cover different sides of the site, so a slug from one does not necessarily exist in the other.
Fields in this section (2)
automobile-tn-new-brands, automobile-tn-makes
automobile-tn-new-search: query, brand and range filters
body.query (also accepted as q or keyword) is free text. body.brand (also accepted as make) takes a slug from automobile-tn-new-brands. body.price_min and body.price_max come with a documented minimum (0) and are rejected outright once below it or not a whole number; body.fiscal_power_min, body.fiscal_power_max, body.seats_min and body.seats_max have no documented minimum or maximum and are rejected only when not a whole number:
body.price_min,body.price_max: whole numbers from 0 upward, in TNDbody.fiscal_power_min,body.fiscal_power_max: whole numbers that narrow by fiscal horsepowerbody.seats_min,body.seats_max: whole numbers that narrow by seat count
Sending both ends of any one pair narrows the search to models whose own figure falls between them.
Fields in this section (9)
automobile-tn-new-search, body.query, body.brand, body.price_min, body.price_max, body.fiscal_power_min, body.fiscal_power_max, body.seats_min, body.seats_max
automobile-tn-new-search: fuel, body type, drivetrain, sort and paging
automobile-tn-new-search takes four further filters beyond the range inputs, plus sort and paging:
body.fuel: one value or a comma-separated list fromessence,diesel,hybrid,plugin_hybrid,mild_hybrid,electric,electric_reevbody.body_type: one value or a comma-separated list fromcity_car,compact,sedan,suv,coupe,mpv,van,pickup,convertible,minibusbody.gearbox:manualorautomaticbody.drivetrain:fwd,rwdorawdbody.sort:relevance,price_asc,price_descorpopular, defaulting torelevance; changing it on a later call restarts paging at that order's own first page rather than continuing the previous order's sequencebody.page: 1 to 1000, defaulting to 1, moving further into the same filtered search as it rises rather than starting it over
Fields in this section (7)
automobile-tn-new-search, body.fuel, body.body_type, body.gearbox, body.drivetrain, body.sort, body.page
automobile-tn-new-search: model card and facet fields
Each of the 24 model cards on a page names:
card_id,name,url,brand_slug,model_slug: the card's own identifiers and page addresssingle_version_slug: that model's one version slug when it has only one, letting a caller skip straight toautomobile-tn-new-versionprice_from_tnd: the cheapest version's priceprice_old_tnd,discount_tnd,discount_computed_tnd: the site's own promotion badge and a separately computed discount figureprice_usd_duty_free: a duty-free USD price, present only where the importer publishes one
Beside the model cards, the same response carries:
total,page,last_page,page_clamped,has_more: paging signals for the current pagesort,filters_applied: which order and filters produced this pagefacets: afuel,gearbox,body_type,drivetrainandwarrantybreakdown of the current results;warrantyappears only as a facet, with no matching filter input of that name
Fields in this section (2)
automobile-tn-new-search, automobile-tn-new-version
automobile-tn-new-version: passing url or brand, model and version
body.url is the version's own page address, reached from an automobile-tn-new-search model card's single_version_slug, or from automobile-tn-new-versions. The alternative is body.brand (also accepted as make), body.model and body.version sent together, each a slug rather than free text. Sending body.url alone and sending the three slugs together both resolve to the same version; there is no third combination that reaches it.
Fields in this section (7)
automobile-tn-new-version, automobile-tn-new-versions, automobile-tn-new-search, body.url, body.brand, body.model, body.version
automobile-tn-new-version: fields in the returned spec sheet
The spec sheet returned by automobile-tn-new-version holds these fields:
| Field | What it tells you |
|---|---|
version_id, url, brand_slug, model_slug, version_slug | the version's own identifiers and page address |
model_name, version_name | the model's and version's display names |
price_tnd, price_old_tnd, price_usd_duty_free, price_ld_json, price_mismatch, currency | the price as a number, an old price, a duty-free USD figure, a structured block, a mismatch signal and the currency |
availability, warranty | whether the version is available and its warranty |
seats, doors, cylinders, fuel, fiscal_power_cv | the cabin and engine basics |
power_hp, torque_nm, torque_rpm, engine_cc | the engine's power and torque figures |
gearbox, gears, drivetrain | the transmission |
length_mm, width_mm, height_mm, boot_l | the car's dimensions |
acceleration_0_100_s, top_speed_kmh, consumption_mixed_l100 | performance and consumption |
spec_groups groups further equipment lines, where each labelled line holds either a value or simply true when that feature is included with nothing further to report, and importer closes the record.
Fields in this section (1)
automobile-tn-new-version
automobile-tn-new-versions: listing every trim of one model
body.brand (also accepted as make) and body.model sent together, or body.url sent alone as the model's own page address, both resolve to the same model. The answer names, for the model itself:
brand_slug,model_slug,url,title,image: the model's own identifiers, page address and pictureversion_count: how many versions theversionsarray holdsversions: an array whose entries each carry their ownversion_id,name,url,version_slug,price_tnd,price_old_tnd,discount_computed_tnd,badgeandcurrency
An importer block closes the record with that model's official name, address, phone numbers and fax. Picking a version_slug from this list is what feeds body.version on automobile-tn-new-version.
Fields in this section (5)
automobile-tn-new-versions, automobile-tn-new-version, body.brand, body.model, body.url
automobile-tn-search: query, brand, model and range filters
body.query takes free text and is also accepted as q or keyword. body.brand (also accepted as make) takes a slug from automobile-tn-makes, with body.model narrowing further within whichever brand body.brand names. Three further pairs of inputs come with a documented minimum and are rejected outright once below it or not a whole number; a fourth pair, body.fiscal_power_min and body.fiscal_power_max, has no documented minimum or maximum and is rejected only when not a whole number:
body.price_min,body.price_max: integers starting at 0, in Tunisian dinarsbody.year_min,body.year_max: whole numbers from 1900 upward, as model yearsbody.mileage_min,body.mileage_max(also accepted askm_min,km_max): whole numbers from 0 upwardbody.fiscal_power_min,body.fiscal_power_max: integers that narrow results by fiscal horsepower
Fields in this section (12)
automobile-tn-search, body.query, body.brand, body.model, body.price_min, body.price_max, body.year_min, body.year_max, body.mileage_min, body.mileage_max, body.fiscal_power_min, body.fiscal_power_max
automobile-tn-search: fuel, body type, drivetrain, governorate, seller type, price type, sort and paging
automobile-tn-search takes a more finely split fuel list than automobile-tn-new-search uses, plus six further filters, a sort order and paging:
body.fuel: one value or a comma-separated list fromessence,diesel,mild_hybrid_petrol,hybrid_petrol,plugin_hybrid_petrol,mild_hybrid_diesel,hybrid_diesel,plugin_hybrid_diesel,electricbody.body_type: one value or a comma-separated list fromcity_car,suv,compact,sedan,coupe,van,mpv,pickup,convertible,otherbody.gearbox:manualorautomaticbody.drivetrain:fwd,rwdorawdbody.governorate: one governorate name or a comma-separated list of names, written with letters, spaces, apostrophes and hyphens, accents optionalbody.seller_type:proorprivatebody.price_type:regular,leasedorduty_unpaidbody.sort:updated,popular,price_asc,price_desc,mileage_asc,mileage_desc,year_asc,year_desc,oldestornewest, defaulting toupdated; picking a different order on a later call begins that order's own result sequence from the top rather than resuming the previous order's positionbody.page: 1 to 1000, defaulting to 1; a higher value reads deeper into the same filtered result set rather than starting that search over
Fields in this section (10)
automobile-tn-search, body.fuel, body.body_type, body.gearbox, body.drivetrain, body.governorate, body.seller_type, body.price_type, body.sort, body.page
automobile-tn-search: listing and facet fields
Each of the 12 listings on a page names:
| Field | What it tells you |
|---|---|
id, url, brand_slug, model_slug, title, version | the listing's own identifiers, page address and version name |
price_tnd, price_label, currency | the asking price as a number, a formatted label and the currency |
price_rating, price_rating_code | how that price compares, as a label and a short code |
mileage_km, year | the distance driven and the model year |
gearbox, drivetrain, fiscal_power_cv, fuel | the car's mechanics |
governorate, summary, image | where the car is listed, a short text summary and a picture |
Beside those rows, the same response carries:
total,page,last_page,page_clamped,has_more: this page's own paging signalssort,filters_applied: the order and the filters that produced this particular pagefacets: abrand,model,fuel,gearbox,body_type,drivetrain,governorate,seller_type,colorandprice_typebreakdown of the current results
Fields in this section (1)
automobile-tn-search
{
"body": {
"body_type": ["suv"],
"price_max": 120000,
"sort": "price_asc"
}
}{
"body": {
"brand": "volkswagen",
"fuel": ["essence"],
"sort": "price_asc"
}
}Operations
Every public gateway operation uses POST /api/v1/{project}/{action}.
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.
Listing detail
POST /api/v1/automobile-tn/automobile-tn-listing
Returns one used-car advertisement in full, including its price, mileage, condition, equipment and seller, from its page address or numeric id.
Input fields
| Field | Type | Required | Allowed values | Limits |
|---|---|---|---|---|
body.id | string | Optional | — | — |
body.url | string | Optional | — | — |
Request examples
# 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"}}'Brands and models
POST /api/v1/automobile-tn/automobile-tn-makes
Lists the brands that currently have live used-car adverts, or one brand's models with their live counts.
Input fields
| Field | Type | Required | Allowed values | Limits |
|---|---|---|---|---|
body.brand | string | Optional | — | — |
Request examples
# 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-makes' \
--header "Content-Type: application/json" \
--header "x-api-key: $KAKIAPI_API_KEY" \
--header "Idempotency-Key: $REQUEST_ID" \
--data '{"body":{"brand":"audi"}}'New-car brands
POST /api/v1/automobile-tn/automobile-tn-new-brands
Lists every brand in Automobile.tn's new-car price list, with each brand's page address and logo.
Input fields
This operation takes no input fields. Send the JSON request body shown below.
Request examples
# 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-new-brands' \
--header "Content-Type: application/json" \
--header "x-api-key: $KAKIAPI_API_KEY" \
--header "Idempotency-Key: $REQUEST_ID" \
--data '{"body":{}}'New-car search
POST /api/v1/automobile-tn/automobile-tn-new-search
Pages through Automobile.tn's new-car price list by brand, body type, budget, fiscal power, seats, fuel, gearbox and drivetrain.
Input fields
| Field | Type | Required | Default | Allowed values | Limits |
|---|---|---|---|---|---|
body.body_type | string[] | Optional | — | "city_car""compact""sedan""suv""coupe""mpv""van""pickup""convertible""minibus" | — |
body.brand | string | Optional | — | — | — |
body.drivetrain | string | Optional | — | "fwd""rwd""awd" | — |
body.fiscal_power_max | integer | Optional | — | — | -9007199254740991–9007199254740991 |
body.fiscal_power_min | integer | Optional | — | — | -9007199254740991–9007199254740991 |
body.fuel | string[] | Optional | — | "essence""diesel""hybrid""plugin_hybrid""mild_hybrid""electric""electric_reev" | — |
body.gearbox | string | Optional | — | "manual""automatic" | — |
body.page | integer | Optional | 1 | — | 1–1000 |
body.price_max | integer | Optional | — | — | 0–9007199254740991 |
body.price_min | integer | Optional | — | — | 0–9007199254740991 |
body.query | string | Optional | — | — | — |
body.seats_max | integer | Optional | — | — | -9007199254740991–9007199254740991 |
body.seats_min | integer | Optional | — | — | -9007199254740991–9007199254740991 |
body.sort | string | Optional | "relevance" | "relevance""price_asc""price_desc""popular" | — |
Request examples
# 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-new-search' \
--header "Content-Type: application/json" \
--header "x-api-key: $KAKIAPI_API_KEY" \
--header "Idempotency-Key: $REQUEST_ID" \
--data '{"body":{"body_type":["city_car"],"brand":"example","drivetrain":"fwd","fiscal_power_max":0,"fiscal_power_min":0,"fuel":["essence"],"gearbox":"manual","page":1,"price_max":0,"price_min":0,"query":"example","seats_max":0,"seats_min":0,"sort":"relevance"}}'New-car version spec
POST /api/v1/automobile-tn/automobile-tn-new-version
Returns one new-car version's full spec sheet: price, dimensions, performance, consumption and equipment.
Input fields
| Field | Type | Required | Allowed values | Limits |
|---|---|---|---|---|
body.brand | string | Optional | — | — |
body.model | string | Optional | — | — |
body.url | string | Optional | — | — |
body.version | string | Optional | — | — |
Request examples
# 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-new-version' \
--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/neuf/peugeot/208/1.2-l-style"}}'New-car model versions
POST /api/v1/automobile-tn/automobile-tn-new-versions
Lists every version of one new-car model with its price and the model's official importer.
Input fields
| Field | Type | Required | Allowed values | Limits |
|---|---|---|---|---|
body.brand | string | Optional | — | — |
body.model | string | Optional | — | — |
body.url | string | Optional | — | — |
Request examples
# 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-new-versions' \
--header "Content-Type: application/json" \
--header "x-api-key: $KAKIAPI_API_KEY" \
--header "Idempotency-Key: $REQUEST_ID" \
--data '{"body":{"brand":"peugeot","model":"2008"}}'Used-car search
POST /api/v1/automobile-tn/automobile-tn-search
Narrows down Tunisia's used-car classifieds by whichever of its many available filters a caller sends, twelve matches per page.
Input fields
| Field | Type | Required | Default | Allowed values | Limits |
|---|---|---|---|---|---|
body.body_type | string[] | Optional | — | "city_car""suv""compact""sedan""coupe""van""mpv""pickup""convertible""other" | — |
body.brand | string | Optional | — | — | — |
body.drivetrain | string | Optional | — | "fwd""rwd""awd" | — |
body.fiscal_power_max | integer | Optional | — | — | -9007199254740991–9007199254740991 |
body.fiscal_power_min | integer | Optional | — | — | -9007199254740991–9007199254740991 |
body.fuel | string[] | Optional | — | "essence""diesel""mild_hybrid_petrol""hybrid_petrol""plugin_hybrid_petrol""mild_hybrid_diesel""hybrid_diesel""plugin_hybrid_diesel""electric" | — |
body.gearbox | string | Optional | — | "manual""automatic" | — |
body.governorate | string[] | Optional | — | 24 values"ariana""beja""ben arous""bizerte""gabes""gafsa""jendouba""kairouan""kasserine""kebili""la manouba""le kef""mahdia""medenine""monastir""nabeul""sfax""sidi bouzid""siliana""sousse""tataouine""tozeur""tunis""zaghouan" | — |
body.mileage_max | integer | Optional | — | — | 0–9007199254740991 |
body.mileage_min | integer | Optional | — | — | 0–9007199254740991 |
body.model | string | Optional | — | — | — |
body.page | integer | Optional | 1 | — | 1–1000 |
body.price_max | integer | Optional | — | — | 0–9007199254740991 |
body.price_min | integer | Optional | — | — | 0–9007199254740991 |
body.price_type | string | Optional | — | "regular""leased""duty_unpaid" | — |
body.query | string | Optional | — | — | — |
body.seller_type | string | Optional | — | "pro""private" | — |
body.sort | string | Optional | "updated" | "updated""popular""price_asc""price_desc""mileage_asc""mileage_desc""year_asc""year_desc""oldest""newest" | — |
body.year_max | integer | Optional | — | — | 1900–9007199254740991 |
body.year_min | integer | Optional | — | — | 1900–9007199254740991 |
Request examples
# 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-search' \
--header "Content-Type: application/json" \
--header "x-api-key: $KAKIAPI_API_KEY" \
--header "Idempotency-Key: $REQUEST_ID" \
--data '{"body":{"body_type":["city_car"],"brand":"example","drivetrain":"fwd","fiscal_power_max":0,"fiscal_power_min":0,"fuel":["essence"],"gearbox":"manual","governorate":["ariana"],"mileage_max":0,"mileage_min":0,"model":"example","page":1,"price_max":0,"price_min":0,"price_type":"regular","query":"example","seller_type":"pro","sort":"updated","year_max":1900,"year_min":1900}}'How calls work
POST /api/v1/automobile-tn/<action>withx-api-key,Content-Type: application/jsonand a requiredIdempotency-Key.- A successful call returns
ok: true:datais the result of the operation,meta.requestIdidentifies the recorded request andmeta.chargedCreditUnitsis the amount charged. Otherwiseokisfalseanderror.codenames the reason; readokanderror.coderather than relying on the HTTP status alone. Every gateway reply carries a request id for support:meta.requestId, or a top-levelrequestIdin a reply withoutmeta(such as a refusal before admission). - Charged the listed price only when a call succeeds. Failures are not charged; an unconfirmed outcome is released after at most 900 seconds without a charge.
- Repeating the same request with the same Idempotency-Key after it has finished returns the stored response for 24 hours without a new charge.
In the gateway reference: