  We study the categorical homology of Zappa-Sz\'ep products of small
categories, which include all self-similar actions. We prove that the
categorical homology coincides with the homology of a double complex, and so
can be computed via a spectral sequence involving homology groups of the
constituent categories. We give explicit formulae for the isomorphisms
involved, and compute the homology of a class of examples that generalise
odometers. We define the C*-algebras of self-similar groupoid actions on
k-graphs twisted by 2-cocycles arising from this homology theory, and prove
some fundamental results about their structure.
