ImportOS · Документація
Довідник API

POST /v1/catalog/parse-query

Parse a natural-language car search into catalogue filters

Parse a natural-language car search into catalogue filters

Turns free text in Ukrainian, Russian, Polish or English ("diesel estate under 15k, automatic, 2018+, from Germany") into CatalogQuery filters plus human-readable chips. A deterministic parser handles typical queries (makes/models with typos, years, prices with currency conversion to EUR, mileage, fuel, gearbox, body, drive, colour, countries, VAT, freshness); complex queries go to Claude with a strict output schema, a timeout and a fallback to the rule-based result. Makes are always validated against the catalogue taxonomy. demo:true means no model is configured. AI parsing has its own per-key rate limit and daily token budget (then rules only). Requires scope read:listings.

  • Автентифікація: заголовок Authorization: Bearer rv_live_... (API-ключі та scopes)
  • Потрібний scope: read:listings
Опис операції, параметрів і полів походить зі специфікації OpenAPI (openapi.json) і подається англійською, як у самому API.

Тіло запиту

ПолеТипОбов’язк.Опис
textstringтакFree-text query in Ukrainian, Russian, Polish or English, e.g. "diesel estate under 15k, automatic, 2018+, from Germany".
locale"uk" | "pl" | "en"ніLanguage of chip labels.

Відповіді

200

Parsed filters.

application/json · Схема: CatalogParseResponse

ПолеТипОбов’язк.Опис
queryobjectтакCatalog filters (contract catalog-search). Prices are EUR, mileage km, power kW.
query.qstringні
query.makestring[]ні
query.modelstring[]ні
query.yearFrominteger | nullні
query.yearTointeger | nullні
query.priceFrominteger | nullні
query.priceTointeger | nullні
query.mileageFrominteger | nullні
query.mileageTointeger | nullні
query.powerFrominteger | nullні
query.powerTointeger | nullні
query.fuel"petrol" | "diesel" | "hybrid" | "phev" | "ev" | "lpg" | "cng" | "hydrogen" | "other"[]ні
query.gearbox"manual" | "automatic" | "cvt" | "robot" | "other"[]ні
query.body"sedan" | "hatchback" | "wagon" | "suv" | "crossover" | "coupe" | "convertible" | "minivan" | "van" | "pickup" | "truck" | "motorcycle" | "other"[]ні
query.drive"fwd" | "rwd" | "awd" | "4wd"[]ні
query.colorstring[]ні
query.country"de" | "at" | "nl" | "be" | "lu" | "fr" | "dk" | "se" | "no" | "fi" | "ee" | "lv" | "lt" | "pl" | "cz" | "sk" | "it" | "es"[]ні
query.sourcestring[]ні
query.sellerType"dealer" | "private" | "unknown"[]ні
query.vat"deductible" | "included" | "unknown"[]ні
query.withPhotosboolean | nullні
query.postedWithinDaysinteger | nullні
query.features"tow_hitch" | "heat_pump" | "panorama_roof" | "apple_carplay" | "android_auto" | "camera" | "camera_360" | "heated_seats" | "heated_steering" | "ventilated_seats" | "head_up" | "adaptive_cruise" | "navigation" | "keyless" | "electric_tailgate" | "leather"[]ні
query.batteryFrominteger | nullні
query.batteryTointeger | nullні
query.sort"relevance" | "newest" | "price_asc" | "price_desc" | "mileage_asc" | "year_desc" | "landed_asc" | "deal_score"ні
chipsobject[]такWhat was understood, in reading order.
chips[].fieldstringніCatalogQuery field the chip stands for (price/year/mileage/power for ranges).
chips[].valuestringніValue for list fields, e.g. "diesel" or "bmw/x5".
chips[].labelstringніHuman label in the requested locale, e.g. "Diesel", "up to €15,000".
understoodbooleanтакAt least one filter (or a sort) was recognised.
method"rules" | "ai" | "ai_cache"такrules — deterministic parser; ai — Claude (merged with rules); ai_cache — cached model parse.
demobooleanтакtrue — no AI model is configured, the rule-based parser only (demo mode).
ai_skipped"not_configured" | "disabled" | "not_needed" | "rate_limited" | "budget_exhausted" | "timeout" | "error" | "invalid" | "refusal" | nullтакWhy the model was not used (null when it was).
ignoredstring[]такWords that could not be turned into a filter.
unsupported_marketsstring[]такMarkets outside the EU catalogue the query asked for (us, kr, cn ...): not searchable here.
price_originalobjectтакPrice as written in the query (before conversion to EUR at the ECB/NBU rate).
price_original.minnumberні
price_original.maxnumberні
price_original.currencystringтак
price_original.assumedbooleanніNo currency was named: EUR assumed.
catalog_urlstring | nullтакPublic site catalogue page with these filters (null if not configured).
took_msintegerтак

400

Invalid request parameters or body (code validation_error).

application/problem+json · Схема: Problem

401

Missing, malformed, unknown, revoked or expired API key (code unauthorized).

application/problem+json · Схема: Problem

403

The API key lacks the scope required by this endpoint (code insufficient_scope).

application/problem+json · Схема: Problem

429

Rate limit exceeded for the tenant plan (code rate_limited). Wait Retry-After seconds.

application/problem+json · Схема: Problem

503

The catalogue is not configured on this server.

application/problem+json · Схема: Problem

На цій сторінці