{
    "openapi": "3.1.0",
    "info": {
        "title": "Nakordoni Developer API — Air Alert Proximity API",
        "version": "2026-12-04",
        "summary": "REST + JSON over HTTPS. One base URL, one key, predictable envelopes.",
        "description": "Generated from the Nakordoni Developer API endpoint registry (the same source as https://nakordoni.eu/api/v1/docs.md). Path-versioned per endpoint: /api/v1/… is stable; /api/v2/… and newer serve the newer behaviour only for the endpoints listed. Free key: https://nakordoni.eu/en/developers/signup",
        "termsOfService": "https://nakordoni.eu/en/p/developer_api_terms",
        "contact": {
            "name": "Nakordoni Developer Portal",
            "url": "https://nakordoni.eu/en/developers"
        },
        "license": {
            "name": "Nakordoni Developer API Terms",
            "url": "https://nakordoni.eu/en/p/developer_api_terms"
        }
    },
    "externalDocs": {
        "description": "API documentation",
        "url": "https://nakordoni.eu/en/developers/docs/air-alerts"
    },
    "servers": [
        {
            "url": "https://nakordoni.eu",
            "description": "Production"
        }
    ],
    "security": [
        {
            "bearerAuth": []
        },
        {
            "apiKeyHeader": []
        },
        {
            "apiKeyQuery": []
        }
    ],
    "tags": [
        {
            "name": "air-alerts",
            "description": "Air Alert Proximity API",
            "externalDocs": {
                "url": "https://nakordoni.eu/en/developers/docs/air-alerts"
            }
        }
    ],
    "paths": {
        "/api/v2/data/air-alerts": {
            "get": {
                "tags": [
                    "air-alerts"
                ],
                "summary": "Air Alert Proximity API",
                "description": "Air-raid alerts and airborne objects near ONE border crossing. Anchor on a checkpoint (ppid), a coordinate pair or a city and get back only what is inside your radius (default 100 km): which regions are under alert, how far each is, and how close any tracked object currently is on a 1-5 proximity band. Regions are returned as ISO 3166-2 region_code, the same classifier the regional fuel data uses. DELIBERATELY NOT REAL-TIME: every response is a snapshot 1-3 minutes old with the lag re-randomised per request and stated in as_of/lag_min, and object coordinates are never returned - only distance, bearing and speed relative to your anchor. Source data is crowd/OSINT-derived and partly hand-moderated: a signal, never ground truth, and never a substitute for official air-raid warnings.\n\nExample: `/api/v2/data/air-alerts?ppid=id_94&radius_km=100`\n\nHuman docs: https://nakordoni.eu/en/developers/docs/air-alerts",
                "operationId": "airAlertsV2",
                "parameters": [
                    {
                        "name": "ppid",
                        "in": "query",
                        "required": false,
                        "description": "Checkpoint ID to anchor on, e.g. id_94 — use the Checkpoints Directory API to discover it. Alternative to lat/lon.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "lat",
                        "in": "query",
                        "required": false,
                        "description": "Latitude of the anchor point (alternative to ppid)",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "lon",
                        "in": "query",
                        "required": false,
                        "description": "Longitude of the anchor point (alternative to ppid)",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "city",
                        "in": "query",
                        "required": false,
                        "description": "City name — alternative to lat/lon, resolved to coordinates",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "country",
                        "in": "query",
                        "required": false,
                        "description": "ISO-2 country code, disambiguates city",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "radius_km",
                        "in": "query",
                        "required": false,
                        "description": "Search radius in km around the anchor (default 100, min 10, max 300). The 1-5 proximity band is scaled to this radius: 5 = nearest fifth, 1 = outermost fifth.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "lang",
                        "in": "query",
                        "required": false,
                        "description": "Language code (default en)",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response (shared envelope; `data` as documented).",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/ApiEnvelope"
                                        },
                                        {
                                            "type": "object",
                                            "properties": {
                                                "data": {
                                                    "type": "object",
                                                    "properties": {
                                                        "anchor": {
                                                            "description": "What the radius was measured from: ppid, lat, lng, radius_km."
                                                        },
                                                        "as_of": {
                                                            "description": "Snapshot time — DELIBERATELY not real-time. lag_min states the delay, re-randomised per request, and lag_note explains it."
                                                        },
                                                        "alerts": {
                                                            "type": "object",
                                                            "properties": {
                                                                "count": {
                                                                    "description": "Regions under alert inside the radius, with region_codes (ISO 3166-2) and items — each with its distance from the anchor."
                                                                },
                                                                "unresolved": {
                                                                    "description": "Alerts that could not be placed on a region, with merged — how many overlapping ones were combined."
                                                                }
                                                            }
                                                        },
                                                        "targets": {
                                                            "type": "object",
                                                            "properties": {
                                                                "count": {
                                                                    "description": "Tracked objects inside the radius, with items — distance, bearing, speed and a 1-5 proximity band ONLY. Coordinates are never returned."
                                                                },
                                                                "by_type": {
                                                                    "description": "Counts per object type, with tracked_total across the whole feed."
                                                                }
                                                            }
                                                        },
                                                        "attribution": {
                                                            "description": "Source labels you must display, with a note per source."
                                                        },
                                                        "labels": {
                                                            "description": "Localised UI strings, including the disclaimer — crowd/OSINT data, never a substitute for official air-raid warnings."
                                                        }
                                                    }
                                                }
                                            }
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "400": {
                        "$ref": "#/components/responses/E400"
                    },
                    "401": {
                        "$ref": "#/components/responses/E401"
                    },
                    "403": {
                        "$ref": "#/components/responses/E403"
                    },
                    "404": {
                        "$ref": "#/components/responses/E404"
                    },
                    "410": {
                        "$ref": "#/components/responses/E410"
                    },
                    "429": {
                        "$ref": "#/components/responses/E429"
                    },
                    "500": {
                        "$ref": "#/components/responses/E500"
                    },
                    "503": {
                        "$ref": "#/components/responses/E503"
                    },
                    "504": {
                        "$ref": "#/components/responses/E504"
                    }
                }
            }
        }
    },
    "components": {
        "securitySchemes": {
            "bearerAuth": {
                "type": "http",
                "scheme": "bearer",
                "bearerFormat": "NKD-DEV-XXXX-XXXX-XXXX",
                "description": "API key from https://nakordoni.eu/en/developers, sent as `Authorization: Bearer NKD-DEV-…` (preferred)."
            },
            "apiKeyHeader": {
                "type": "apiKey",
                "in": "header",
                "name": "X-API-Key",
                "description": "Same API key in the X-API-Key header."
            },
            "apiKeyQuery": {
                "type": "apiKey",
                "in": "query",
                "name": "key",
                "description": "Same API key as ?key= (fallback; keys in URLs end up in logs)."
            }
        },
        "schemas": {
            "ApiEnvelope": {
                "type": "object",
                "required": [
                    "ok"
                ],
                "properties": {
                    "ok": {
                        "type": "boolean",
                        "const": true
                    },
                    "api_version": {
                        "type": "string",
                        "description": "Version that served the call, e.g. \"1\", \"v2\"."
                    },
                    "product": {
                        "type": "string"
                    },
                    "attribution": {
                        "type": "string",
                        "description": "Show this attribution with the data."
                    },
                    "data": {
                        "description": "Product payload — shape per product, see the operation."
                    },
                    "snapshot": {
                        "type": "object"
                    },
                    "usage": {
                        "type": "object",
                        "properties": {
                            "requests_today": {
                                "type": "integer"
                            },
                            "limit_today": {
                                "type": "integer"
                            },
                            "remaining": {
                                "type": "integer"
                            }
                        }
                    }
                }
            },
            "ApiError": {
                "type": "object",
                "required": [
                    "ok",
                    "error"
                ],
                "properties": {
                    "ok": {
                        "type": "boolean",
                        "const": false
                    },
                    "api_version": {
                        "type": "string"
                    },
                    "error": {
                        "type": "object",
                        "required": [
                            "code",
                            "message"
                        ],
                        "properties": {
                            "code": {
                                "type": "string",
                                "examples": [
                                    "bad_request",
                                    "missing_api_key",
                                    "invalid_api_key",
                                    "product_unavailable",
                                    "unknown_product",
                                    "version_sunset",
                                    "qps_exceeded",
                                    "quota_exceeded",
                                    "internal_error",
                                    "busy",
                                    "timeout"
                                ]
                            },
                            "message": {
                                "type": "string"
                            },
                            "docs": {
                                "type": "string",
                                "format": "uri"
                            },
                            "developer_portal": {
                                "type": "string",
                                "format": "uri"
                            }
                        },
                        "additionalProperties": true
                    }
                }
            }
        },
        "responses": {
            "E400": {
                "description": "Bad request (bad_request, invalid_country, unsupported_version, geocode_failed, scope_required, …).",
                "content": {
                    "application/json": {
                        "schema": {
                            "$ref": "#/components/schemas/ApiError"
                        }
                    }
                }
            },
            "E401": {
                "description": "Missing API key (missing_api_key).",
                "content": {
                    "application/json": {
                        "schema": {
                            "$ref": "#/components/schemas/ApiError"
                        }
                    }
                }
            },
            "E403": {
                "description": "Key invalid, blocked or not allowed for this product (invalid_api_key, product_unavailable, not_approved, …).",
                "content": {
                    "application/json": {
                        "schema": {
                            "$ref": "#/components/schemas/ApiError"
                        }
                    }
                }
            },
            "E404": {
                "description": "Unknown product (unknown_product).",
                "content": {
                    "application/json": {
                        "schema": {
                            "$ref": "#/components/schemas/ApiError"
                        }
                    }
                }
            },
            "E410": {
                "description": "Version retired (version_sunset, version_closed_to_new_accounts).",
                "content": {
                    "application/json": {
                        "schema": {
                            "$ref": "#/components/schemas/ApiError"
                        }
                    }
                }
            },
            "E429": {
                "description": "Rate or quota limit (qps_exceeded, quota_exceeded, duplicate_request, ip_temporarily_blocked). See Retry-After.",
                "content": {
                    "application/json": {
                        "schema": {
                            "$ref": "#/components/schemas/ApiError"
                        }
                    }
                }
            },
            "E500": {
                "description": "Internal error (internal_error).",
                "content": {
                    "application/json": {
                        "schema": {
                            "$ref": "#/components/schemas/ApiError"
                        }
                    }
                }
            },
            "E503": {
                "description": "Temporarily unavailable (busy).",
                "content": {
                    "application/json": {
                        "schema": {
                            "$ref": "#/components/schemas/ApiError"
                        }
                    }
                }
            },
            "E504": {
                "description": "Upstream timeout (timeout).",
                "content": {
                    "application/json": {
                        "schema": {
                            "$ref": "#/components/schemas/ApiError"
                        }
                    }
                }
            }
        }
    }
}
