If they are actually on the surface, then you can get a strong magnet on wheels that you push around. I bought mine at harbor freight when I helped with a playground cleanup.
https://www.harborfreight.com/22-inch-magnetic-floor-sweeper-with-release-98399.html
I used it after my house was reroofed--after the roofers used theirs---and I picked up dozens more nails. Also handy to "sweep" the garage after a project, or to find any small metal pieces accidently dropped in carpet.
As far as detecting, I have used it a few times at permissions. Where it worked like a charm was a backyard with an old shed that had been torn down and replaced with a new one. I picked up a lot of old and new metal bits. But the ground was still dirt and I was able to set the sweeper height really low. If the ground is damp and the metal is pressed into it, then the magnet isn't going to be strong enough.
If there's thick grass, then you have to adjust the height high enough that it isn't brushing too hard against the bottom. It can wipe the nails off. Of you have to remove them each time you hear them hit...CLANK! TINK!