All the police need is "reasonable suspicion" or "probable cause" to stop you, and search your car.
Reasonable Suspicion:
Facts or circumstances which would lead a reasonable person to suspect that a crime has been, is being, or will be committed.
At this stage, police may detain the suspect for a brief period and perform a frisk. Refusing a search does not create reasonable suspicion, although acting nervous and answering questions inconsistently can. For this reason, it is best not to answer questions if you have to lie in order to do so. Police authority increases if they catch you in a lie, but not if you refuse to answer questions. As a general rule, reasonable suspicion applies to situation in which police have reason to believe you’re up to something, but they don’t know what it is.
Probable Cause:
Facts or evidence that would lead a reasonable person to believe that a crime has been, is being, or will be committed and the person arrested is responsible.
Police may perform a search, and often an arrest. Probable cause generally means police know what crime they suspect you of and have discovered evidence to support that belief.
Many factors contribute to a police officer’s level of authority in a given situation. Understanding the what, when, why, and how of police conduct during a stop is confusing for most people. Varying standards of proof exist to justify varying levels of police authority during citizen contacts.
Side note:
You are damn lucky that you weren't rolling through New Rome, back in the days when they were fleecing the public, or you would still be there trying to make bail.