Documentation
Polovni Automobili API reference
Polovni Automobili API reference: every input of the five operations with its limits, the fields each returns, worked requests, errors and billing.
See also: Polovni Automobili car classifieds overview and prices · Polovni Automobili API guide: from search to listing
On this page
Polovni Automobili API endpoints and headers
Each operation has its own endpoint, and every call is a POST whose last path segment is the full action ID, including the polovniautomobili- prefix. With each call, send:
- your key in
x-api-key - the header
Content-Type: application/json - an
Idempotency-Keymade of 8 to 128 letters, digits, colons, underscores or hyphens
Inputs go inside one JSON object under body. Brands and filter-options declare no fields, so their input is {} or {"body":{}}. The whole request body may be at most 64 KiB.
Fields in this section (6)
polovniautomobili-search, polovniautomobili-listing, polovniautomobili-brands, polovniautomobili-models, polovniautomobili-filter-options, Idempotency-Key
Search: brand, model and range filters
All search fields are optional. brand is one label from a closed list of 99 values, matched with its spaces and diacritics while case is forgiven: Mercedes Benz, Škoda, Lynk & Co and volkswagen are accepted. model is an array of model names as the marketplace spells them, such as Golf or A4.
Models belong to a brand, so send model together with brand; with several names, a row matches any of them. The range filters are integers with fixed bounds:
price_minandprice_maxfrom 0 to 9,999,999 in the advertisement's own currencyyear_minandyear_maxfrom 1900 to 2100mileage_minandmileage_maxfrom 0 to 9,999,999 kilometrespower_kw_minandpower_kw_maxfrom 0 to 2,000 kWengine_cc_minandengine_cc_maxfrom 0 to 20,000 cc
Power is filtered in kilowatts only, so convert a horsepower limit before you send it; rows report both power_kw and power_hp. A value outside its bounds is rejected with REQUEST_NOT_FULFILLED or REQUEST_REJECTED (502), and nothing is charged.
Fields in this section (13)
polovniautomobili-search, body.brand, body.model, body.price_min, body.price_max, body.year_min, body.year_max, body.mileage_min, body.mileage_max, body.power_kw_min, body.power_kw_max, body.engine_cc_min, body.engine_cc_max
Search: category filters and switches
Several filters take arrays whose items come from fixed lists. Among them:
- the fuels listed in
fuelare combined with OR gearboxcounts manual gears separately, withmanual4Gears,manual5Gearsandmanual6Gearsnext toautomaticcolouruses a vocabulary of 21 exterior coloursplatestells domestic Serbian plates apart from cars to be registered in the buyer's name and from foreign platesdamagedseparates undamaged cars, damaged cars that can still be driven and damaged cars that cannot
The single-value filters are strings:
emission_classtakes one Euro class fromeuro1toeuro6doorstakes"3"for two or three doors and"5"for four or fiveseatstakes one exact count from"2"to"9"wheel_side,flywheel(dual-mass flywheel or not) andattest(whether the car carries a Serbian conversion attest) take one value eachcountryis where the ad is placed from, withRSfor Serbia, andcountry_of_originis where the car was imported from
only_with_price: true drops ads that have no price, registered_to_seller: true keeps cars registered to the seller, and listing_age is used, new or all, the default.
Fields in this section (14)
polovniautomobili-search, body.fuel, body.gearbox, body.colour, body.plates, body.damaged, body.emission_class, body.doors, body.seats, body.country, body.country_of_origin, body.only_with_price, body.registered_to_seller, body.listing_age
Search: paging and the result page
page is an integer from 1 to 750 and defaults to 1; page_size is 25, 50, 100 or 200 and defaults to 25. Page numbers stop at 750 whatever the page size, so 25 rows per page reach at most 18,750 advertisements of one result set and 200 rows per page reach 150,000; choose 200 when a search matches many ads.
A page of 751 or more is refused with REQUEST_NOT_FULFILLED or REQUEST_REJECTED (502) at no cost. The result gives these fields:
- Counts and paging:
total_results,pageandpage_size,pages,has_more, the rowcountandduplicates_dropped - Filters and URL:
filters_appliedandsearch_url
Then come the matching rows in cars and the paid placements in top_ads. pages is the marketplace's own page count, while reachable_pages and reachable_results say how far paging can actually go. The first example request asks for diesel Golfs built from 2015 at 200 rows per page; send it again with page: 2 while has_more is true.
Fields in this section (3)
polovniautomobili-search, body.page, body.page_size
Listing: one advertisement by ad_id
ad_id is required and is a string: copy it exactly from the ad_id of a search row, such as "9182736405"; this site accepts any string for ad_id. slug is optional. Its text does not change which advertisement comes back; pass it only when you want it echoed in the canonical URL.
An advertisement that was removed or is no longer active returns a failure, REQUEST_NOT_FULFILLED or REQUEST_REJECTED (502), never an empty success, and is not charged. The success is {car:{…}}:
- Identity:
ad_id,url,title,brand,model,variantandyear - Price:
price,price_currency,price_on_requestandprice_fixed - Technical fields: those of a search row plus
drive, colours and upholstery - Registration:
registration_valid_until,registration_cost_min,registration_cost_max,plates,countryandimported - Ownership and sale terms:
owner_legal_status,registered_to_seller,selling_method,trade_in,reservedandstatus - Description and arrays: the description and the
condition,equipment,safetyandimagesarrays - Dates:
published_atandrenewed_at - Further fields:
financing,sellerandbreadcrumbs
Fields in this section (3)
polovniautomobili-listing, body.ad_id, body.slug
Brands: the label list
polovniautomobili-brands takes no fields; send {} or {"body":{}}. It returns count, total_ads and brands, an array of entries with brand, label and slug. The label is the value that the brand field of search and models accepts, spelled as shown apart from letter case, for example Mercedes Benz with a space.
The slug is the marketplace's URL form of the name and is not a valid filter value. The brand field accepts 99 labels, one of them the catch-all other; a label outside that list, or a hand-typed spelling such as mercedes-benz, is refused with REQUEST_NOT_FULFILLED or REQUEST_REJECTED (502) at no cost. A brands call is billed at 300 credit units, so fetch the list once for a filter form rather than before every search.
Fields in this section (2)
polovniautomobili-brands, body.brand
Models: model names for one brand
brand is required and takes the same 99 exact labels as search. sample_pages is optional, an integer from 1 to 10; when you leave it out, 3 pages are read.
Each sampled page holds 200 of the brand's advertisements, so the default reads up to 600 ads and the maximum up to 2,000. The result has:
brandandbrand_ads(the total number of the brand's advertisements)ads_sampledandsample_pagessample_coverage_pct(the share of the brand's advertisements that were read)countandmodels, an array of{model, ads_seen}
A model appears only when at least one sampled advertisement carries it, so for a brand with many ads, raise sample_pages until sample_coverage_pct is high enough for your purpose. The model strings are written the way the search model filter takes them. The price stays at 450 credit units per call whatever sample_pages is.
Fields in this section (3)
polovniautomobili-models, body.brand, body.sample_pages
Filter options: the search vocabulary
polovniautomobili-filter-options takes no fields. It returns count, sorts, listing_age and groups. Each group:
- names the search parameter it feeds in
param - names the marketplace's own field in
source_field - says in
filterablewhether it actually filters - lists its
countandvalues, each a{value, label}pair with the Serbian label
The groups cover fuel, gearbox, body, colours, interior, drive, emission class, damage, plates, condition and history, the 97-item equipment list, the 18-item safety list, regions and countries. Use a group's values only where its param is also a field of the search contract here: equipment, safety and region groups have no matching search field. A group marked filterable: false is published but does not narrow results.
Fields in this section (1)
polovniautomobili-filter-options
Success envelope and per-call prices
A success is {ok:true, data, meta:{requestId, chargedCreditUnits, simulated, sourceAttribution}}. data holds the operation's result, shaped as described above for each operation, and can be null.
A success with data:null is still billed at the operation's approved per-call price: 300 credit units for search, listing, brands and filter-options, and 450 for models, where 100 units make one credit. chargedCreditUnits in meta states what the call cost, and requestId identifies the request in your records and in any support question.
Fields in this section (3)
ok, data, priceCreditUnits
Failure codes and uncertain outcomes
An admitted request that fails returns {ok:false, error:{code,message}, meta:{requestId, chargedCreditUnits:"0", status}}, with status "failure" or "uncertain" on the first reply. REQUEST_NOT_FULFILLED (502) means the operation reported that it did not succeed, and REQUEST_REJECTED (502) that it rejected the request; SERVICE_UNAVAILABLE and SERVICE_BUSY (503) describe a condition on the service side, not your key or wallet. These failures are not charged.
OPERATION_FAILED (502) means the operation produced no result and is not charged either. OPERATION_TIMEOUT (504), OUTCOME_UNKNOWN (504 or 502), RESULT_INVALID (502) and RESULT_TOO_LARGE (502) are uncertain: the price is held, then released, and never charged later.
Do not retry them under a new Idempotency-Key. Resending the unchanged request with the same key returns its recorded state without running it again: REQUEST_PENDING (409, meta.status "dispatching" or "uncertain") while unresolved, OUTCOME_UNKNOWN_RELEASED (504, meta.status "released", chargedCreditUnits "0") once the hold is released.
Fields in this section (4)
error, ok, data, Idempotency-Key
Admission errors and same-key replay
Errors returned before a request is admitted have the shape {ok:false,error:{code,message},requestId}, with requestId at the top level and no meta. Examples are AUTH_FAILED (401), INSUFFICIENT_CREDITS (402), IDEMPOTENCY_CONFLICT (409), INVALID_REQUEST (400) for a body that is not valid JSON, and PAYLOAD_TOO_LARGE (413) for a body over 64 KiB. Except for IDEMPOTENCY_CONFLICT, which means the key already belongs to another request and calls for a new key, these refusals record nothing, so the corrected request may reuse the same Idempotency-Key; RATE_LIMITED and CONCURRENCY_LIMIT (429) carry Retry-After in seconds, after which the same request is resent with the same key.
A value that the operation rejects is handled differently: the request is admitted, then fails with REQUEST_NOT_FULFILLED or REQUEST_REJECTED (502), meta.chargedCreditUnits "0" and meta.status "failure". Nothing is charged, but the operation must be enabled and your available credits must cover its price; send the corrected request with a new Idempotency-Key. A stored final response replays its original status and body for 24 hours; after that, a succeeded request returns RESULT_EXPIRED (410, meta.status "succeeded"), which is not a refund, and a failed request returns its recorded error code and HTTP status.
Fields in this section (3)
ok, error, Idempotency-Key
{
"body": {
"brand": "Volkswagen",
"model": [
"Golf"
],
"fuel": [
"diesel"
],
"year_min": 2015,
"page": 1,
"page_size": 200
}
}{
"body": {
"ad_id": "9182736405"
}
}{
"body": {}
}{
"body": {
"brand": "Audi",
"sample_pages": 5
}
}{}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.
Gateway reference: authentication, idempotency, billing and all error codes
List car brands
POST /api/v1/polovniautomobili/polovniautomobili-brands
Returns each brand with the exact label the brand filter accepts and its URL slug; takes no input.
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/polovniautomobili/polovniautomobili-brands' \
--header "Content-Type: application/json" \
--header "x-api-key: $KAKIAPI_API_KEY" \
--header "Idempotency-Key: $REQUEST_ID" \
--data '{"body":{}}'Get the filter vocabulary
POST /api/v1/polovniautomobili/polovniautomobili-filter-options
Returns the filter groups with their values, Serbian labels and the search parameter each feeds; takes no input.
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/polovniautomobili/polovniautomobili-filter-options' \
--header "Content-Type: application/json" \
--header "x-api-key: $KAKIAPI_API_KEY" \
--header "Idempotency-Key: $REQUEST_ID" \
--data '{"body":{}}'Read a car advertisement
POST /api/v1/polovniautomobili/polovniautomobili-listing
Returns one full advertisement for the ad_id of a search row.
Input fields
| Field | Type | Required | Allowed values | Limits |
|---|---|---|---|---|
body.ad_id | string | Required | — | — |
body.slug | 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/polovniautomobili/polovniautomobili-listing' \
--header "Content-Type: application/json" \
--header "x-api-key: $KAKIAPI_API_KEY" \
--header "Idempotency-Key: $REQUEST_ID" \
--data '{"body":{"ad_id":"example","slug":"example"}}'Find models for a brand
POST /api/v1/polovniautomobili/polovniautomobili-models
Reads 1–10 pages of 200 ads of one brand (3 by default) and returns each model name with the number of ads seen.
Input fields
| Field | Type | Required | Allowed values | Limits |
|---|---|---|---|---|
body.brand | string | Required | 99 values"Alfa Romeo""Alpina""Alpine""Aro""Aston Martin""Audi""Avantier""BAIC""BAW""Bentley""BMW""BYD""Cadillac""Changan""Chery""Chevrolet""Chrysler""Citroen""Cupra""Dacia""Daewoo""Daihatsu""Dodge""Dongfeng""DR""DS""Ferrari""Fiat""Ford""Foton""GAZ""Geely""Genesis""GMC""Honda""Hummer""Hyundai""Ineos""Infiniti""Isuzu""JAC Motors""Jaguar""Jeep""Jetour""JMEV""KGM""Kia""Lada""Lamborghini""Lancia""Land Rover""Leapmotor""Lexus""Lincoln""Lynk & Co""Mahindra""Maserati""Maxus""Maybach""Mazda""McLaren""Mercedes Benz""MG""MINI""Mitsubishi""Moskvitch""Nissan""NSU""Oldsmobile""Opel""Peugeot""Polski Fiat""Pontiac""Porsche""Ram""Renault""Rolls Royce""Rover""Saab""Seat""Seres""Smart""SsangYong""Subaru""Suzuki""SWM""Škoda""Tata""Tesla""Toyota""Trabant""UAZ""Volkswagen""Volvo""Wartburg""Xiaomi""Yudo Auto""Zastava""other" | — |
body.sample_pages | integer | Optional | — | 1–10 |
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/polovniautomobili/polovniautomobili-models' \
--header "Content-Type: application/json" \
--header "x-api-key: $KAKIAPI_API_KEY" \
--header "Idempotency-Key: $REQUEST_ID" \
--data '{"body":{"brand":"Alfa Romeo","sample_pages":1}}'Search car advertisements
POST /api/v1/polovniautomobili/polovniautomobili-search
Filters ads by brand, model, price, year, mileage, power, fuel, body and more, in pages of 25, 50, 100 or 200 rows up to page 750.
Input fields
| Field | Type | Required | Allowed values | Limits |
|---|---|---|---|---|
body.air_conditioning | string[] | Optional | "none""manual""automatic" | — |
body.attest | string | Optional | "attested""notAttested" | — |
body.body_type | string[] | Optional | "sedan""hatchback""caravan""coupe""cabrioletOrRoadster""minivan""suv""pickup" | — |
body.brand | string | Optional | 99 values"Alfa Romeo""Alpina""Alpine""Aro""Aston Martin""Audi""Avantier""BAIC""BAW""Bentley""BMW""BYD""Cadillac""Changan""Chery""Chevrolet""Chrysler""Citroen""Cupra""Dacia""Daewoo""Daihatsu""Dodge""Dongfeng""DR""DS""Ferrari""Fiat""Ford""Foton""GAZ""Geely""Genesis""GMC""Honda""Hummer""Hyundai""Ineos""Infiniti""Isuzu""JAC Motors""Jaguar""Jeep""Jetour""JMEV""KGM""Kia""Lada""Lamborghini""Lancia""Land Rover""Leapmotor""Lexus""Lincoln""Lynk & Co""Mahindra""Maserati""Maxus""Maybach""Mazda""McLaren""Mercedes Benz""MG""MINI""Mitsubishi""Moskvitch""Nissan""NSU""Oldsmobile""Opel""Peugeot""Polski Fiat""Pontiac""Porsche""Ram""Renault""Rolls Royce""Rover""Saab""Seat""Seres""Smart""SsangYong""Subaru""Suzuki""SWM""Škoda""Tata""Tesla""Toyota""Trabant""UAZ""Volkswagen""Volvo""Wartburg""Xiaomi""Yudo Auto""Zastava""other" | — |
body.colour | string[] | Optional | 21 values"white""pearlWhite""beige""bordeaux""brown""black""red""chameleon""cream""purple""orange""blue""grey""brown2""silver""turquoise""navyBlue""green""golden""yellow""pink" | — |
body.country | string | Optional | 35 values"RS""ME""BA""BE""FR""NL""IT""DE""RU""CH""GB""AT""BG""CZ""DK""HR""IE""LT""LU""HU""MK""PT""RO""SK""SI""ES""SE""PL""NO""JP""CN""TR""KR""US""XX" | — |
body.country_of_origin | string | Optional | 33 values"ME""BA""BE""FR""NL""IT""DE""RU""CH""GB""AT""BG""CZ""DK""HR""IE""LT""LU""HU""MK""PT""RO""SK""SI""ES""SE""PL""NO""JP""CN""TR""KR""US" | — |
body.damaged | string[] | Optional | "notDamaged""damagedInDrivingCondition""damagedNotInDrivingCondition" | — |
body.doors | string | Optional | "3""5" | — |
body.drive | string[] | Optional | "front""rear""4x4""4x4Reducer" | — |
body.emission_class | string | Optional | "euro1""euro2""euro3""euro4""euro5""euro6" | — |
body.engine_cc_max | integer | Optional | — | 0–20000 |
body.engine_cc_min | integer | Optional | — | 0–20000 |
body.flywheel | string | Optional | "floatingFlywheel""noFloatingFlywheel" | — |
body.fuel | string[] | Optional | "gasoline""diesel""gasolineLpg""gasolineCng""hybridGasoline""hybridDiesel""plugInHybrid""hybrid""electric" | — |
body.gearbox | string[] | Optional | "manual4Gears""manual5Gears""manual6Gears""automatic" | — |
body.interior_colour | string[] | Optional | "black""beige""brown""grey""other" | — |
body.interior_material | string[] | Optional | "cloth""leather""combinedLeather""velor""other" | — |
body.listing_age | string | Optional | "all""used""new" | — |
body.mileage_max | integer | Optional | — | 0–9999999 |
body.mileage_min | integer | Optional | — | 0–9999999 |
body.model | string[] | Optional | — | — |
body.only_with_price | boolean | Optional | — | — |
body.page | integer | Optional | — | 1–750 |
body.page_size | number | Optional | 2550100200 | — |
body.plates | string[] | Optional | "domesticPlates""onBuyersName""foreignPlates" | — |
body.power_kw_max | integer | Optional | — | 0–2000 |
body.power_kw_min | integer | Optional | — | 0–2000 |
body.price_max | integer | Optional | — | 0–9999999 |
body.price_min | integer | Optional | — | 0–9999999 |
body.registered_to_seller | boolean | Optional | — | — |
body.seats | string | Optional | "2""3""4""5""6""7""8""9" | — |
body.trade_in | string[] | Optional | "noExchange""tradeForCheaper""samePrice""tradeForMoreExpensive""noPreference" | — |
body.wheel_side | string | Optional | "left""right" | — |
body.year_max | integer | Optional | — | 1900–2100 |
body.year_min | integer | Optional | — | 1900–2100 |
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/polovniautomobili/polovniautomobili-search' \
--header "Content-Type: application/json" \
--header "x-api-key: $KAKIAPI_API_KEY" \
--header "Idempotency-Key: $REQUEST_ID" \
--data '{"body":{"air_conditioning":["none"],"attest":"attested","body_type":["sedan"],"brand":"Alfa Romeo","colour":["white"],"country":"RS","country_of_origin":"ME","damaged":["notDamaged"],"doors":"3","drive":["front"],"emission_class":"euro1","engine_cc_max":0,"engine_cc_min":0,"flywheel":"floatingFlywheel","fuel":["gasoline"],"gearbox":["manual4Gears"],"interior_colour":["black"],"interior_material":["cloth"],"listing_age":"all","mileage_max":0,"mileage_min":0,"model":["example"],"only_with_price":false,"page":1,"page_size":25,"plates":["domesticPlates"],"power_kw_max":0,"power_kw_min":0,"price_max":0,"price_min":0,"registered_to_seller":false,"seats":"2","trade_in":["noExchange"],"wheel_side":"left","year_max":1900,"year_min":1900}}'