An X-ray generating apparatus is disclosed which includes a tube body having a vacuum interior, an electron source provided within the tube body to generate an electron beam, a target, within the tube body that is irradiated with the electron beam to generate an X-ray, and an X-ray window for taking out the X-ray generated outside of the tube body. A plurality of grooves are formed on a surface of a member building up the target. The grooves each have a fine width and are inclined by a predetermined angle (α), from a direction perpendicular to an elongating direction of the grooves, so that they bridge over the plural numbers of grooves. The X-ray generating apparatus is configured such that a multi-line X-ray generating from the plural numbers of multi-line targets, which are formed between the grooves, emits at a predetermined extraction angle (β), passing through the X-ray window. An inspection apparatus which includes the X-ray generating apparatus is also disclosed.