Search Widget

Embed a certificate search box on your website so customers can look up products by certificate number.

Overview

The Search Widget lets you embed a certificate search box on your website. Your customers can look up products by certificate number without leaving your site.

Requirements

  • Scale plan subscription required.
  • Company alias configured (Settings > Profile) for Public Mode.

Two Modes

The Search Widget supports two modes depending on whether you provide an API key.

Authenticated Mode (with API Key)

When you include your API key, the widget searches within your company and provides full product details:

  • Searches scoped to your company
  • Shows product details (name, type, issued date)
  • Allows certificate download
<div
  data-rivetchain-search
  data-rivetchain-api-key="YOUR_API_KEY"
></div>
<script src="https://rivetchain.com/api/v1/widget"></script>

Public Mode (without API Key)

Without an API key, the widget uses your company alias to scope searches and shows limited information:

  • Searches scoped to your company via alias
  • Shows certificate number only
  • Links to public verification page (no download)
<div
  data-rivetchain-search
  data-rivetchain-company="your-company-alias"
></div>
<script src="https://rivetchain.com/api/v1/widget"></script>
Warning
In Authenticated Mode your API key is placed in your page's HTML, so anyone who views the page source can copy it. The key gives full access to your company's data through the API, not just search. Use Public Mode on public websites; use Authenticated Mode only on pages that you control access to, such as an internal or password-protected page. If your key has been exposed, regenerate it under Settings > Integrations.

Customization

You can customize the widget appearance using data-rivetchain-* attributes on the container div:

  • data-rivetchain-theme — light or dark. Defaults to light.
  • data-rivetchain-width — Widget width in pixels (e.g., 600). Defaults to 100%.
  • data-rivetchain-height — Widget height in pixels (e.g., 400). Defaults to 500.

Programmatic API

For more control, you can use the JavaScript API to create the widget programmatically:

RivetChain.createSearchWidget('#container', {
  theme: 'light',
  apiKey: 'your-api-key',  // optional
  company: 'your-alias',   // required for public mode
});
Note
When using the programmatic API, you must include either apiKey for authenticated mode or company for public mode.

Setup Steps

  1. 1

    Go to Settings > Integrations

    Navigate to your company settings and select the Integrations tab.

  2. 2

    Find the "Search Widget" section

    Scroll to the Search Widget section. Here you can choose between Authenticated and Public mode.

  3. 3

    Copy the embed code

    Use the copy button to copy the generated HTML snippet for your preferred mode. The snippet includes the appropriate data attributes for your company.

  4. 4

    Paste into your website

    Add the copied snippet to your website's HTML wherever you want the search box to appear. The widget loads asynchronously and will not slow down your page.