Toxic acids produced by industries are major hazards to the environment and human health, and luminescent pyrenebased crystalline metal−organic frameworks (MOFs) demonstrate promising performance in the detection of toxic acids. Herein, two novel isostructural 3D porous lanthanide MOFs, and Ce (2); H 4 TBAPy (1,3,6,8-tetrakis(p-benzoic acid)pyrene); and DMA: N,N-dimethylacetamide) were synthesized, which showed alb topology. Based on the protonation and hydrogen bond mechanism, complex 1 could be used as a fluorescence recognition sensor for HX (X = F, Cl, Br, and I) acid solutions with different luminescence behaviors. It is worth noting that complex 1 exhibited high sensitivity in the fluorescence enhancement sensing of hydrofluoric acid, oxalic acid, and trichloroacetic acid. In particular, complex 1 had a low limit of detection (LOD) for OA (0.1 μM) and was applied to real monitoring of orange fruit samples. In addition, the PVA@1 film could selectively, sensitively, and quantitatively respond to hydrochloric acid (HCl) vapor through fluorescent quenching; due to its protonation and adsorption capacity, the LOD was 0.18 ppm. Therefore, the portable optical device, the PVA@1 film, can detect HCl gas in trace amounts, achieving the ultimate goal of real-time and rapid detection, which has potential application value for industrial production safety.