Is there any federal law in the US that protects its citizens from police harassment? Or is it up to the states
<p>Can police officers legally stop and ask you for your id (not driving, but cycling cross country) or question you about your travels (where are you going, why.. etc) if they cannot articulate any resonable suspicion ? 
If the above mentioned practice is illegal, and they make up funny excuses like "what if you fall into the ditch and die.. we need to know who to send the body to", would that be considered =mocking the law= ?
Is it up to the states to decide what constitutes harassment? Or is there a federal law that protects regular mortals from cops?
Thank you</p>

<p>You're looking for the <a href="https://www.law.cornell.edu/constitution/fourth_amendment" rel="nofollow noreferrer">Fourth Amendment</a>:</p>

<blockquote>
  <p>The right of the people to be secure in their persons, houses, papers, and effects, against unreasonable searches and seizures, shall not be violated.</p>
</blockquote>

<p>This prohibits the police from harassing you and stopping you without cause. It is not self-enforcing, though, so you can sue for a violation under <a href="https://www.law.cornell.edu/uscode/text/42/1983" rel="nofollow noreferrer">42 USC 1983</a>:</p>

<blockquote>
  <p>Every person who, under color of any statute, ordinance, regulation, custom, or usage, of any State or Territory or the District of Columbia, subjects, or causes to be subjected, any citizen of the United States or other person within the jurisdiction thereof to the deprivation of any rights, privileges, or immunities secured by the Constitution and laws, shall be liable to the party injured in an action at law, suit in equity, or other proper proceeding for redress.</p>
</blockquote>

<p>This is the normal means of enforcing your rights under the Fourth Amendment, as well as the First, Second, and so on.</p>

<p>"Mocking the law" is not a crime in any US state that I kn ow of. Harassment is, and so is false arrest, and both are matters of state law. </p>

<p>Police cannot lawfully stop people at random who are not driving a car and demand to see ID. They must have some valid reason to make a stop, and to demand ID. The exact standard that applies depends on the exact circumstances, but often "articulable suspicion" is the standard that a court will apply. This mostly comes up if the stop leads to an arrest and an attempt is made to suppress statements or evidence. If the person stops files a harassment complaint, then the terms of the local harassment law will apply, and those will vary by state or perhaps by locality. </p>

<p>While harassment  is a matter of state law, a claim for deprivation of civil rights is a federal matter, and has been used to address out-of-control police. But it is not likely to be pursued unless the US Attorney believes this is a rather serious matter. It is possible to file a federal civil suit for civil rights violation. (Under 42 USC 1983:, quoted in another answer.) But that is a tricky matter, and will surely require a lawyer.</p>

united-states constitutional-law civil-law search-and-seizure