---
title: "Find exact-hit-anchored major-aspect orb windows"
method: POST
path: "/api/astro/aspect-windows"
tags: ["Calculations"]
---

# Find exact-hit-anchored major-aspect orb windows

`POST /api/astro/aspect-windows`

## Request

- Base URL: `https://api.cosmicephemeris.com`
- URL: `https://api.cosmicephemeris.com/api/astro/aspect-windows`
- Auth: one of:
  - HTTP bearer
  - API key in header `x-api-key`

Returns bounded contiguous orb intervals only when the interval contains at least one exact major-aspect crossing. Tangential orb contacts without an exact crossing are excluded. Entry or exit is null when the true boundary lies outside the requested start-inclusive/end-exclusive interval, with the corresponding clipped flag set. Repeated exact hits caused by retrograde motion are numbered per body pair and aspect. Optional include_ical returns a bounded deterministic RFC 5545 calendar string in the JSON response; it does not create, publish or subscribe to an external calendar. UTC dates 1800-2200, whole-second intervals at most 31 days, ten bodies, five major aspects and 0.5-10.0 degree orbs in 0.1-degree increments. One-second timestamps and a 0.05-second numerical root tolerance are not physical accuracy guarantees. Each admitted request reserves one standard monthly quota unit before route validation or engine work, including failures and timeouts; failed or timed-out admitted attempts are not refunded. All plans; do not automatically retry. Source availability does not establish deployment.
Historical mode uses an explicit BCE/CE date object and UT1 conventions. Its response is the versioned historical envelope, not the modern UTC envelope. Read result for calculation fields and metadata for limits and uncertainty.

## Request body

- union
  - AspectWindowsRequest: Whole-second UTC, start-inclusive/end-exclusive interval greater than zero and at most 31 elapsed days. Returns only contiguous orb intervals containing at least one exact crossing; tangential orb-only contacts are excluded. Arrays use exact, unique enum values.
    - `start_utc` string, date-time, required
    - `end_utc` string, date-time, required
    - `bodies` PlanetaryEventBody[], required
    - `aspects` PlanetaryEventAspect[]
    - `orb_degrees` number
    - `zodiac` string, nullable: tropical or sidereal; server trims whitespace and ignores case. Omitted/null selects tropical.
    - `ayanamsa` string, nullable: Sidereal supports lahiri, raman, krishnamurti, fagan_bradley, yukteshwar, sassanian, true_chitra, true_revati, true_pushya, galactic_center_0_sagittarius, galactic_alignment_mardyks, with case/whitespace normalization; other names return 400 in sidereal mode. Omitted/null selects lahiri. Tropical mode ignores a nonempty string and outputs null. This schema describes that compatibility behavior rather than claiming every string is a supported sidereal model.
    - `include_ical` boolean
  - HistoricalAspectWindowsRequest: Explicit historical mode, 1000 BCE (BC)–2500 CE (AD). No year zero, implicit calendar, UTC or IANA zone. Preserve tool-specific mathematical, geographic and search limits; calendar/time conventions and estimated Delta-T are not certified historical accuracy.
    - `bodies` PlanetaryEventBody[], required
    - `aspects` PlanetaryEventAspect[]
    - `orb_degrees` number
    - `zodiac` string, nullable: tropical or sidereal; server trims whitespace and ignores case. Omitted/null selects tropical.
    - `ayanamsa` string, nullable: Sidereal supports lahiri, raman, krishnamurti, fagan_bradley, yukteshwar, sassanian, true_chitra, true_revati, true_pushya, galactic_center_0_sagittarius, galactic_alignment_mardyks, with case/whitespace normalization; other names return 400 in sidereal mode. Omitted/null selects lahiri. Tropical mode ignores a nonempty string and outputs null. This schema describes that compatibility behavior rather than claiming every string is a supported sidereal model.
    - `include_ical` unknown
    - `start` HistoricalDateTime, required: Shared historical input contract; parsing alone does not enable a calculation route. Derived calculation records can include fractional seconds and are not this input type.
      - `date` HistoricalDate, required: Explicit civil date, 1000 BCE (BC)–2500 CE (AD); no year zero. Calendar validity is checked by the server. Available only on documented connected historical operations, with explicit UT1/fixed-offset conventions.
        - `year` integer, required
        - `era` 'BCE' | 'CE', required: Display BCE (BC) / CE (AD); API values remain BCE / CE. No year zero.
        - `month` integer, required
        - `day` integer, required
        - `calendar` 'proleptic_gregorian' | 'proleptic_julian', required: Explicit choice; applies the selected calendar rules throughout history without a regional adoption switch.
      - `time` string, required: Explicit HH:MM[:SS]; whole seconds only, no leap seconds. Normalized helper output includes seconds.
      - `timezone` string, required: Explicit UT1 or fixed offset UT1+/-HH:MM[:SS], within 14 hours. Local clock minus offset yields UT1, not UTC. No IANA timezone inference. Original offset spelling is preserved.
    - `end` HistoricalDateTime, required: Shared historical input contract; parsing alone does not enable a calculation route. Derived calculation records can include fractional seconds and are not this input type.
      - `date` HistoricalDate, required: Explicit civil date, 1000 BCE (BC)–2500 CE (AD); no year zero. Calendar validity is checked by the server. Available only on documented connected historical operations, with explicit UT1/fixed-offset conventions.
        - `year` integer, required
        - `era` 'BCE' | 'CE', required: Display BCE (BC) / CE (AD); API values remain BCE / CE. No year zero.
        - `month` integer, required
        - `day` integer, required
        - `calendar` 'proleptic_gregorian' | 'proleptic_julian', required: Explicit choice; applies the selected calendar rules throughout history without a regional adoption switch.
      - `time` string, required: Explicit HH:MM[:SS]; whole seconds only, no leap seconds. Normalized helper output includes seconds.
      - `timezone` string, required: Explicit UT1 or fixed offset UT1+/-HH:MM[:SS], within 14 hours. Local clock minus offset yields UT1, not UTC. No IANA timezone inference. Original offset spelling is preserved.

## Response `200`

Bounded aspect-window result.

- union
  - AspectWindowsResponse
    - `type` 'aspect_windows', required
    - `status` 'current', required
    - `result` AspectWindowsResult, required
      - `start_utc` string, date-time, required: Normalized UTC timestamp; fractional seconds may be present.
      - `end_utc` string, date-time, required: Normalized UTC timestamp; fractional seconds may be present.
      - `windows` AspectWindow[], required
        - `body1` 'sun' | 'moon' | 'mercury' | 'venus' | 'mars' | 'jupiter' | 'saturn' | 'uranus' | 'neptune' | 'pluto', required
        - `body2` 'sun' | 'moon' | 'mercury' | 'venus' | 'mars' | 'jupiter' | 'saturn' | 'uranus' | 'neptune' | 'pluto', required
        - `aspect` 'conjunction' | 'sextile' | 'square' | 'trine' | 'opposition', required
        - `angle_degrees` 0 | 60 | 90 | 120 | 180, required
        - `orb_degrees` number, required
        - `window_start_utc` string, date-time, required: Normalized UTC timestamp; fractional seconds may be present.
        - `window_end_utc` string, date-time, required: Normalized UTC timestamp; fractional seconds may be present.
        - `entry_utc` string, date-time, required: Normalized UTC timestamp; fractional seconds may be present.
        - `exit_utc` string, date-time, required: Normalized UTC timestamp; fractional seconds may be present.
        - `clipped_start` boolean, required
        - `clipped_end` boolean, required
        - `exact_hits` AspectWindowExactHit[], required
          - `utc` string, date-time, required: Normalized UTC timestamp; fractional seconds may be present.
          - `relative_motion` 'increasing' | 'decreasing', required
          - `phase_before` 'applying', required
          - `phase_after` 'separating', required
          - `body1_longitude_degrees` number, required
          - `body2_longitude_degrees` number, required
          - `repeat_index` integer, required
          - `repeat_total` integer, required
      - `window_count` integer, required
      - `exact_hit_count` integer, required
      - `model` 'de440-apparent-geocentric-aspect-windows-v1', required
      - `interval` 'start_inclusive_end_exclusive', required
      - `timestamp_resolution_seconds` 1, required
      - `ical` string, nullable
    - `metadata` AspectWindowsMetadata, required
      - `ephemeris` 'JPL-DE440', required
      - `frame` 'apparent_geocentric_ecliptic_of_date', required
      - `zodiac` 'tropical' | 'sidereal', required
      - `ayanamsa` 'lahiri' | 'raman' | 'krishnamurti' | 'fagan_bradley' | 'yukteshwar' | 'sassanian' | 'true_chitra' | 'true_revati' | 'true_pushya' | 'galactic_center_0_sagittarius' | 'galactic_alignment_mardyks', nullable, required
      - `orb_degrees` number, required
      - `window_policy` 'exact_hit_anchored_contiguous_orb_intervals', required
      - `tangential_contacts` false, required
      - `aspect_policy` 'five_major_longitude_aspects', required
      - `timescale_data` 'bundled-skyfield', required
      - `search_step_hours` 6, required
      - `boundary_step_hours` 3, required
      - `root_tolerance_seconds` 0.05, required
      - `interpretations` false, required
  - HistoricalAspectWindowsResponse
    - `schema` 'cosmicephemeris-historical-calculation-v1', required
    - `status` 'historical', required
    - `type` 'aspect-windows', required
    - `input` HistoricalAspectWindowsRequest, required: Explicit historical mode, 1000 BCE (BC)–2500 CE (AD). No year zero, implicit calendar, UTC or IANA zone. Preserve tool-specific mathematical, geographic and search limits; calendar/time conventions and estimated Delta-T are not certified historical accuracy.
      - `bodies` PlanetaryEventBody[], required
      - `aspects` PlanetaryEventAspect[]
      - `orb_degrees` number
      - `zodiac` string, nullable: tropical or sidereal; server trims whitespace and ignores case. Omitted/null selects tropical.
      - `ayanamsa` string, nullable: Sidereal supports lahiri, raman, krishnamurti, fagan_bradley, yukteshwar, sassanian, true_chitra, true_revati, true_pushya, galactic_center_0_sagittarius, galactic_alignment_mardyks, with case/whitespace normalization; other names return 400 in sidereal mode. Omitted/null selects lahiri. Tropical mode ignores a nonempty string and outputs null. This schema describes that compatibility behavior rather than claiming every string is a supported sidereal model.
      - `include_ical` unknown
      - `start` HistoricalDateTime, required: Shared historical input contract; parsing alone does not enable a calculation route. Derived calculation records can include fractional seconds and are not this input type.
        - `date` HistoricalDate, required: Explicit civil date, 1000 BCE (BC)–2500 CE (AD); no year zero. Calendar validity is checked by the server. Available only on documented connected historical operations, with explicit UT1/fixed-offset conventions.
          - `year` integer, required
          - `era` 'BCE' | 'CE', required: Display BCE (BC) / CE (AD); API values remain BCE / CE. No year zero.
          - `month` integer, required
          - `day` integer, required
          - `calendar` 'proleptic_gregorian' | 'proleptic_julian', required: Explicit choice; applies the selected calendar rules throughout history without a regional adoption switch.
        - `time` string, required: Explicit HH:MM[:SS]; whole seconds only, no leap seconds. Normalized helper output includes seconds.
        - `timezone` string, required: Explicit UT1 or fixed offset UT1+/-HH:MM[:SS], within 14 hours. Local clock minus offset yields UT1, not UTC. No IANA timezone inference. Original offset spelling is preserved.
      - `end` HistoricalDateTime, required: Shared historical input contract; parsing alone does not enable a calculation route. Derived calculation records can include fractional seconds and are not this input type.
        - `date` HistoricalDate, required: Explicit civil date, 1000 BCE (BC)–2500 CE (AD); no year zero. Calendar validity is checked by the server. Available only on documented connected historical operations, with explicit UT1/fixed-offset conventions.
          - `year` integer, required
          - `era` 'BCE' | 'CE', required: Display BCE (BC) / CE (AD); API values remain BCE / CE. No year zero.
          - `month` integer, required
          - `day` integer, required
          - `calendar` 'proleptic_gregorian' | 'proleptic_julian', required: Explicit choice; applies the selected calendar rules throughout history without a regional adoption switch.
        - `time` string, required: Explicit HH:MM[:SS]; whole seconds only, no leap seconds. Normalized helper output includes seconds.
        - `timezone` string, required: Explicit UT1 or fixed offset UT1+/-HH:MM[:SS], within 14 hours. Local clock minus offset yields UT1, not UTC. No IANA timezone inference. Original offset spelling is preserved.
    - `result` object, required: Complete historical calculation adapter result. Times are explicit UT1 date records, never UTC strings; derived times may include fractional seconds and years outside the input range.
    - `metadata` object, required
      - `time_standard` 'UT1', required
      - `historical_accuracy_certified` unknown, required
      - `warnings` string[], required

## Other responses

- `400`: Invalid request, malformed JSON, out-of-range date/location, unknown model, invalid timezone or ambiguous/nonexistent clock-change time. Invalid attempts reaching quota reservation consume one unit.
- `401`: Missing, invalid, revoked API key or unavailable activated key owner. Dashboard cookies do not authenticate calculation routes.
- `403`: Origin not allowed by production CORS policy. Server-to-server requests can omit Origin.
- `404`: Wrong/case-variant/noncanonical or trailing-slash route; public paths have no version prefix.
- `413`: Request exceeds the body limit; gateway JSON is capped at 128 KiB. Edge failures may be HTML.
- `429`: Monthly quota exhausted, per-user two-request concurrency reached, or nginx rate/connection admission refused. Retry-After: 2 is sent for application per-user concurrency only, not a promise that monthly quota resets in two seconds.
- `500`: Bounded gateway/database/internal failure. An admitted attempt can still consume quota.
- `502`: Engine unavailable, unsuccessful internal server response or invalid upstream JSON. No engine internals are exposed.
- `503`: Four-request global calculation pool full (Retry-After: 2), maintenance or upstream service unavailable.
- `504`: Application engine timeout: 15 seconds normally; planetary events, house ingresses, aspect windows, event calendar, eclipse geometry, electional search, and event-rule search use 30 seconds; Nakshatra Timeline plus the explicitly enumerated readiness, robustness, location, uncertainty, and electional-audit family use 60 seconds. Timer includes response-body parsing; an admitted timeout consumes quota.

---

[API](https://skmtc.dev/cosmicephemeris/apis/cosmic-ephemeris-calculation-api.md) · [All operations](https://skmtc.dev/cosmicephemeris/apis/cosmic-ephemeris-calculation-api/llms.txt) · [OpenAPI document](https://skmtc.dev/cosmicephemeris/apis/cosmic-ephemeris-calculation-api/revisions/f041e924cea3?raw)
