> The thought of ingesting some substance from dubious sources, that could be contaminated with absolutely anything
People used to trust networks of friends, rather than stereotypical 'gangs' or 'dealers'. The problem now is that there is so much other stuff floating around that nearly anything you go after could be nearly anything else.
In the UK there is a service called WEDINOS, which is of interest in this area - you can anonymously submit them a sample of whatever it is and they will publish the result on their website. They use the data to track drugs (their particular interest is novel or 'emerging' drugs) around the country. You basically get a number, fill in a form and post it to them alongside a sample, and they will do GCMS. You're not supposed to send them things you know are illegal, but ... looking at the website people do, a lot.
As the other poster mentions reagent tests are available fairly widely and can give you a rough idea.
Also in many countries some LSD derivatives are not (yet) illegal, and in those it is quite often possible to order things like 1P-LSD, which is (as far as can be ascertained) a pro-drug that is quickly metabolised into LSD, on the open internet.