How To Integrate The myHealthbox Search Bar Into Any Web Site

Release 1.0.1


Before You Begin

This document is intended for website and mobile developers who want to use the healthcare products information supplied by the myHealthbox platform within their applications or services.

To use the myHealthbox Search Bar, you DO NOT need an API key.


Any web or mobile applications using the myHealthbox Search Bar must display the “powered by myHealthbox” attribution and a link to the myHealthbox web site ( in a suitable place.

Usage restrictions

If your myHealthbox Search Bar implementation generates a high volume of transactions, myHealthbox reserves the right to set transaction limits.

In your HTML code

Most implementations will use a form with an html code similar to the one shown below:

<!-- START myHealthbox Search Bar code -->

<form action="javascript:void(0);" class="content-search-view2">

<div class="input-group" >

<input id="search_bar" type="text" class="form-control" placeholder="" value="">

<span class="input-group-btn">

<button class="btn btn-primary" onclick="javascript:onSearchClick();">

<span class="glyphicon glyphicon-search" ></span>





<!-- END myHealthbox Search Bar code -->

There are several ways to implement a search bar, you can obviously modify the layout and the css to reflect the style of your site, just make sure you do not change the id of the input element ("search_bar").

The javascript code to build and call the search url is as follows:

// START myHealthbox Search Bar javascript code

var searchString = "";

$(document).ready(function () {

$('#search_bar').keypress(function(e) {

if(e.which == 13) {





function getSearchArray() {

return {




function onSearchClick() {

searchString = $('#search_bar').val();

var formData = getSearchArray();





// END myHealthbox Search Bar javascript code

The code above will create a form to input a text string (search string) and then open a new page with the list of the search results.

The new page will be under the domain, if you are looking at managing the search query and the display of the result set within your site you will need to use the myHealthbox Web APIs.