google.com, pub-2782336357453463, DIRECT, f08c47fec0942fa0

Can the police just stop me on the street and search me for no reason?

No. The general understanding is that a police officer only has the right to stop people whom they have reasonable cause to suspect of being involved in criminal activity. This area of police conduct is often found under the heading of stop and frisk rules. Basically, the "stop" must be justified by specific facts (referred to as "articulable" facts) combined with rational inferences from those facts. What this means is having long hair may not be a good enough reason to be "stopped", but walking back and forth in front of a bank with a large, bulky item under your coat may be a good enough reason for a police officer to stop and detain you for questioning.

Second, assuming the "stop" is valid, a limited search for weapons is justified if the officer reasonably feels in danger. Basically, this means a "pat down".

Third, any search may only be confined to discover objects capable of being used as weapons. For example, if the police officer goes into your wallet looking for a weapon, this may not be the proper place for the officer to look for weapons. If the officer finds illegel drugs, then you may have a shot at winning a motion to suppress, if you are charged with possession of those drugs