Consultations on police stop-and-search powers
The Scottish government is seeking views on a new code of practice for police powers of stop-and-search.
It follows controversy about the number of people searched by officers without any legal basis.
So-called "consensual searches" will be phased out, and the government wants opinions on new guidelines to replace them.
Ministers are also consulting on new powers to allow police to search people under the age of eighteen for alcohol.
This was identified as a gap in the legislation by an advisory group set up by the Scottish government to examine the use of stop-and-search powers.
'Get the balance right'
Justice Secretary Michael Matheson said: "The fact that stop-and-search has led to the seizures of dangerous weapons, drugs and stolen goods shows how it can be a valuable tool in combating crime.
"However, it is important that police get the balance right between protecting the public and the rights of the individuals.
"These consultations are about giving people the chance to share their views on how and when stop and search should be used.
"We are particularly keen to hear from young people who have experience of being stopped by the police. Their views will help us to consider the best possible way to tackle the issue of children and young people drinking in public and the harm that it can cause. "
He added: "By listening to the public, Police Scotland and the Scottish Police Authority can ensure that stop-and-search achieves what we all want to see - safer communities."
The independent advisory group, chaired by solicitor advocate John Scott QC, was set up in March 2015.
It reported that ending the consensual - or random - searches would not prevent officers carrying out their duties effectively.
The group will remain in place to give advice on the final version of the code of practice once the consultations are complete.
The code will set out guidance on how and when stop-and-search is used, how the search should be carried out and what information should be recorded.
In 2015, a BBC Scotland investigation found that children under 12 were being searched, despite a police promise that they would not be.
When consensual stop-and-search ends, police will only be able to search a person where they have a specific legal power to do so.
The consultations will run until 15 July.