Skip to main content
Menu

API құжаттамасы

HTTPS арқылы REST + JSON. Бір базалық URL, бір кілт, болжамды конверттер.

Базалық URLhttps://nakordoni.eu/api/v1/data/
ПішімJSON, UTF-8
АутентификацияAuthorization: Bearer NKD-DEV-…
НұсқалауЖол бойынша нұсқаланған (v1). Үзіліс тудыратын өзгерістер тек жаңа нұсқамен; v1 жауаптары тұрақты болып қалады.

Осы бетте

Аутентификация · Жауап конверті · Квоталар · Код үлгілері · Өнімдер · Не құруға болады

Аутентификация

Әрбір сұрауға API кілтіңіз Authorization тақырыбында (ұсынылады) немесе ?key= параметрі ретінде қажет.

curl "https://nakordoni.eu/api/v1/data/queue?ppid=id_13" \
  -H "Authorization: Bearer NKD-DEV-XXXX-XXXX-XXXX"

Жауап конверті

{
  "ok": true,
  "api_version": "v1",
  "product": "queue",
  "attribution": "Data by nakordoni.eu",
  "data": { ... },
  "usage": { "limit": 1000, "used": 42, "reset": "2026-06-06T00:00:00Z" }
}

Қателер ok:false мәнін error.code (missing_api_key, invalid_api_key, qps_exceeded, quota_exceeded, unknown_product, product_unavailable, bad_request, internal_error) және HTTP күй-жайы 401/403/404/429/500 арқылы қайтарады. Жылдамдық шектеу тақырыптары X-Devapi-Limit және X-Devapi-Remaining әрбір есептелетін жауаппен жіберіледі.

Квоталар

ExplorerPay As You Grow
стандартты деректер API-ларына күніне шақыру1,00050,000
болжам және статистика API-ларына күніне шақыру20010,000
QPS220

Күнделікті есептегіштер UTC бойынша түн ортасында қалпына келтіріледі. Сіз квотаның 80% және 100% деңгейінде электрондық хат аласыз.

Код үлгілері

curl

curl "https://nakordoni.eu/api/v1/data/queue?ppid=id_13" \
  -H "Authorization: Bearer $NKD_API_KEY"

JavaScript (fetch)

const res = await fetch('https://nakordoni.eu/api/v1/data/forecast?ppid=id_13&prediction_steps=24', {
  headers: { Authorization: `Bearer ${process.env.NKD_API_KEY}` }
});
const { ok, data, usage } = await res.json();
if (!ok) throw new Error(data?.error?.code ?? res.status);
console.log(`forecast points: ${data.length}, calls left today: ${usage.limit - usage.used}`);

Python (requests)

import os, requests

r = requests.get(
    "https://nakordoni.eu/api/v1/data/stats",
    params={"ppid": "id_15", "compare": 1},
    headers={"Authorization": f"Bearer {os.environ['NKD_API_KEY']}"},
    timeout=15,
)
payload = r.json()
print(payload["data"]["daily"], payload["usage"])

Өнімдер

Checkpoints Directory API

Directory of all monitored border checkpoints: IDs, names, countries, coordinates and status. Use it to discover ppid values for the other APIs.

GET https://nakordoni.eu/api/v1/data/checkpoints — квота класы: cheap

ПараметрСипаттама
countryFilter by numeric country code (1=UA, 2=PL, 3=SK, 4=HU, 5=RO, 6=MD, 7=BY, 8=LT, 9=LV, …)
langLanguage for checkpoint names (default en)
curl "https://nakordoni.eu/api/v1/data/checkpoints" \
  -H "Authorization: Bearer NKD-DEV-XXXX-XXXX-XXXX"

Live Border Queue API

Real-time queue length, wait estimate and status for any monitored checkpoint, plus hourly/daily aggregates.

GET https://nakordoni.eu/api/v1/data/queue — квота класы: heavy

ПараметрСипаттама
ppidCheckpoint ID, e.g. id_13 (see /api/v1/data/checkpoints)
sectionData section (optional)
originOrigin country code (optional)
destinationDestination country code (optional)
curl "https://nakordoni.eu/api/v1/data/queue?ppid=id_13" \
  -H "Authorization: Bearer NKD-DEV-XXXX-XXXX-XXXX"

Checkpoint Hourly Statistics API

Hourly historical queue stats per checkpoint and date: 24 hourly values, daily avg/min/max, peak and quietest hours, day-over-day comparison.

GET https://nakordoni.eu/api/v1/data/stats — квота класы: heavy

ПараметрСипаттама
ppidCheckpoint ID
dateYYYY-MM-DD (default: yesterday)
compare1 = include previous day + delta
langLanguage code (default uk)
curl "https://nakordoni.eu/api/v1/data/stats?ppid=id_15&date=2026-06-01&compare=1" \
  -H "Authorization: Bearer NKD-DEV-XXXX-XXXX-XXXX"

Queue Forecast API

ML ensemble forecast of queue levels: 24-hour and 7-day (168h) horizons with confidence bounds. The same model that powers nakordoni.eu predictions.

GET https://nakordoni.eu/api/v1/data/forecast — квота класы: heavy

ПараметрСипаттама
ppidCheckpoint ID
prediction_steps24 (default) or 168 for 7-day
curl "https://nakordoni.eu/api/v1/data/forecast?ppid=id_13&prediction_steps=24" \
  -H "Authorization: Bearer NKD-DEV-XXXX-XXXX-XXXX"

Checkpoint Alternatives API

Nearby alternative checkpoints on the same border with current queues and distance deltas.

GET https://nakordoni.eu/api/v1/data/alternatives — квота класы: cheap

ПараметрСипаттама
ppidCheckpoint ID
langLanguage code
curl "https://nakordoni.eu/api/v1/data/alternatives?ppid=id_13" \
  -H "Authorization: Bearer NKD-DEV-XXXX-XXXX-XXXX"

Data Freshness API

When a checkpoint was last updated, by which source, and a freshness rating.

GET https://nakordoni.eu/api/v1/data/update-info — квота класы: cheap

ПараметрСипаттама
ppidCheckpoint ID
langLanguage code
curl "https://nakordoni.eu/api/v1/data/update-info?ppid=id_13" \
  -H "Authorization: Bearer NKD-DEV-XXXX-XXXX-XXXX"

EU Fuel Prices API

Average petrol/diesel/LPG prices across EU countries plus nearest stations, aggregated from official national sources.

GET https://nakordoni.eu/api/v1/data/fuel — квота класы: cheap

ПараметрСипаттама
countryISO country code (optional)
latLatitude (optional)
lonLongitude (optional)
langLanguage code
curl "https://nakordoni.eu/api/v1/data/fuel?country=PL" \
  -H "Authorization: Bearer NKD-DEV-XXXX-XXXX-XXXX"

Driver POIs API

Truck parkings (14k+), free showers, services and supermarkets across Europe with coordinates.

GET https://nakordoni.eu/api/v1/data/pois — квота класы: cheap

ПараметрСипаттама
typeparking|shower|supermarket|industrial
latLatitude
lonLongitude
radiusRadius km
curl "https://nakordoni.eu/api/v1/data/pois?type=parking&lat=50.7&lon=23.9&radius=50" \
  -H "Authorization: Bearer NKD-DEV-XXXX-XXXX-XXXX"

Truck Driving Bans API

European truck driving restrictions by country and date, including seasonal and holiday bans.

GET https://nakordoni.eu/api/v1/data/truck-bans — квота класы: cheap

ПараметрСипаттама
countryISO country code (optional)
dateYYYY-MM-DD (optional)
curl "https://nakordoni.eu/api/v1/data/truck-bans?country=PL" \
  -H "Authorization: Bearer NKD-DEV-XXXX-XXXX-XXXX"

Trading Sundays API

Sunday retail-opening regulations and upcoming trading Sundays per regulated EU country.

GET https://nakordoni.eu/api/v1/data/trading-sundays — квота класы: cheap

ПараметрСипаттама
countryISO country code (optional)
curl "https://nakordoni.eu/api/v1/data/trading-sundays?country=PL" \
  -H "Authorization: Bearer NKD-DEV-XXXX-XXXX-XXXX"

Border Weather API Жақында

Current conditions and road warnings at border checkpoints. (Coming soon)

GET https://nakordoni.eu/api/v1/data/weather — квота класы: cheap

ПараметрСипаттама
ppidCheckpoint ID
curl "https://nakordoni.eu/api/v1/data/weather?ppid=id_13" \
  -H "Authorization: Bearer NKD-DEV-XXXX-XXXX-XXXX"

Bus Carrier Border Stats API

Border-crossing performance per bus carrier: crossings, average/median/min/max wait minutes — built from our own plate-matched crossing records.

GET https://nakordoni.eu/api/v1/data/bus-carriers — квота класы: cheap

ПараметрСипаттама
ppidCheckpoint ID or "all" for aggregated
daysPeriod 1-90 (default 30)
min_crossingsMinimum crossings to include a carrier (default 3)
limitMax carriers returned (default 20)
curl "https://nakordoni.eu/api/v1/data/bus-carriers?ppid=all&days=30" \
  -H "Authorization: Bearer NKD-DEV-XXXX-XXXX-XXXX"

Road Conditions API

Approved road condition reports near borders and on major corridors: potholes, roadworks, closures, ice, hazards — combining driver reports with automatic accelerometer detections from our navigation app.

GET https://nakordoni.eu/api/v1/data/road-conditions — квота класы: cheap

ПараметрСипаттама
countryISO country code (optional)
condition_typepothole|speed_bump|roadwork|closure|hazard|ice|… (optional)
severitylow|moderate|major|critical (optional)
latLatitude (optional)
lngLongitude (optional)
radiusRadius km (default 50)
limitMax results (default 100, cap 500)
curl "https://nakordoni.eu/api/v1/data/road-conditions?country=UA&severity=major" \
  -H "Authorization: Bearer NKD-DEV-XXXX-XXXX-XXXX"

Border AI Assistant API

Ask our production AI assistant any border-crossing question (queues, forecasts, rules, fuel, routes) and get the same grounded answer that powers the nakordoni.eu widget — in 24 languages. Already used in production by yaknakordoni.com.ua.

GET https://nakordoni.eu/api/v1/data/assistant — квота класы: heavy

ПараметрСипаттама
qThe question (plain text)
langAnswer language (default en)
ppidCheckpoint context, e.g. id_13 (optional)
curl "https://nakordoni.eu/api/v1/data/assistant?q=How long is the queue at Krakovets now?&lang=en&ppid=id_13" \
  -H "Authorization: Bearer NKD-DEV-XXXX-XXXX-XXXX"

Road Quality API Жақында

Road roughness scores per corridor computed from anonymized accelerometer telemetry of real drives: roughness index 0-100, pothole density per km, rough-corridor clusters with coordinates. (Coming soon)

GET https://nakordoni.eu/api/v1/data/road-quality — квота класы: heavy

ПараметрСипаттама
bboxBounding box
corridorRoute corridor
curl "https://nakordoni.eu/api/v1/data/road-quality?bbox=22.5,48.2,24.5,50.5" \
  -H "Authorization: Bearer NKD-DEV-XXXX-XXXX-XXXX"

Не құруға болады

Дәл сол деректер өнімдері nakordoni.eu сайтындағы визуалдарды көрсетеді — апталық болжам графиктері, сағаттық кезек профильдері, тікелей күй-жай карталары. Болжам және статистика API-ларында не бар екеніне көз жеткізіңіз:

7-day border queue forecast chart built from the Forecast API
Апталық болжам + ең қарбалас күннің сағаттық профилі — Болжам API (prediction_steps=168 / 24)
Hourly queue statistics chart built from the Statistics API
Бекет бойынша сағаттық кезек графигі — Статистика API (stats?ppid=…&compare=1)

Атрибуция

Explorer жоспарының интеграциялары деректер көрсетілетін жерде көрінетін "Data by nakordoni.eu" сілтемесін көрсетуі тиіс. Бұл тегін жоспарды тегін сақтайды.

Тегін API кілтіңізді алыңыз