An optofluidic apparatus for analyzing samples and detection of individual particles, comprising: an optical layer comprising a plurality of waveguides; a plurality of layers for the manipulation of fluids, wherein a first layer for the manipulation of fluids of the plurality of layers for the manipulation of fluids is attached to the optical layer and is configured as an interface layer, and a second layer for the manipulation of fluids of the plurality of layers for the manipulation of fluids is attached to the first layer for the manipulation of fluids and is configured as a functional layer for the manipulation of fluids, wherein a first function of the second layer for the manipulation of fluids comprises distributing samples to the plurality of waveguides, and wherein a second function of the second layer for the manipulation of fluids comprises mechanical filtration of samples; and a protective layer attached to a layer for the manipulation of fluids of the plurality of layers for the manipulation of fluids; wherein the optical layer is made of a different substrate material than the plurality of layers for the manipulation of fluids; and wherein the optical layer, plurality of layers for the manipulation of fluids, and protective layer are vertically integrated, and wherein separate access paths for liquids and light are provided to define at their intersection optical excitation regions with sub-picoliter volumes in which the liquids and the light interact with single molecule sensitivity, wherein the first layer for the manipulation of fluids either: comprises air channels with shapes that follow the geometry of the plurality of waveguides in areas used for optical guiding; or is configured to provide an air gap between at least one waveguide and the first layer for the manipulation of fluids in areas used for optical guiding. an optical layer comprising a plurality of waveguides; a plurality of layers for the manipulation of fluids, wherein a first layer for the manipulation of fluids of the plurality of layers for the manipulation of fluids is attached to the optical layer and is configured as an interface layer, and a second layer for the manipulation of fluids of the plurality of layers for the manipulation of fluids is attached to the first layer for the manipulation of fluids and is configured as a functional layer for the manipulation of fluids, wherein a first function of the second layer for the manipulation of fluids comprises distributing samples to the plurality of waveguides, and wherein a second function of the second layer for the manipulation of fluids comprises mechanical filtration of samples; and a protective layer attached to a layer for the manipulation of fluids of the plurality of layers for the manipulation of fluids; wherein the optical layer is made of a different substrate material than the plurality of layers for the manipulation of fluids; and wherein the optical layer, plurality of layers for the manipulation of fluids, and protective layer are vertically integrated, and wherein separate access paths for liquids and light are provided to define at their intersection optical excitation regions with sub-picoliter volumes in which the liquids and the light interact with single molecule sensitivity, wherein the first layer for the manipulation of fluids either: comprises air channels with shapes that follow the geometry of the plurality of waveguides in areas used for optical guiding; or is configured to provide an air gap between at least one waveguide and the first layer for the manipulation of fluids in areas used for optical guiding. comprises air channels with shapes that follow the geometry of the plurality of waveguides in areas used for optical guiding; or is configured to provide an air gap between at least one waveguide and the first layer for the manipulation of fluids in areas used for optical guiding.