Pikud Haoref Api
A Node.js wrapper library for Pikud Haoref's unofficial rocket alert API.
About This Project
The pikud-haoref-api project is a Node.js wrapper around Pikud Haoref's unofficial alerts API, which reports currently active alerts in Israel. The library exposes a getActiveAlert function that returns an alert object containing a type, a list of affected cities, and, for missile alerts, recommended safety instructions. Alert types include missiles, earthquakes, tsunamis, hostile aircraft intrusions, hazardous materials incidents, terrorist infiltrations, and corresponding drill categories, with a none type returned when no alert is active. The package is distributed through npm and is written for Node.js v4.2.x and later, using ES6 features such as for-of loops.
The README documents a polling pattern in which the function is called at a configurable interval using setTimeout, with an optional proxy setting for requests made from outside Israel, since the API is only accessible from within the country. The project also credits contributors for a Spanish translation and for map polygon data supplied by the developers of the Tzofar application. It is licensed under Apache 2.0.
The library may be useful to developers building notification bots, dashboards, home automation integrations, or monitoring tools that need programmatic access to real-time alert data in Israel. Because the underlying API is unofficial and undocumented, applications built on it may be affected by upstream changes.