The present invention provides an apparatus for locating and positioning oilwell tool joints. This invention is particularly useful when the apparatus is placed near a Blowout Preventer (BOP) because it can be used to make sure that a tool joint is not present between the BOP rams. In some embodiments, the invention makes use of magnetic flux creation and detection by electromagnetic coils while a portion of the riser is magnetically saturated by powerful permanent magnets. Different configurations of the driving and sensing coils are possible so that it is possible to locate the tool joints longitudinally and radially within the apparatus. The apparatus is easily retrofitted to existing risers without altering ongoing operations because it can be opened before installation and closed once installed.