When you are driving a vehicle, the police can stop and question you at any time. You must stop. If you don’t, you're committing a criminal offence for which you could receive a fine.
In order to question you, a police officer should be in uniform or, if they are not, they must show you their warrant card.
Unlike stop and search outside of a vehicle, the driver must tell the officer their name and address, and the name and address of the owner of the vehicle. The driver’s also obliged to show their driving licence and car insurance details if requested. Failing to do this when asked could be seen as obstructing the police in the course of their duty. But usually if you don’t have the documents with you there’ll be an opportunity to disclose them digitally or at a police station.
Any passengers in the vehicle do not have to provide their details and should stay silent during a stop and search.
The police also have the power to search your vehicle if they have reasonable belief that you may be carrying something illegal or something that can be used to commit an offence and you are likely to do so. They do not need a warrant to do this.
‘Reasonable belief’ could arise from a number of things, but might include nervous or erratic driving, transporting suspicious items, or looking like you are on your way to join an XR action. This is not the same as non vehicle related stop and searches where it must be ‘personal’ reasonable suspicion (ie. you fit the description of someone suspected to have committed a criminal act).
Belief is not considered “reasonable” if it is systemic (ie. not based on an appraisal of the individual’s circumstances).
If the police ask permission to search your vehicle (this may happen in a breezy kind of way, eg. “would you mind if we just had a quick look in the back?”), it may be because they don’t have the power to do it. You should politely decline.
If they insist on searching the vehicle then the best way to protect yourself is by asking the police “under what power?” they are searching it. You should also ask them why you in particular have been stopped and searched and what they are looking for.
You are entitled to a receipt (this can just be the number, doesn’t need to be a physical piece of paper) of your search from the police. Before the search begins, you should check with the police that they will provide this after it is completed. This will help make clear that you know your rights and add pressure to the police to act properly.