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>Customization
You can customize the widget appearance using data-rivetchain-* attributes on the container div:
- data-rivetchain-theme —
lightordark. Defaults tolight. - data-rivetchain-width — Widget width in pixels (e.g.,
600). Defaults to100%. - data-rivetchain-height — Widget height in pixels (e.g.,
400). Defaults to500.
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
});apiKey for authenticated mode or company for public mode.Setup Steps
- 1
Go to Settings > Integrations
Navigate to your company settings and select the Integrations tab.
- 2
Find the "Search Widget" section
Scroll to the Search Widget section. Here you can choose between Authenticated and Public mode.
- 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
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.