An IDEAL (Intrinsic, Deductive, Explicit, ALgorithmic) characterization of a reference spacetime metric consists of a set of tensorial equations , constructed covariantly out of the metric , its Riemann curvature and their derivatives, that are satisfied if and only if is locally isometric to the reference spacetime metric . The same notion can be extended to include matter fields, where the equations are allowed to also depend on the matter fields . We will present the first IDEAL characterization of cosmological FLRW spacetimes, with and without a dynamical scalar field. The solution of this problem also has implications for the construction of local gauge invariant observables for cosmological perturbations. Namely, by construction, the linearization about gives a complete set of local gauge invariant field combinations for cosmological perturbations. This is joint work with G. Canepa.