Add search box to page

You can do this using the get_search_form() function. For your custom parameters you can add some hidden fields or you can modify the action attribute value.

The following can be considered as your form layout.

<form role="search" method="get" id="searchform" action="<?php echo home_url( "https://wordpress.stackexchange.com/" ); ?>">
    <div><label class="screen-reader-text" for="s">Search for:</label>
        <input type="text" value="" name="s" id="s" />
        <input type="submit" id="searchsubmit" value="Search" />
    </div>
</form>

You can add your own parameters such as tags, etc. by appending the get parameters to the action attribute of form.

Refer some examples below:

  1. WordPress Codex
  2. WP Beginner