A roller bearing apparatus, comprising: - an outer ring; - an inner ring member provided on an inner periphery side of the outer ring via rolling elements; - an inner shaft having the inner ring member attached on the outer periphery and a flange for mounting a wheel at one axial end; - a detection member provided on the inner ring member or the inner shaft, which co-rotates with the wheel, for detecting a rotation; - a synthetic resin cover attached to the outer ring at the other axial end; - a sensor insertion opening provided through the cover in the axial direction; and - a cap nut embedded in the cover with a nut end face exposed for fastening a sensor flange of a sensor to the cover on the other axial end side, characterized in that: the cap nut is embedded in the cover in such a manner that the nut end face of the cap nut protrudes from the outer cover surface on the other axial end side by an axial distance (d), wherein the nut end face is positioned on the other axial end side of the cover outer surface facing the inner flange surface (208b1) of the sensor flange, wherein the sensor is to be inserted into the sensor insertion opening of the cover so that the inner flange surface (208b1) of the sensor flange is in contact with the nut end face, but not in contact with the outer cover surface when the sensor flange is fastened to the cover by the cap nut and a bolt. - an outer ring; - an inner ring member provided on an inner periphery side of the outer ring via rolling elements; - an inner shaft having the inner ring member attached on the outer periphery and a flange for mounting a wheel at one axial end; - a detection member provided on the inner ring member or the inner shaft, which co-rotates with the wheel, for detecting a rotation; - a synthetic resin cover attached to the outer ring at the other axial end; - a sensor insertion opening provided through the cover in the axial direction; and - a cap nut embedded in the cover with a nut end face exposed for fastening a sensor flange of a sensor to the cover on the other axial end side, characterized in that: the cap nut is embedded in the cover in such a manner that the nut end face of the cap nut protrudes from the outer cover surface on the other axial end side by an axial distance (d), wherein the nut end face is positioned on the other axial end side of the cover outer surface facing the inner flange surface (208b1) of the sensor flange, wherein the sensor is to be inserted into the sensor insertion opening of the cover so that the inner flange surface (208b1) of the sensor flange is in contact with the nut end face, but not in contact with the outer cover surface when the sensor flange is fastened to the cover by the cap nut and a bolt. the cap nut is embedded in the cover in such a manner that the nut end face of the cap nut protrudes from the outer cover surface on the other axial end side by an axial distance (d), wherein the nut end face is positioned on the other axial end side of the cover outer surface facing the inner flange surface (208b1) of the sensor flange, wherein the sensor is to be inserted into the sensor insertion opening of the cover so that the inner flange surface (208b1) of the sensor flange is in contact with the nut end face, but not in contact with the outer cover surface when the sensor flange is fastened to the cover by the cap nut and a bolt.