Should structured data for the search box and logo only be in the main page of website or should be in all of the pages? and why?
My goal is to use them to get rich snippets in Google.
Webmasters Stack Exchange is a question and answer site for webmasters. It only takes a minute to sign up.Sign up to join this community
Your structured data must be a true representation of the page content.
Put the structured data on the page that it describes, unless specified otherwise by the documentation.
Thus, you can easily set the markup for the search box and logo on all pages that have a search box and a logo in the main (visible to users) content.