In this paper we present a device for measuring the magnetic field and its gradient with a spatial resolution of several hundred nanometres. This device is based on caesium metal vapour confined to an extremely thin cell (ETC). To measure magnetic signals, we use absorption and very low laser powers, which might be appealing for modern fabrication techniques. A portable, fully automated device was constructed.