We report the deposition and characterization of 𝐴𝑙𝑥𝑁𝑦 thin films to use them as pyroelectric detector. 𝐴𝑙𝑥𝑁𝑦 thin films were deposited using a direct current (DC) magnetron sputtering from an Al target with varying concentrations of Ar:N2 at constant pressure and substrate temperature. The film thickness' were varied between 100-200 nm with varying atomic composition based on Ar:N2 during deposition. The nitrogen content in the films varied from 39.0% to 44.7% as found by energy dispersive spectroscopy (EDS). Each of the thin films was annealed at a different temperature between 400 to 800 °C with 100 °C increment in N2 environment and X-ray diffraction (XRD) was performed to analyze the annealed films crystallinity. From the XRD data and by using Scherrer equation, we found that for samples annealed at 600 °C for fifteen minutes has the grain size of 12.28 nm. Optical properties of the films were measured with varying wavelengths which include transmission, reflection, absorption, refraction coefficient, extinction coefficient and the optical bandgap. We also determined the electrical properties of thin films’ which include the pyroelectric coefficient, pyroelectric current, dielectric constant, and film permittivity between the temperature range 270 K to 310 K. As the temperature is increased, the pyroelectric coefficient also increased almost linearly. The pyroelectric coefficient of annealed 𝐴𝑙𝑥𝑁𝑦 films found to be varied between 4.86 × 10-5 C/m2K to 1.32 × 10-4 C/m2K. The optical transmittance through the as grown non-annealed thin films was found to be varied between 35 to 78%, while the reflectance was found to be below 25%. Because of low absorption in the thin films the extinction coefficient was found to be near zero. The refractive index was varied between 1.7 and 2.2 for the 𝐴𝑙𝑥𝑁𝑦 thin films. The optical bandgap was found to be 1.40 eV for non-annealed 𝐴𝑙𝑥𝑁𝑦 thin film which was deposited on cover glass. The dielectric constant was varied between 30-1200000 depending on the annealing temperature of the film, while the film permittivity ranges between 0-1.25×10-5 F/m.