HTML container
Element you want the widget to render in.
API key
Enter your API application's consumer key
Configure pages
Select a page to customize and add to the widget. To add other pages, see the documentation.

<html>
  <head>
    <link rel="stylesheet" type="text/css" href="https://api-cdn.shutterstock.com/2.0.6/static/css/sstk-widget.css">
  </head>
  <body>
    <div id="widget-container"></div>
    <script>
      window.onload = () => {
        const searchPage = {
          name: 'searchPage',
          component: ShutterstockWidget.components.SearchPage,
          props: {
            mediaType: 'images',
            title: 'Shutterstock UI Search Widget',
            subtitle: '',
            dynamicTitle: true,
            dynamicSubtitle: true,
            showMore: true,
            showSearchBar: true,
            onItemClick: (e, item) => {
              e.preventDefault();
              console.log(item);
            }
          }
        };

        const widget = new ShutterstockWidget({
          container: document.getElementById('widget-container'),
          key: '0OviQeVft2KY9BiFNJF8XRPvTe3ZXUFS',
          pages: [searchPage]
        });

        widget.getPage('searchPage').search()
      }
    </script>
    <script src="https://api-cdn.shutterstock.com/2.0.6/static/js/sstk-widget.js"></script>
  </body>
</html>
Copy