You would want something not shorter than 50-100 feet. The best material for magnet fishing ropes is paracord. Besides being durable, strong, and elastic, paracord holds knots well. However, we recommend a paracord cope with a threaded spring hook. Threaded spring hook is the best alternative for any knot.
Make sure that the strength of your rope matches the pulling force of the magnet. For this, it is better to purchase both in a kit. You may also want to consider wire fishing magnet.