I was interested a while back in getting closeups using a web cam, came across a video on how to modify a Logitech C310 to be able to do rudimentary macro shooting. It's not the greatest camera, but it is as easy as removing the case screws (auto-void warranty) and break the hot glue bead that was placed on the screw-type lens during factory calibration. After that, it becomes an adjustable camera that can do pretty close-up shots. What I use it for is to get closeups of mint marks and problem areas of coins at an angle, which I can't really do with my mounted DSLR setup. It also does a pretty good job at catching mint luster and proof fields. Images below are of 1877-S Liberty
Seated quarter and an 1883 3 Cent Nickel.








Here's a before and after of the camera once I tore it apart for my use.


Notice the duct tape on the electronics board, which covers the green "in-use" light that cannot be turned off. Duct tape is not good to use in any photography setting since the adhesive stays behind on anything it touches (photographers use gaffer's tape). I'd recommend a bead of silicone and small piece of rubber to black out the green light.
The velcro on the cam is for mounting to a goose neck. Mostly I use it had held since adjusting the lens for magnification and then moving the goose neck around is really not worth the effort. The C310 webcam is an earlier model, but still on
Amazon for around $25.00. Can't attest to any other webcam types that do this but I'm sure that many can, you just have to be okay with voiding all warranties. BTW if the lens falls out because it was unscrewed too far (which is the direction to get macros) just use a puffer bulb to blow out the CMOS chip housing and carefully screw the lens back in. It fell out on me tonight and rolled under the table, puffed everything with air and finished taking shots.
Regards