First add a custom Google search box on your website:

How to add custom Google Search Engine on Your website?

1. login your Google Account
2. Go to the link:

3. Put the site url you want to be search in Google.

4. Put the name of search engine
5. Click to create button
6. Once you created your custom search engine later you can edit it and add more values like :
search engine description
search engine keywords
image search optional (On/Off)
Speech input (ON/Off)
7. You can also monetize the search by connecting your engine to your Google AdSense account.
8. You can also set it look and feel according to your choice by clicking "Look and Feel" button.


Put the markup on your homepage.

How to put markup?
Put the markup on your homepage.

Note: Remember to replace URL and search _string

 You can also check the code whether it is right or wrong using Google Data Structured testing tool:


Now sit and relax. Search box will automatically appear in SERPs after the next crawling of website.