Web developer resources

Help more people take part in research

Be Part of Research is an online service which aims to connect members of the public, patients, clinicians, health and social care professionals with all the information they need to take part and support health and care research in England.  

We’ve produced a Widget and an Application Programming Interface (API) which you can place on your website, blog or other digital space to help promote our site and participation in research.

Use the text below to explain the site.

What is Be Part of Research?

Be Part of Research is an online service which connects public, patients, clinicians and healthcare professionals with health and care research studies in England. 

The Widget

You can use this widget to tell your audience about trials that are currently recruiting. The widget can display either the number of recruiting trials in a condition across the UK, the number of trials in a condition recruiting in a specific area, or the total number of trials recruiting in a specific area.

The widget looks like this:

To publish the widget, copy and paste the below code to your site:

Code Block

<script type="text/javascript" src="https://bepartofresearch-api.nihr.ac.uk/widgets/js/ukctg-widget.js"></script>


        window.onload = function() {

             var widgetConfig = {  // Note, you must specify a primary search query and/or a location

                   query: 'cancer', // The primary search term. If this line is deleted then you must also remove the comma from the start of the next line so no primary term will be used.

                       location: 'York', // The location of the search. If this line is deleted then no location will be used.

                       divId: 'ukctgResult', // Id of the div where you want the widget to be placed.

                       width: 400, // width of the widget. If this line is deleted/commented out then, width of 100% will be used.





<div id="ukctgResult"></div>

To make the widget more relevant to your site, you can edit the code as follows:

  • To change the health condition, replace cancer in the code line query: 'cancer', // The search term with the health condition you want to refer to.
  • To show results across all health conditions for an area, remove the line query: 'cancer', // The search term
  • To change the location, replace York in the code line query: 'York', // The location of the search with the geographic region you would like to search.
  • To show the results across the UK, remove the line location: 'York', // The location of the search
  • To change the width of the widget replace 400 in the code line width: 400 // width of the widget. If not provided then, width of 100% will be used.

If you have any difficulty implementing this code on your website, contact bepartofresearch@nihr.ac.uk

The API (Application Programming Interface)

We have an API which you may be able to use to link to the content of our site. All requests will be considered but are subject to approval. Contact us at the above email address.