Dokumentimi i Encar API
Tre endpoint-e, një header, JSON jashtë. Gjithçka më poshtë është referenca e plotë — nuk ka një nivel të dytë, me pagesë, të dokumentimit.
URL bazë
https://api.encar-api.com/apiAutentikimi
Dërgoni çelësin në header-in x-api-key në çdo kërkesë. Nuk ka hap OAuth dhe asnjë token për t'u rifreskuar. Një çelës që mungon ose është i panjohur përgjigjet 401.
curl -H "x-api-key: avg_free_..." \
"https://api.encar-api.com/api/cars?manufacturer=BMW&model=X5\
&fuel=diesel&priceTo=40000&sort=priceAsc&count=24"Tre endpoint-et
| endpoint | what it does |
|---|---|
| GET /cars | Kërko shpallje me filtra. Kthen total, page, count dhe results[]. |
| GET /car?id= | Një veturë e plotë, me disponueshmërinë e kontrolluar live në momentin e kërkesës. |
| GET /count | Sa shpallje përputhen me një grup filtrash, pa i tërhequr ato. |
Referenca
Çdo seksion hapet këtu, dhe çdo titull është gjithashtu një faqe më vete që mund ta lidhni dhe ta ruani.
Parametrat e kërkimit — GET /cars
Lexo më shumë
Kombinoni cilindo prej tyre në një thirrje të vetme. Përgjigjja mban total, page, count dhe results[], prandaj mund të faqezoni mbi total pa një kërkesë të dytë.
| parameter | what it does |
|---|---|
| manufacturer | Brand, as Encar writes it: BMW, Hyundai, Kia, Genesis, Mercedes-Benz, Audi. |
| model | Model name, e.g. X5 (G05). Partial names match, and a generation name narrows further: model=The New Carnival returns that generation alone, not the whole nameplate. |
| q | Free-text search across brand, model and badge. Aliases: keyword, search. |
| fuel | diesel · gasoline · hybrid · electric · lpg. |
| transmission | automatic · manual. |
| color | Exterior colour. |
| seats | Seat count: 5, 7, 9. Several at once as seats=7,9. The two ends are ranges, not counts — 2 means two seats or fewer and 10 means ten or more, which is how the source files them. A car's own figure comes back as details.seats from /car. |
| yearFrom / yearTo | Model year bounds, as plain years: 2018, 2024. |
| mileageFrom / mileageTo | Odometer bounds in kilometres. |
| priceFrom / priceTo | Price bounds in EUR — converted for you, not won. |
| sort | priceAsc or priceDesc. Left out, results come back newest first. |
| page | Page index, zero-based. Default 0. |
| count | Listings per page. Default 24, maximum 500. |
Si duket një shpallje
Lexo më shumë
Të dhënat vijnë nga një burim korean, prandaj katër prej këtyre fushave lexohen gabim si parazgjedhje. Secili gabim dështon në heshtje — faqja juaj shfaqet, thjesht është e pasaktë.
| field | meaning |
|---|---|
| Id | Encar listing id. Pass it to /car to get the full vehicle. |
| Manufacturer / Model / Badge | Korean source values. Badge is partly Korean — prefer the de / en block below. |
| de / en | The same car translated: manufacturer, modelGroup, model, badge, fuelType. Render these. |
| Price | In units of 10,000 KRW. EUR ≈ Price × 6.7, so 4339 is about €29,070 — not €4,339. |
| Year | YYYYMM, not a year: 201902 is February 2019. FormYear holds the plain "2019". |
| Mileage | Kilometres, as an integer. |
| FuelType | Korean. The translated value is in de.fuelType / en.fuelType. |
| Photo / Photos[] | Relative paths. Prefix them with the image host; with Photo, append 001.jpg. |
| priceDrop | Present when the seller cut the price: previousPrice, droppedAt. |
| powerPs / powerKw | Engine output, where the trim is known. |
| OfficeCityState | Where the car stands, as a Korean region name. |
Limitet dhe gabimet
Lexo më shumë
Çdo përgjigje mban X-RateLimit-Limit, X-RateLimit-Remaining dhe X-RateLimit-Reset, prandaj një limit e shihni duke ardhur, nuk e zbuloni.
| status | meaning |
|---|---|
| 200 | A normal answer. Check X-RateLimit-Remaining while you are here. |
| 400 | A parameter could not be parsed — a non-numeric yearFrom, for instance. |
| 401 | Missing or unknown key. Send it as the x-api-key header. |
| 404 SOLD_OR_REMOVED | From /car: the vehicle is gone from Encar. Drop it on your side. |
| 429 | Daily allowance spent. X-RateLimit-Remaining tells you before it happens. |
| 503 | The Korean source did not answer in time. Retry once, then fall back. |
Merr çelësin tënd të API-t
Falas · 100 kërkesa në ditë
Vazhdo të lexosh
Kombinoni cilindo prej tyre në një thirrje të vetme. Përgjigjja mban total, page, count dhe results[], prandaj mund të faqezoni mbi total pa një kërkesë të dytë.
Të dhënat vijnë nga një burim korean, prandaj katër prej këtyre fushave lexohen gabim si parazgjedhje. Secili gabim dështon në heshtje — faqja juaj shfaqet, thjesht është e pasaktë.
Çdo përgjigje mban X-RateLimit-Limit, X-RateLimit-Remaining dhe X-RateLimit-Reset, prandaj një limit e shihni duke ardhur, nuk e zbuloni.