This GraphQL API provides access to alerts data related to Pikud HaOref red alerts history.
You can interact with this API by sending GraphQL queries to the provided endpoint.
Live Query URL: https://pikud-haoref-graphql-api.tuval-simha.workers.dev/graphql
This API is powered by Cloudflare Workers for global edge deployment with low latency.
query AlertsToday {
alerts(filter: { timeRange: TODAY }, first: 10) {
edges {
node {
category
date
location
title
}
cursor
}
pageInfo {
hasNextPage
endCursor
}
totalCount
}
}query AlertsLastWeek {
alerts(filter: { timeRange: LAST_WEEK, orderBy: CREATED_AT_DESC }, first: 10) {
edges {
node {
category
date
location
title
}
cursor
}
pageInfo {
hasNextPage
endCursor
}
totalCount
}
}query AlertsLastMonth {
alerts(filter: { timeRange: LAST_MONTH }, first: 10) {
edges {
node {
category
date
location
title
}
cursor
}
pageInfo {
hasNextPage
endCursor
}
totalCount
}
}Date format: DD/MM/YYYY
query AlertsByDateRange {
alerts(filter: { dateRange: { from: "01/01/2024", to: "31/01/2024" } }, first: 10) {
edges {
node {
category
date
location
title
}
cursor
}
pageInfo {
hasNextPage
endCursor
}
totalCount
}
}query MissileAlertsInTelAviv {
alerts(
filter: {
timeRange: LAST_WEEK,
category: MISSILES,
location: "תל אביב"
},
first: 10
) {
edges {
node {
category
date
location
title
}
}
totalCount
}
}Pagination is supported using cursor-based pagination:
first- Number of items to return per pageafter- Cursor to start paginating from (useendCursorfrom previous response)totalCount- Returns the total number of alerts matching your filter (before pagination)
Use the timeRange filter for predefined ranges:
TODAY- Alerts from today onlyLAST_WEEK- Alerts from the last 7 daysLAST_MONTH- Alerts from the last 30 days
Or use dateRange with custom dates in DD/MM/YYYY format.
Filter by alert category using the category filter:
MISSILES- Missile and rocket alertsUAV_INTRUSION- Drone intrusionEARTHQUAKE- Earthquake warningRADIOLOGICAL_EVENT- Radiological eventTSUNAMI- Tsunami warningHAZARDOUS_MATERIALS- Hazardous materials incidentTERRORIST_INFILTRATION- Terrorist infiltration alert
Drill categories:
DRILL_MISSILESDRILL_GENERALDRILL_EARTHQUAKEDRILL_RADIOLOGICAL_EVENTDRILL_TSUNAMIDRILL_UAV_INTRUSIONDRILL_HAZARDOUS_MATERIALSDRILL_TERRORIST_INFILTRATION
Filter by location name using the location filter. Supports partial match and is case-insensitive.
Example: location: "תל אביב" or location: "חיפה"
Use orderBy to sort results:
CREATED_AT_DESC- Newest first (default)CREATED_AT_ASC- Oldest first
The following queries are still supported for backwards compatibility but are deprecated. Use the unified alerts query instead.
query AllAlertsFromToday {
allAlertsFromToday(orderBy: CREATED_AT_DESC, typeBy: MISSILES, first: 10) {
edges {
node {
category
date
location
title
}
}
}
}query AllAlertsFromLastWeek {
allAlertsFromLastWeek(orderBy: CREATED_AT_DESC, typeBy: MISSILES, first: 10) {
edges {
node {
category
date
location
title
}
}
}
}query AllAlertsFromLastMonth {
allAlertsFromLastMonth(orderBy: CREATED_AT_DESC, first: 10) {
edges {
node {
category
date
location
title
}
}
}
}Date format: DD.MM.YYYY
query AllAlertsByDateRange {
allAlertsByDateRange(
dates: { fromDateTime: "01.01.2024", toDateTime: "31.01.2024" },
first: 10
) {
edges {
node {
category
date
location
title
}
}
}
}This repository is open-source, and contributions are welcome! If you'd like to contribute, please fork the repository, make your changes, and submit a pull request. Appreciate your help in improving this project!
If you find this project helpful and would like to support its development, consider buying me a coffee:

