  In this paper, we study thermodynamical properties of the apparent horizon in
a universe governed by quasi-topological gravity. Our aim is twofold. First, by
using the variational method we derive the general form of Friedmann equation
in quasi-topological gravity. Then, by applying the first law of thermodynamics
on the apparent horizon, after using the entropy expression associated with the
black hole horizon in quasi-topological gravity, and replacing the horizon
radius, $r_{+}$, with the apparent horizon radius, $\tilde{r}_{A}$, we derive
the corresponding Friedmann equation in quasi-topological gravity. We find that
these two different approaches yield the same result which show the profound
connection between the first law of thermodynamics and the gravitational field
equations of quasi-topological gravity. We also study the validity of the
generalized second law of thermodynamics in quasi-topological cosmology. We
find that, with the assumption of the local equilibrium hypothesis, the
generalized second law of thermodynamics is fulfilled for the universe
enveloped by the apparent horizon for the late time cosmology.
