Atvira API

Caropen viešoji API: visi svetainės skaičiai JSON formatu be registracijos – markės, modeliai, ridos procentiliai, reitingai, savivaldybės ir šalies statistika. Šaltinio nurodymo reikalavimas ir naudojimo apribojimai.

Visi Caropen skaičiai prieinami per viešą, tik skaitymui skirtą API. Registracija ir raktai nereikalingi, atsakymai – JSON. Tuos pačius prieigos taškus naudoja ir ši svetainė. Žemiau – prieigos taškų sąrašas, sugeneruotas iš OpenAPI specifikacijos.

Pagrindai

  • Bazinis adresas: https://api.caropen.lt; visi keliai prasideda /api/public/.
  • Formatas: tik application/json. Siųskite Accept: application/json arba Accept antraštės nenurodykite.
  • Autentifikacija: nereikalinga. API pateikia tik apibendrintus skaičius – jokių duomenų apie konkretų automobilį ar stotį.

Šaltinio nurodymas

Pirminiai duomenys skelbiami pagal CC BY 4.0 licenciją. Kur rodote API skaičius, privalote nurodyti šaltinį: tekstą iš GET /api/public/meta lauko licence.attribution (Valstybės duomenų agentūra / Transeksta, Transporto priemonių techninės apžiūros duomenys, data.gov.lt) su licencija ir Caropen.lt su nuoroda. Daugiau – Duomenys ir licencija.

Naudojimo apribojimai

  • Atsakymai savaitę saugomi Cloudflare talpykloje ir atnaujinami po kiekvieno savaitinio paskelbimo, todėl tų pačių adresų dažniau nei kartą per dieną užklausti nėra prasmės.
  • Kol kas griežti apribojimai netaikomi, tačiau prašome ne daugiau kaip 60 užklausų per minutę iš vieno IP adreso. Ateityje šis apribojimas bus taikomas naudojantiems API be rakto (atsakymas 429 su Retry-After).
  • Reikia daugiau ar masinių duomenų (pvz. visų modelio × metų grupių)? Parašykite info@caropen.lt – planuojami API raktai su didesniais limitais.
  • Neperparduokite API kaip savo paslaugos nenurodę šaltinio ir neapkraukite jos nuskaitydami kiekvieno puslapio – visų publikuotų puslapių sąrašą pateikia svetainės žemėlapio rinkiniai (/sitemap/{set}).

Talpinimas ir sąlyginės užklausos

Kiekvienas sėkmingas atsakymas turi Cache-Control: max-age=0, public, s-maxage=604800, stale-while-revalidate=86400, ETag ir Last-Modified. Jie pasikeičia tik paskelbus naujus skaičius, todėl su If-None-Match arba If-Modified-Since gausite tuščią 304 Not Modified, kol niekas nepasikeitė. Duomenų šviežumą rodo GET /api/public/meta laukas freshness.lastPublish.

Duomenų formatas

  • Dalys – skaičiai nuo 0 iki 1 (passRate, rollbackShare, fuelMix reikšmės). ciLo ir ciHi – 95 % Wilsono pasikliautinojo intervalo apatinė ir viršutinė reikšmės.
  • n – pagrindinių apžiūrų skaičius (pakartotinės apžiūros neįskaitomos).
  • null vietoje trūkstamų reikšmių – laukas visada pateikiamas, o trūkstamas skaičius yra null.
  • Kodai (degalų, verdiktų) neverčiami: PETROL, DIESEL, NO_DEFECTS, MAJOR_DEFECTS ir t. t.
  • Slug (trumpieji identifikatoriai) – [a-z0-9-], vienodi visomis kalbomis.
  • Publikavimo slenksčiai – GET /api/public/meta lauke thresholds. Slenksčio nepasiekusiai grupei grąžinama publishable: false, o turinčiai mažiau nei 30 pagrindinių apžiūrų – 404. Plačiau – metodika.

Klaidos

Apie klaidas pranešama application/problem+json formatu su laukais title, detail ir status:

KodasKada grąžinamas
400Netinkamas page parametras (/sitemap/{set}?page=x).
404Nežinomas slug, metai ar laikotarpis; grupėje mažiau nei 30 apžiūrų; tuščias reitingo pjūvis.
406Accept antraštėje nurodytas ne application/json formatas.
422Netinkami užklausos parametrai; atsakyme papildomai violations[].

Prieigos taškai

Sąrašas sugeneruotas iš API OpenAPI specifikacijos (tik viešieji prieigos taškai). Laukų aprašymai pateikiami anglų kalba, kaip specifikacijoje.

  • GET /meta – Duomenų šviežumas, apimtis, licencija, privalomas šaltinio nurodymo tekstas, publikavimo slenksčiai.
  • GET /makes – Visos publikuojamos markės, didžiausia imtis pirmiau.
  • GET /makes/{slug} – Viena markė: išlaikymas pagal amžių, degalų sudėtis ir modeliai.
  • GET /makes/{make}/models/{model} – Vienas modelis per visus gamybos metus: ridos procentiliai, trūkumai, išmetamieji teršalai, panašūs modeliai.
  • GET /makes/{make}/models/{model}/years/{year} – Vienas modelis vienais gamybos metais – palyginimas su klasės vidurkiu, dabartinė rida.
  • GET /search – Markių ir modelių paieška (iki 10 rezultatų).
  • GET /mileage-check – Ar rida normali: kur nurodyta rida patenka tarp to paties modelio ir metų automobilių ridų.
  • GET /rankings/editions – Esami reitingų leidimai, amžiaus grupės ir degalų pjūviai.
  • GET /rankings – Vienas patikimumo reitingo puslapis: leidimas × amžiaus grupė × degalai.
  • GET /municipalities – Visos savivaldybės, pagal amžių koreguotas išlaikymas.
  • GET /municipalities/{slug} – Viena savivaldybė: rodikliai pagal metus, parko amžius, dažniausi modeliai.
  • GET /national – Visos šalies rodikliai ir jų kaita pagal metus nuo 2015 m.
  • GET /national/{year} – Vieni metai: dažniausios markės, geriausi ir prasčiausi modeliai.
  • GET /studies/rollback – Ridos neatitikimų tyrimas: 30 modelių ir gamybos metų su didžiausia dalimi bei visos savivaldybės.
  • GET /sitemap/{set} – Publikuotų puslapių keliai svetainės žemėlapiams.
  • GET /digests – Mėnesio apžvalgų sąrašas (2 etapas; kol kas 404).
  • GET /digests/{period} – Vieno mėnesio apžvalga (2 etapas).

GET /api/public/meta

Duomenų šviežumas, apimtis, licencija, privalomas šaltinio nurodymo tekstas, publikavimo slenksčiai.

Užklausos pavyzdys

https://api.caropen.lt/api/public/meta

Klaidų kodai: 404

Atsakymo pavyzdys · object
{
  "service": "caropen-api",
  "version": "1a2b3c4",
  "time": "2026-09-14T08:00:00+00:00",
  "country": "LT",
  "freshness": {
    "maxInspectedWeek": "2026-09-07",
    "isoWeek": "2026-W36",
    "lastStatsRefresh": "2026-09-13T14:19:06+00:00",
    "lastPublish": "2026-09-13T14:19:06+00:00"
  },
  "counts": {
    "inspections": 0,
    "vehicles": 0,
    "publishableModelYears": 0,
    "publishableModels": 0,
    "makes": 0,
    "municipalities": 0
  },
  "licence": {
    "name": "CC BY 4.0",
    "attribution": "Valstybės duomenų agentūra / Transeksta, Transporto priemonių techninės apžiūros duomenys, data.gov.lt",
    "datasetUrl": "https://data.gov.lt/datasets/2721/"
  },
  "thresholds": {
    "modelYear": 0,
    "model": 0,
    "ageBandCell": 0,
    "mileageCohort": 0
  }
}

Atsakymo laukai

servicestringConstant service identifier, so a misrouted vhost is obvious.
versionstringShort git hash of the running revision, or "dev" when unknown.
timestringServer time (ATOM), the cheapest proof the process is really answering.
countrystringISO 3166-1 alpha-2 country the statistics describe.
freshnessobjectHow fresh the data and the published statistics are.
countsobjectDataset coverage and published page counts.
licenceobjectSource licence and the required attribution.
thresholdsobjectPublication thresholds (minimum sample sizes).

GET /api/public/makes

Visos publikuojamos markės, didžiausia imtis pirmiau.

Užklausos pavyzdys

https://api.caropen.lt/api/public/makes

Atsakymo pavyzdys · object[]
[
  {
    "slug": "toyota",
    "name": "Toyota",
    "n": 1234,
    "passRate": 0.7123,
    "ciLo": 0.6862,
    "ciHi": 0.737,
    "modelsN": 0,
    "fleetShare": 0.5,
    "rollbackShare": 0.0312
  }
]

Atsakymo laukai

slugstringMake slug, identical in every locale.
namestringDisplay name.
nintegerFirst attempts (main inspections) across the make's whole fleet.
passRatenumber | nullFirst-attempt pass rate, 0..1.
ciLonumber | nullLower bound of the 95 % Wilson interval of `passRate`.
ciHinumber | nullUpper bound of the 95 % Wilson interval of `passRate`.
modelsNintegerModel families of this make with a publishable page.
fleetSharenumber | nullShare of the registered Lithuanian fleet (0..1); null until the Regitra pipeline runs.
rollbackSharenumber | nullShare of the make's assessable vehicles flagged for an odometer inconsistency (0..1).

GET /api/public/makes/{slug}

Viena markė: išlaikymas pagal amžių, degalų sudėtis ir modeliai.

Parametrai

  • slug string · adreso kelyje · privalomas Trumpasis identifikatorius (slug), vienodas visomis kalbomis.

Užklausos pavyzdys

https://api.caropen.lt/api/public/makes/toyota

Klaidų kodai: 404

Atsakymo pavyzdys · object
{
  "slug": "toyota",
  "name": "Toyota",
  "n": 1234,
  "passRate": 0.7123,
  "ciLo": 0.6862,
  "ciHi": 0.737,
  "modelsN": 0,
  "fleetShare": 0.5,
  "rollbackShare": 0.0312,
  "passByAge": [
    {
      "age": 17,
      "n": 1234,
      "passRate": 0.7123,
      "ciLo": 0.6862,
      "ciHi": 0.737
    }
  ],
  "fuelMix": {
    "…": 0.5
  },
  "models": [
    {
      "slug": "toyota",
      "name": "Toyota",
      "n": 1234,
      "passRate": 0.7123,
      "ridaMedian": 0,
      "ridaMedianAge": 0,
      "publishable": true
    }
  ],
  "fleet": {
    "edition": 2026,
    "registeredN": 0,
    "share": 0.5,
    "medianAge": 0.5,
    "evShare": 0.5,
    "fuelMix": {
      "…": 0.5
    },
    "powertrainMix": {
      "…": 0.5
    }
  },
  "publishedAt": "2026-09-13T14:19:06+00:00"
}

Atsakymo laukai

slugstringMake slug, identical in every locale.
namestringDisplay name.
nintegerFirst attempts (main inspections) across the make's whole fleet.
passRatenumber | nullFirst-attempt pass rate, 0..1.
ciLonumber | nullLower bound of the 95 % Wilson interval of `passRate`.
ciHinumber | nullUpper bound of the 95 % Wilson interval of `passRate`.
modelsNintegerModel families of this make with a publishable page.
fleetSharenumber | nullShare of the registered Lithuanian fleet (0..1); null until the Regitra pipeline runs.
rollbackSharenumber | nullShare of the make's assessable vehicles flagged for an odometer inconsistency (0..1).
passByAgeobject[]First-attempt pass rate by vehicle age; ages with fewer than 30 first attempts are left out.
fuelMixmapShare of first attempts per fuel code (PETROL, DIESEL, …), summing to 1.
modelsobject[]The make's model families with at least 30 first attempts, largest sample first; `publishable` marks the ones with a page.
fleetobject | nullThe make's registered passenger cars in the newest Regitra edition; null below 30 or before the first edition.
publishedAtstring | nullWhen the make's published numbers last changed (the sitemap lastmod); null if never published.

GET /api/public/makes/{make}/models/{model}

Vienas modelis per visus gamybos metus: ridos procentiliai, trūkumai, išmetamieji teršalai, panašūs modeliai.

Parametrai

  • make string · adreso kelyje · privalomas Markės slug.
  • model string · adreso kelyje · privalomas Modelio šeimos slug.

Užklausos pavyzdys

https://api.caropen.lt/api/public/makes/toyota/models/avensis

Klaidų kodai: 404

Atsakymo pavyzdys · object
{
  "make": {
    "slug": "toyota",
    "name": "Toyota"
  },
  "makeSlug": "toyota",
  "slug": "toyota",
  "name": "Toyota",
  "n": 1234,
  "passRate": 0.7123,
  "ciLo": 0.6862,
  "ciHi": 0.737,
  "publishable": true,
  "passByAge": [
    {
      "age": 17,
      "n": 1234,
      "passRate": 0.7123,
      "ciLo": 0.6862,
      "ciHi": 0.737
    }
  ],
  "ridaPctl": {
    "…": {
      "p10": 0,
      "p25": 0,
      "p50": 0,
      "p75": 0,
      "p90": 0,
      "n": 1234
    }
  },
  "verdictMix": {
    "…": 0
  },
  "emissions": {
    "co": {
      "median": 0.5,
      "p90": 0.5,
      "failShare": 0.5,
      "n": 1234
    },
    "co2000": {
      "median": 0.5,
      "p90": 0.5,
      "failShare": 0.5,
      "n": 1234
    },
    "smoke": {
      "median": 0.5,
      "p90": 0.5,
      "failShare": 0.5,
      "n": 1234
    }
  },
  "annualKmMedian": 0,
  "rollbackShare": 0.0312,
  "fuelMix": {
    "…": 0.5
  },
  "years": [
    {
      "yearMade": 2008,
      "n": 1234,
      "passRate": 0.7123,
      "ciLo": 0.6862,
      "ciHi": 0.737,
      "publishable": true
    }
  ],
  "similar": [
    {
      "makeSlug": "toyota",
      "modelSlug": "avensis",
      "name": "Toyota",
      "passRate": 0.7123
    }
  ],
  "fleetShare": 0.5,
  "fleet": {
    "edition": 2026,
    "registeredN": 0,
    "share": 0.5,
    "medianAge": 0.5,
    "evShare": 0.5,
    "fuelMix": {
      "…": 0.5
    },
    "powertrainMix": {
      "…": 0.5
    }
  },
  "publishedAt": "2026-09-13T14:19:06+00:00"
}

Atsakymo laukai

makeobjectThe family's make.
makeSlugstringMake slug (the `{make}` of the URL).
slugstringModel family slug (the `{model}` of the URL).
namestringModel family name.
nintegerFirst attempts across all years of manufacture.
passRatenumber | nullFirst-attempt pass rate, 0..1.
ciLonumber | nullLower bound of the 95 % Wilson interval of `passRate`.
ciHinumber | nullUpper bound of the 95 % Wilson interval of `passRate`.
publishablebooleanWhether the family reaches the model threshold (500 first attempts); false means render noindex.
passByAgeobject[]First-attempt pass rate by vehicle age; ages with fewer than 30 first attempts are left out.
ridaPctlmapOdometer percentiles keyed by vehicle age in years ("8"); ages with fewer than 50 vehicles are left out.
verdictMixmapFirst attempts per verdict code (NO_DEFECTS, MINOR_DEFECTS, MAJOR_DEFECTS, DANGEROUS_DEFECTS, UNKNOWN) — counts, not shares.
emissionsobject | nullEmissions benchmarks across all years; null when nothing was measured 50 times.
annualKmMedianinteger | nullMedian kilometres driven per year; null below 50 measured vehicles.
rollbackSharenumber | nullShare of assessable vehicles flagged for an odometer inconsistency (0..1).
fuelMixmapShare of first attempts per fuel code, summing to 1.
yearsobject[]Every year of manufacture with data, oldest first; `publishable` marks the ones with an indexable page.
similarobject[]Up to five publishable families of the same class and similar age with the closest pass rate.
fleetSharenumber | nullShare of the registered Lithuanian passenger-car fleet (0..1); null below 30 registered cars or before the Regitra pipeline runs.
fleetobject | nullThe family's registered passenger cars in the newest Regitra edition; null below 30 or before the first edition.
publishedAtstring | nullWhen the family's published numbers last changed (the sitemap lastmod); null if not published.

GET /api/public/makes/{make}/models/{model}/years/{year}

Vienas modelis vienais gamybos metais – palyginimas su klasės vidurkiu, dabartinė rida.

Parametrai

  • make string · adreso kelyje · privalomas Markės slug.
  • model string · adreso kelyje · privalomas Modelio šeimos slug.
  • year string · adreso kelyje · privalomas Metai.

Užklausos pavyzdys

https://api.caropen.lt/api/public/makes/toyota/models/avensis/years/2008

Klaidų kodai: 404

Atsakymo pavyzdys · object
{
  "make": {
    "slug": "toyota",
    "name": "Toyota"
  },
  "model": {
    "slug": "avensis",
    "name": "Avensis"
  },
  "makeSlug": "toyota",
  "modelSlug": "avensis",
  "yearMade": 2008,
  "n": 1234,
  "passRate": 0.7123,
  "ciLo": 0.6862,
  "ciHi": 0.737,
  "classAgePassRate": 0.6545,
  "currentAge": 17,
  "ridaPctlNow": {
    "p10": 0,
    "p25": 0,
    "p50": 0,
    "p75": 0,
    "p90": 0,
    "n": 1234
  },
  "ridaPctlInterpolated": true,
  "fallbackUsed": true,
  "expectedKmNow": 0,
  "verdictMix": {
    "…": 0
  },
  "emissions": {
    "co": {
      "median": 0.5,
      "p90": 0.5,
      "failShare": 0.5,
      "n": 1234
    },
    "co2000": {
      "median": 0.5,
      "p90": 0.5,
      "failShare": 0.5,
      "n": 1234
    },
    "smoke": {
      "median": 0.5,
      "p90": 0.5,
      "failShare": 0.5,
      "n": 1234
    }
  },
  "rollbackShare": 0.0312,
  "rollbackN": 0,
  "annualKmMedian": 0,
  "publishable": true,
  "indexable": true,
  "publishedAt": "2026-09-13T14:19:06+00:00"
}

Atsakymo laukai

makeobjectThe cohort's make.
modelobjectThe cohort's model family.
makeSlugstringMake slug (the `{make}` of the URL).
modelSlugstringModel family slug (the `{model}` of the URL).
yearMadeintegerYear of manufacture (the `{year}` of the URL).
nintegerFirst attempts (main inspections) of the cohort.
passRatenumber | nullFirst-attempt pass rate, 0..1.
ciLonumber | nullLower bound of the 95 % Wilson interval of `passRate`.
ciHinumber | nullUpper bound of the 95 % Wilson interval of `passRate`.
classAgePassRatenumber | nullPass rate of all M1 cars at the cohort's current age — the comparison line.
currentAgeinteger | nullThe cohort's age in the newest calendar year of the data; null before the first load.
ridaPctlNowobject | nullOdometer percentiles at `currentAge`: the cohort's own, interpolated between its neighbouring ages, or the M1 class figures for the model's dominant fuel or all fuels (`fallbackUsed`); null when none exist. The mileage calculator uses the same row.
ridaPctlInterpolatedbooleanWhether `ridaPctlNow` is interpolated between the cohort's nearest published ages below and above `currentAge`.
fallbackUsedbooleanWhether `ridaPctlNow` comes from the M1 class at that age because the cohort has no usable readings around it.
expectedKmNowinteger | nullExpected odometer reading now: the median (p50) of `ridaPctlNow`, km.
verdictMixmapFirst attempts per verdict code (NO_DEFECTS, MINOR_DEFECTS, MAJOR_DEFECTS, DANGEROUS_DEFECTS, UNKNOWN) — counts, not shares.
emissionsobject | nullEmissions benchmarks; null when nothing was measured 50 times.
rollbackSharenumber | nullShare of assessable vehicles flagged for an odometer inconsistency (0..1).
rollbackNintegerVehicles flagged for an odometer inconsistency (the numerator of `rollbackShare`).
annualKmMedianinteger | nullMedian kilometres driven per year; null below 50 measured vehicles.
publishablebooleanWhether the cohort reaches the model-year threshold (100 first attempts).
indexablebooleanWhether the page may be indexed; equal to `publishable`.
publishedAtstring | nullWhen the cohort's published numbers last changed (the sitemap lastmod); null if not published.

GET /api/public/mileage-check

Ar rida normali: kur nurodyta rida patenka tarp to paties modelio ir metų automobilių ridų.

Parametrai

  • make string · užklausos eilutėje · privalomas Make slug.
  • model string · užklausos eilutėje · privalomas Model family slug.
  • year integer · užklausos eilutėje · privalomas Year of manufacture.
  • km integer · užklausos eilutėje · privalomas Odometer reading in km, 0–1 500 000.

Užklausos pavyzdys

https://api.caropen.lt/api/public/mileage-check?make=toyota&model=avensis&year=2008&km=210000

Klaidų kodai: 404

Atsakymo pavyzdys · object
{
  "percentile": 0.5,
  "band": "LOW",
  "p10": 0,
  "p25": 0,
  "p50": 0,
  "p75": 0,
  "p90": 0,
  "n": 1234,
  "fallbackUsed": true,
  "cohortUrl": "string",
  "age": 17
}

Atsakymo laukai

percentilenumberWhere `km` falls among comparable cars, 0–100, one decimal.
band"LOW" | "TYPICAL" | "HIGH" | "VERY_HIGH"`LOW` (< p25), `TYPICAL` (p25–p75), `HIGH` (p75–p90) or `VERY_HIGH` (> p90).
p10integerReading at the 10th percentile, km.
p25integerReading at the 25th percentile, km: the lower edge of `TYPICAL`.
p50integerThe median reading, km.
p75integerReading at the 75th percentile, km: the upper edge of `TYPICAL`.
p90integerReading at the 90th percentile, km: above it is `VERY_HIGH`.
nintegerReadings behind the percentiles (the smaller side when interpolated between ages).
fallbackUsedbooleanTrue when the class figures were used instead of the model-year cohort.
cohortUrlstring | nullThe cohort page as a base-locale (unprefixed) path, e.g. `/markes/toyota/avensis/2008/`; null when that page is not published.
ageintegerThe age in years the reference is taken at.

GET /api/public/rankings/editions

Esami reitingų leidimai, amžiaus grupės ir degalų pjūviai.

Užklausos pavyzdys

https://api.caropen.lt/api/public/rankings/editions

Atsakymo pavyzdys · object[]
[
  {
    "edition": 2026,
    "ageBands": [
      "2-3"
    ],
    "fuels": [
      "all"
    ]
  }
]

Atsakymo laukai

editionintegerThe edition year.
ageBands"2-3" | "4-5" | "6-7" | "8-9" | "10-11" | "12+"[]Age bands with a ranking, youngest first.
fuels"all" | "petrol" | "diesel"[]Fuel views with a ranking, in the order `all`, `petrol`, `diesel`.

GET /api/public/rankings

Vienas patikimumo reitingo puslapis: leidimas × amžiaus grupė × degalai.

Parametrai

  • edition integer · užklausos eilutėje · neprivalomas Edition year; the newest when omitted.
  • ageBand string · užklausos eilutėje · privalomas Age band: 2-3, 4-5, 6-7, 8-9, 10-11 or 12+ (also 12-plus).
  • fuel string · užklausos eilutėje · neprivalomas Fuel view: all, petrol or diesel; all when omitted.

Užklausos pavyzdys

https://api.caropen.lt/api/public/rankings?edition=2026&ageBand=4-5&fuel=diesel

Klaidų kodai: 404

Atsakymo pavyzdys · object
{
  "edition": 2026,
  "ageBand": "2-3",
  "fuel": "all",
  "rows": [
    {
      "rank": 1,
      "prevRank": 2,
      "movement": 1,
      "make": {
        "slug": "toyota",
        "name": "Toyota"
      },
      "model": {
        "slug": "avensis",
        "name": "Avensis"
      },
      "n": 1234,
      "passRate": 0.7123,
      "ciLo": 0.6862,
      "ciHi": 0.737
    }
  ],
  "generatedAt": "string"
}

Atsakymo laukai

editionintegerThe edition year.
ageBand"2-3" | "4-5" | "6-7" | "8-9" | "10-11" | "12+"The age band, in years.
fuel"all" | "petrol" | "diesel"The fuel view.
rowsobject[]Ranked model families, best first.
generatedAtstringWhen the edition was computed (ATOM).

GET /api/public/municipalities

Visos savivaldybės, pagal amžių koreguotas išlaikymas.

Užklausos pavyzdys

https://api.caropen.lt/api/public/municipalities

Atsakymo pavyzdys · object[]
[
  {
    "slug": "toyota",
    "nameLt": "Vilniaus miesto savivaldybė",
    "nameEn": "Vilnius City Municipality",
    "county": "Vilniaus apskritis",
    "n": 1234,
    "passRate": 0.7123,
    "ageAdjustedPassRate": 0.7011,
    "stationCount": 0,
    "fleet": {
      "edition": 2026,
      "registeredN": 0,
      "share": 0.5,
      "medianAge": 0.5,
      "evShare": 0.5,
      "fuelMix": {
        "…": 0.5
      },
      "powertrainMix": {
        "…": 0.5
      }
    }
  }
]

Atsakymo laukai

slugstringURL slug, identical in every locale.
nameLtstringLithuanian name ("Vilniaus miesto savivaldybė").
nameEnstring | nullEnglish name; null when not seeded.
countystring | nullCounty (apskritis); null when not seeded.
nintegerFirst attempts at the municipality's stations, all years.
passRatenumber | nullRaw first-attempt pass rate, 0–1.
ageAdjustedPassRatenumber | nullPass rate with the national age mix, 0–1 — the figure to compare municipalities on.
stationCountintegerDistinct (anonymous) inspection stations.
fleetobject | nullPassenger cars registered to holders in the municipality, newest Regitra edition; null before the first edition.

GET /api/public/municipalities/{slug}

Viena savivaldybė: rodikliai pagal metus, parko amžius, dažniausi modeliai.

Parametrai

  • slug string · adreso kelyje · privalomas Trumpasis identifikatorius (slug), vienodas visomis kalbomis.

Užklausos pavyzdys

https://api.caropen.lt/api/public/municipalities/vilniaus-miesto

Klaidų kodai: 404

Atsakymo pavyzdys · object
{
  "slug": "toyota",
  "nameLt": "Vilniaus miesto savivaldybė",
  "nameEn": "Vilnius City Municipality",
  "county": "Vilniaus apskritis",
  "n": 1234,
  "passRate": 0.7123,
  "ageAdjustedPassRate": 0.7011,
  "stationCount": 0,
  "ciLo": 0.6862,
  "ciHi": 0.737,
  "fleetMedianAge": 0.5,
  "byYear": [
    {
      "year": 2024,
      "n": 1234,
      "passRate": 0.7123,
      "ciLo": 0.6862,
      "ciHi": 0.737,
      "ageAdjustedPassRate": 0.7011,
      "stationCount": 0,
      "fleetMedianAge": 0.5
    }
  ],
  "topModels": [
    {
      "makeSlug": "toyota",
      "modelSlug": "avensis",
      "name": "Toyota",
      "n": 1234
    }
  ],
  "fleet": {
    "edition": 2026,
    "registeredN": 0,
    "share": 0.5,
    "medianAge": 0.5,
    "evShare": 0.5,
    "fuelMix": {
      "…": 0.5
    },
    "powertrainMix": {
      "…": 0.5
    }
  }
}

Atsakymo laukai

slugstringURL slug, identical in every locale.
nameLtstringLithuanian name ("Vilniaus miesto savivaldybė").
nameEnstring | nullEnglish name; null when not seeded.
countystring | nullCounty (apskritis); null when not seeded.
nintegerFirst attempts at the municipality's stations, all years.
passRatenumber | nullRaw first-attempt pass rate, 0–1.
ageAdjustedPassRatenumber | nullPass rate with the national age mix, 0–1 — the figure to compare municipalities on.
stationCountintegerDistinct (anonymous) inspection stations.
ciLonumber | nullWilson 95 % interval of the raw pass rate, lower bound.
ciHinumber | nullWilson 95 % interval of the raw pass rate, upper bound.
fleetMedianAgenumber | nullMedian age in years of the inspected vehicles, all years.
byYearobject[]One row per calendar year of inspection, oldest first.
topModelsobject[]The five most inspected model families, all years, most inspected first.
fleetobject | nullPassenger cars registered to holders in the municipality, newest Regitra edition; null before the first edition.

GET /api/public/national

Visos šalies rodikliai ir jų kaita pagal metus nuo 2015 m.

Užklausos pavyzdys

https://api.caropen.lt/api/public/national

Klaidų kodai: 404

Atsakymo pavyzdys · object
{
  "year": 2024,
  "n": 1234,
  "passRate": 0.7123,
  "ciLo": 0.6862,
  "ciHi": 0.737,
  "rollbackShare": 0.0312,
  "fleetMedianAge": 0.5,
  "vehiclesN": 0,
  "fuelMix": {
    "…": 0.5
  },
  "verdictMix": {
    "…": 0
  },
  "byYear": [
    {
      "year": 2024,
      "n": 1234,
      "passRate": 0.7123,
      "ciLo": 0.6862,
      "ciHi": 0.737,
      "rollbackShare": 0.0312,
      "fleetMedianAge": 0.5,
      "fuelMix": {
        "…": 0.5
      },
      "verdictMix": {
        "…": 0
      }
    }
  ],
  "fleet": {
    "edition": 2026,
    "registeredN": 0,
    "medianAge": 0.5,
    "evShare": 0.5,
    "fuelMix": {
      "…": 0.5
    },
    "powertrainMix": {
      "…": 0.5
    },
    "byEdition": [
      {
        "edition": 2026,
        "registeredN": 0,
        "medianAge": 0.5,
        "evShare": 0.5,
        "powertrainMix": {
          "…": 0.5
        }
      }
    ],
    "registrationsByQuarter": [
      {
        "quarter": "string",
        "n": 1234,
        "bevShare": 0.5,
        "phevShare": 0.5,
        "hevShare": 0.5
      }
    ],
    "topEvModels": [
      {
        "makeSlug": "toyota",
        "modelSlug": "avensis",
        "name": "Toyota",
        "n": 1234
      }
    ]
  }
}

Atsakymo laukai

yearinteger | nullCalendar year of inspection; null for the all-years figures.
nintegerFirst attempts.
passRatenumber | nullFirst-attempt pass rate, 0–1.
ciLonumber | nullWilson 95 % interval of `passRate`, lower bound, 0–1.
ciHinumber | nullWilson 95 % interval of `passRate`, upper bound, 0–1.
rollbackSharenumber | nullOdometer-rollback share, 0–1 (vehicles by the year of their last inspection).
fleetMedianAgenumber | nullMedian age in years of the inspected vehicles.
vehiclesNintegerDistinct vehicles with a first attempt.
fuelMixmapShare of first attempts per fuel code (PETROL, DIESEL, …), 0–1.
verdictMixmapFirst attempts per verdict code (NO_DEFECTS, MINOR_DEFECTS, MAJOR_DEFECTS, DANGEROUS_DEFECTS, UNKNOWN) — counts, not shares.
byYearobject[]The series since 2015, oldest first (the all-years response only).
fleetobject | nullThe registered passenger-car fleet and its EV series (Regitra; the all-years response only); null before the first edition.

GET /api/public/national/{year}

Vieni metai: dažniausios markės, geriausi ir prasčiausi modeliai.

Parametrai

  • year string · adreso kelyje · privalomas Metai.

Užklausos pavyzdys

https://api.caropen.lt/api/public/national/2024

Klaidų kodai: 404

Atsakymo pavyzdys · object
{
  "year": 2024,
  "n": 1234,
  "passRate": 0.7123,
  "ciLo": 0.6862,
  "ciHi": 0.737,
  "rollbackShare": 0.0312,
  "fleetMedianAge": 0.5,
  "vehiclesN": 0,
  "fuelMix": {
    "…": 0.5
  },
  "verdictMix": {
    "…": 0
  },
  "topMakes": [
    {
      "slug": "toyota",
      "name": "Toyota",
      "n": 1234
    }
  ],
  "topModels": [
    {
      "make": {
        "slug": "toyota",
        "name": "Toyota"
      },
      "model": {
        "slug": "avensis",
        "name": "Avensis"
      },
      "n": 1234,
      "passRate": 0.7123,
      "ciLo": 0.6862,
      "ciHi": 0.737
    }
  ],
  "worstModels": [
    {
      "make": {
        "slug": "toyota",
        "name": "Toyota"
      },
      "model": {
        "slug": "avensis",
        "name": "Avensis"
      },
      "n": 1234,
      "passRate": 0.7123,
      "ciLo": 0.6862,
      "ciHi": 0.737
    }
  ]
}

Atsakymo laukai

yearinteger | nullCalendar year of inspection; null for the all-years figures.
nintegerFirst attempts.
passRatenumber | nullFirst-attempt pass rate, 0–1.
ciLonumber | nullWilson 95 % interval of `passRate`, lower bound, 0–1.
ciHinumber | nullWilson 95 % interval of `passRate`, upper bound, 0–1.
rollbackSharenumber | nullOdometer-rollback share, 0–1 (vehicles by the year of their last inspection).
fleetMedianAgenumber | nullMedian age in years of the inspected vehicles.
vehiclesNintegerDistinct vehicles with a first attempt.
fuelMixmapShare of first attempts per fuel code (PETROL, DIESEL, …), 0–1.
verdictMixmapFirst attempts per verdict code (NO_DEFECTS, MINOR_DEFECTS, MAJOR_DEFECTS, DANGEROUS_DEFECTS, UNKNOWN) — counts, not shares.
topMakesobject[]The ten most inspected makes of the year, most inspected first.
topModelsobject[]The ten model families with the highest pass rate among those with n ≥ 500 that year, best first.
worstModelsobject[]The ten with the lowest pass rate among the same families, worst first.

GET /api/public/studies/rollback

Ridos neatitikimų tyrimas: 30 modelių ir gamybos metų su didžiausia dalimi bei visos savivaldybės.

Užklausos pavyzdys

https://api.caropen.lt/api/public/studies/rollback

Klaidų kodai: 404

Atsakymo pavyzdys · object
{
  "minN": 0,
  "byModelYear": [
    {
      "make": {
        "slug": "toyota",
        "name": "Toyota"
      },
      "model": {
        "slug": "avensis",
        "name": "Avensis"
      },
      "yearMade": 2008,
      "n": 1234,
      "rollbackShare": 0.0312
    }
  ],
  "byMunicipality": [
    {
      "slug": "toyota",
      "nameLt": "Vilniaus miesto savivaldybė",
      "nameEn": "Vilnius City Municipality",
      "n": 1234,
      "rollbackShare": 0.0312
    }
  ]
}

Atsakymo laukai

minNintegerThe sample floor of `byModelYear`: first attempts of the cohort.
byModelYearobject[]The 30 publishable model-year cohorts with n ≥ `minN` and the highest rollback share, highest first.
byMunicipalityobject[]Every municipality with a share (vehicles by the municipality of their last inspection, all years), highest first.

GET /api/public/sitemap/{set}

Publikuotų puslapių keliai svetainės žemėlapiams.

Parametrai

  • set string · adreso kelyje · privalomas Rinkinys: makes, models, model-years, municipalities, statistics arba rankings.
  • page integer · užklausos eilutėje · neprivalomas Page number, from 1.

Užklausos pavyzdys

https://api.caropen.lt/api/public/sitemap/model-years

Klaidų kodai: 404

Atsakymo pavyzdys · object
{
  "set": "makes",
  "items": [
    {
      "path": "/markes/toyota/avensis/2008/",
      "pathEn": "/en/makes/toyota/avensis/2008/",
      "lastmod": "string"
    }
  ],
  "page": 0,
  "pages": 0,
  "total": 0
}

Atsakymo laukai

set"makes" | "models" | "model-years" | "municipalities" | "statistics" | "rankings"The page set this sitemap lists.
itemsobject[]Published pages on this page of the set, ordered by path.
pageintegerThis page, from 1.
pagesintegerNumber of pages (at least 1).
totalintegerEntries in the whole set.

GET /api/public/digests

Mėnesio apžvalgų sąrašas (2 etapas; kol kas 404).

Užklausos pavyzdys

https://api.caropen.lt/api/public/digests

Atsakymo pavyzdys · object[]
[
  {
    "period": "string",
    "publishedAt": "string"
  }
]

Atsakymo laukai

periodstring`YYYY-MM`.
publishedAtstringATOM.

GET /api/public/digests/{period}

Vieno mėnesio apžvalga (2 etapas).

Parametrai

  • period string · adreso kelyje · privalomas Mėnuo, YYYY-MM.

Užklausos pavyzdys

https://api.caropen.lt/api/public/digests/2026-09

Klaidų kodai: 404

Atsakymo pavyzdys · object
{
  "period": "string",
  "publishedAt": "string",
  "payload": {
    "…": "string"
  }
}

Atsakymo laukai

periodstring`YYYY-MM`.
publishedAtstringATOM.
payloadmap | nullThe digest content, as generated (task 044).