API Class to get data about rockets flying from Gaza strip to Israel. the API use's the official public API provided by "Pikud ha-oref" in Israel.
On August 5th 2022 the Islamic Jihad opened an attack on Israel sending hundreds of rockets per day targeting Israeli civilians. The API was updated to suport the latest locations, cities and districts.
Google API currently disabled because it requires API key, if you still need the API apply your own Google key to make it work.
- Get red-alerts in real-time from "Pikud ha-oref" public API
- Fetch location data from alerts codes (coordinates, city names, time to run for shelters)
- Generate random coordinates within a city for visualization of a flying rocket
- Count number of alerts currently there is
Example response from the API:
{
"id": "133042653750000000",
"cat": "1",
"title": "ืืจื ืจืงืืืช ืืืืืื",
"data": [
"ืืืืื ื ืืจ ืขื",
"ืืืื, ืืืืืช ืกืคืืจ",
"ืฉืืจืืช, ืืืืื, ื ืืจ ืขื"
],
"desc": "ืืืื ืกื ืืืจืื ืืืืื ืืฉืื ืื 10 ืืงืืช",
"timestamp": 1659791786.927377,
"cities_labels": [
{
"label": "ืืืืื ื ืืจ ืขื",
"value": "20C0B212CB4A85AB765743BB2A748106",
"areaid": 26,
"areaname": "ืขืืืฃ ืขืื",
"label_he": "ืืืืื ื ืืจ ืขื",
"migun_time": 15,
"city_data": {
"label": "ืืืืื ื ืืจ ืขื I ืืืืจ ืขืืืฃ ืขืื",
"rashut": "",
"value": "0",
"areaid": 26,
"mixname": "ืืืืื ื ืืจ ืขื I ืืืืจ ืขืืืฃ ืขืื | ืขืืืฃ ืขืื",
"color": "O"
}
},
{
"label": "ืืืื, ืืืืืช ืกืคืืจ",
"value": "89679BD023B4DE666AD79E1470E20D83",
"areaid": 26,
"areaname": "ืขืืืฃ ืขืื",
"label_he": "ืืืื, ืืืืืช ืกืคืืจ",
"migun_time": 15,
"city_data": {
"label": "ืืืื, ืืืืืช ืกืคืืจ I ืืืืจ ืขืืืฃ ืขืื",
"rashut": "ืืืขืฆื ืืืืจืืช: ืฉืขืจ ืื ืื",
"value": "0",
"areaid": 26,
"mixname": "ืืืื, ืืืืืช ืกืคืืจ I ืืืืจ ืขืืืฃ ืขืื | ืขืืืฃ ืขืื",
"color": "O"
}
},
{
"label": "ืฉืืจืืช, ืืืืื, ื ืืจ ืขื",
"value": "C5FD35F7510C4E1D535EDD8DE05A7961",
"areaid": 26,
"areaname": "ืขืืืฃ ืขืื",
"label_he": "ืฉืืจืืช, ืืืืื, ื ืืจ ืขื",
"migun_time": 15,
"city_data": {
"label": "ื ืืจ ืขื I ืืืืจ ืขืืืฃ ืขืื",
"rashut": "ืืืขืฆื ืืืืจืืช: ืฉืขืจ ืื ืื",
"value": "0",
"areaid": 26,
"mixname": "ื ืืจ ืขื I ืืืืจ ืขืืืฃ ืขืื | ืขืืืฃ ืขืื",
"color": "O"
}
},
{
"label": "ืฉืืจืืช, ืืืืื, ื ืืจ ืขื",
"value": "3202695F8E2D49A4FCA18B95A88C0CA4",
"areaid": 26,
"areaname": "ืขืืืฃ ืขืื",
"label_he": "ืฉืืจืืช, ืืืืื, ื ืืจ ืขื",
"migun_time": 15,
"city_data": {
"label": "ืฉืืจืืช I ืืืืจ ืขืืืฃ ืขืื",
"rashut": "",
"value": "0",
"areaid": 26,
"mixname": "ืฉืืจืืช I ืืืืจ ืขืืืฃ ืขืื | ืขืืืฃ ืขืื",
"color": "O"
}
},
{
"label": "ืฉืืจืืช, ืืืืื, ื ืืจ ืขื",
"value": "F53EA9083272E342ADE0146DA1C25E59",
"areaid": 26,
"areaname": "ืขืืืฃ ืขืื",
"label_he": "ืฉืืจืืช, ืืืืื, ื ืืจ ืขื",
"migun_time": 15,
"city_data": {
"label": "ืืืืื I ืืืืจ ืขืืืฃ ืขืื",
"rashut": "ืืืขืฆื ืืืืจืืช: ืฉืขืจ ืื ืื",
"value": "0",
"areaid": 26,
"mixname": "ืืืืื I ืืืืจ ืขืืืฃ ืขืื | ืขืืืฃ ืขืื",
"color": "O"
}
}
],
"time_to_run": 15
}- The Class I made is helpful for developers and makers as one Who are willing to develop platforms / apps based on Israeli "Pikud ha-oref" system. The class provides the necessary functions and tools to get the latest information About the Israeli missiles status and when Israel is under attack.
- No. All the information in the Class is public and available, All I did is to organize it at one place for easy access. I also scraped and organized the cities names with their area codes for easy reading.
- Absolutely. The code and everything inside the repository is open-sourced. The Code is under MIT license - please make sure to understand the meaning. The Code provided AS IS WITHOUT ANY WARRANTY.
- Use the milliseconds calculated from how much time left for people to run to shelters, Then visualize using that seconds of long the rocket has to fly till it will hit the city.
- No, at least not for the developers. the military may have such capabilities. The prediction is not possible due to many parameters such as: Where the rocket came from, How much fuel is inside the rocket, at what speed is the rocket flying, Directions of the rocket and weather conditions - something which make it impossible for any non-military individual, even with technology such as machine learning and prediction algorithms.
- Python requests library
$ pip3 install requests