An Update to PubChem Widgets


Posted on September 19, 2016


PubChem Widgets 2.0f is released. The update substantially updates all table-based widgets and classification widgets, while adding new capabilities and features. The autocomplete widget remains unchanged from the previous version.


What are PubChem Widgets?

PubChem content is enormous and changes on a daily basis.  Keeping an effective mirror of this corpus is not trivial.  PubChem Widgets enable scientific web developers to display PubChem content within webpages they design.  All data comes directly from PubChem and, therefore, obviates the need to mirror that content.  This makes it easier to harness the vast scientific knowledge within PubChem on your own webpage, such as summaries of patents, bioactivities and PubMed articles linked to a PubChem record. They can also be used to provide an autocomplete function that suggests a list of terms when you type input into a search field.


What is new in PubChem Widgets 2.0f?



  • Simpler to embed
    It is now simpler to embed a data view widget into any web page using PubChem Widgets 2.0f. All you need is to include an HTML iframe tag with a proper URL as the ‘src’ attribute. For instance, to embed a PubChem widget from the above example, add the following code to your webpage at the location where you want the widget to appear:


    <iframe class="pubchem-widget"


            style="border: 0;  width: 100%; height: 250px;">


    The widget then renders the desired content for you.


  • Easier to resize
    The open source iframe resizer is able to resize an iframe automatically for you. To use it, add the following code to your page (only once, even if you have multiple PubChem widgets on the same page) just before the closing body tag:


    <script type="text/javascript" src=""></script>

    <script type="text/javascript">iFrameResize({log:false,checkOrigin:false}, '.pubchem-widget')</script>


How to convert to PubChem Widgets 2.0f?

Detailed instruction on how to convert PubChem Widgets 2.0f is given in this Conversion Guide.  PubChem Widgets 1.0 will be retired soon.  If you are using the PubChem Widgets 1.0 tables and classifications in your web pages, please update to PubChem Widgets 2.0f as soon as possible.  [Please note there is no change required for conversion of the autocomplete widgets.]


For more information on PubChem Widgets 2.0f, please read these pages:

Was this information helpful?


National Library of Medicine
8600 Rockville Pike
Bethesda, MD 20894


PubChem Help
HHS Vulnerability Disclosure


The page cannot be found

The page you are looking for might have been removed, had its name changed, or is temporarily unavailable. Please make sure you spelled the page name correctly or use the search box.