# Road Conditions API

Live road conditions on the approaches to a border crossing: accidents, roadworks, closures, congestion, weather hazards, potholes and ice. Merges our own driver reports with the incident feeds our navigator runs on, deduplicated across feeds, each row carrying a stable opaque id. Send ppid for one crossing, lat and lng for a radius search of up to 50 km, or country for the corridors of all its checkpoints. A corridor is the last 50 km of the main road to the crossing, on both sides of the border. Nothing farther than 100 km from a land border is returned.

**Endpoint:** `GET /api/v1/data/road-conditions`
**Quota class:** cheap — 1000/day (Explorer), 50000/day (PAYG)

---

## Parameters

| Name | Description |
|------|-------------|
| `country` | ISO-2 country code. Use it if you send neither ppid nor lat+lng. Returns the corridors of all checkpoints on that country's side, not the whole country. A country with no checkpoints returns no items |
| `ppid` | Checkpoint ID, e.g. id_13. Send ppid or lat+lng, or country for all its checkpoints; a call with none of them gets 400. Scopes the answer to that crossing's corridor: the last 50 km of the main road to it on BOTH sides of the border |
| `condition_type` | accident\|roadwork\|closure\|congestion\|weather\|hazard\|pothole\|speed_bump\|object\|stopped\|ice\|other (optional). In v1 anything an upstream feed reports outside this list is mapped to `other`; v2 returns the raw value |
| `severity` | low\|moderate\|major\|critical (optional) |
| `lat` | Latitude (optional) — with lng, switches to a radius search. Only conditions within 100 km of a land border are returned |
| `lng` | Longitude (optional) |
| `radius` | Radius km (default 50, maximum 50; a larger value is treated as 50). Applies ONLY with lat+lng; on the corridor path the road itself is the filter, not a circle |
| `sources` | all (default) \| user (our own driver reports only) \| external (road-authority and provider feeds only) |
| `limit` | Max results (default 100, cap 500) |
| `offset` | Pagination offset (optional) |
| `include_expired` | 1 = also return conditions whose expiry has passed (optional) |
| `lang` | Language for condition_type_name / severity_name labels — all 25 site languages plus hr, nl, pt (default uk) |


## Example

```bash
curl "https://nakordoni.eu/api/v1/data/road-conditions?ppid=id_13&lang=en" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

## Response fields

Inside the `data` object of the envelope. A field is `null`, absent or an empty list when we hold no value for it — never a placeholder.

| Field | Description |
|-------|-------------|
| `data.conditions[].condition_type` | What it is (roadworks, closure, accident, weather…), with condition_type_name in the requested language. |
| `data.conditions[].severity` | How bad it is, with severity_name. |
| `data.conditions[].description` | Free-text detail as published, with road_name and direction. |
| `data.conditions[].latitude` | Where it is, with longitude and country_code. |
| `data.conditions[].corridor_ppid` | The border crossing whose approach corridor this sits on, when it is on one. |
| `data.conditions[].estimated_duration` | How long it is expected to last, with expires_at and created_at. |
| `data.conditions[].remaining_minutes` | Minutes until expires_at. Present only when the condition has an expiry. |
| `data.conditions[].description_lang` | v2 only: the language of description. It can differ from lang until a new text is translated, and it is null when the feed has mixed languages. |
| `data.conditions[].description_original` | v2 only: the source text. Present only when description is a translation. |
| `data.conditions[].external_id` | Opaque stable id of a feed incident ("rc_" + 16 hex, null for our own driver reports) — the same incident keeps it across polls, use it to deduplicate. id is a stable int. |
| `data.total` | Matches for the query, with limit and offset for paging. |


## Response envelope

```json
{
  "ok": true,
  "api_version": "1",
  "product": "road-conditions",
  "attribution": "Data by nakordoni.eu",
  "data": [ ... ]
}
```

---

Full docs: https://nakordoni.eu/en/developers/docs#road-conditions
*Auto-generated 2026-12-05 — regenerate: `sudo -u www-data php /var/www/html/helpers/push_github_docs.php`*