> For the complete documentation index, see [llms.txt](https://skymerse.gitbook.io/notamify-api/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://skymerse.gitbook.io/notamify-api/basics/notam-time-filtering.md).

# Notam Time Filtering

### Active NOTAM Endpoint Behavior

The active NOTAM endpoint (`/api/v2/notams`) is designed to always return currently active NOTAMs. This endpoint applies the time-based filtering described below to ensure that only relevant NOTAMs are returned. The system checks if:

* The NOTAM overlaps with the query period
* The NOTAM starts during the query period
* The NOTAM spans the entire query period
* The NOTAM is contained within the query period

Additionally, the endpoint includes special handling for:

* NOTAMs with estimated end times that start before the query period ends
* Permanent NOTAMs that start before the query period ends

This ensures complete coverage of all potentially relevant NOTAMs.

### Schedules and Post-Filtering

An important distinction in Notamify's filtering approach is that the "Schedule" information (found in section D of NOTAMs) is **not** used in the main time-based filtering logic described above.

#### How Schedules Are Handled

1. **Main Filtering**: The initial filtering is based solely on the NOTAM's overall validity period (`starts_at` / `ends_at`)
2. **Post-Filtering (client side)**: Schedule information can be optionally used for secondary filtering after the main time-based filtering has been applied. The `schedules` filed contain [RRULE](https://icalendar.org/iCalendar-RFC-5545/3-8-5-3-recurrence-rule.html) standardised definition, which together with `duration_hrs` can be used for creating the applicability ranges. Read more in [Notamify NOTAM Schedules & RRULE Parsing](/notamify-api/basics/notam-time-filtering/notamify-notam-schedules-and-rrule-parsing.md)

#### Implementation Considerations

When implementing client-side applications that consume Notamify data, developers should be aware that the active NOTAM endpoint returns NOTAMs based on their overall validity period. If schedule-specific filtering is required (e.g., to check if a NOTAM is active during specific hours of operation), this should be implemented as a secondary filtering step.
