Website Integration

Add cross-reference search to your website in 4 steps.

Wizerr App

1 Get your publishable API key

Go to Settings → API Access. Copy the key shown under PUBLISHABLE KEY.

Dashboard - API Access page with publishable key
Your publishable key is in the API Access section of Settings.

2 Set your preferred suppliers

Go to Settings → Preferred Suppliers. Search for a manufacturer and click + to add it.

The SDK will only return cross-reference results from suppliers on this list. Make sure you add every manufacturer you want to see in your results.

Dashboard - Preferred Suppliers page
Add the manufacturers you source from under Preferred Suppliers.
Your Website

3 Add the SDK and initialize

Include the script tag in your HTML (no bundler needed), then create a client with your publishable key from step 1.

<script src="https://app.wizerr.ai/wizerr-sdk.js"></script>
<script>
  const client = new WizerrXref({
    apiKey: 'wzr_live_pk_abc123',
  });
</script>

4 Run a search

Pass a part number to client.search(). Each call uses 1 credit. Results from your preferred suppliers (step 2) are ranked first automatically.

const res = await client.search('LM358');
console.log(res.data.results);

Response format

The response is a JSON object with two root fields:

input_part_details object

Metadata about the part you searched for.

FieldTypeDescription
part_numberstringThe part number you submitted
manufacturerstringDetected manufacturer of the input part
variant_part_numberstring | nullWhen your exact part number is not in our database, we use a closely related variant to produce the results. Contains that variant's part number. null when results are for your exact input.

results array

Cross-reference matches. Each result has a type indicating the search tier:

wizerr-deep-search Best matches — high-confidence drop-in replacements with a compatibility score.
wizerr-expanded-search Additional alternates — functionally similar parts from a broader search.

FieldTypeDescription
part_numberstringCross-reference part number
manufacturerstringManufacturer name
descriptionstringPart description
match_typestring"DROP-IN" or "ALTERNATE"
match_scorenumberCompatibility score (present on deep-search results)
preferred_supplierbooleantrue if the manufacturer is on your preferred list
typestring"wizerr-deep-search" or "wizerr-expanded-search"

Example

{
  "input_part_details": {
    "part_number": "TPS24701DGK",
    "manufacturer": "Texas Instruments",
    "variant_part_number": null
  },
  "results": [
    {
      "part_number": "IS31BL3212-DLS2-TR",
      "manufacturer": "Lumissil Microsystems",
      "description": "IC LED DRIVER LINEAR 23MA 8DFN",
      "match_type": "DROP-IN",
      "match_score": 0.96,
      "preferred_supplier": true,
      "type": "wizerr-deep-search"
    },
    {
      "part_number": "LTC4211CMS8#PBF",
      "manufacturer": "Analog Devices Inc.",
      "description": "IC HOT SWAP CTRLR GP 8MSOP",
      "match_type": "ALTERNATE",
      "preferred_supplier": true,
      "type": "wizerr-expanded-search"
    }
  ]
}

Full copy-paste example

A minimal working page. Replace the API key with yours.

<!DOCTYPE html>
<html>
<head><title>Xref Search</title></head>
<body>
  <input id="pn" placeholder="Part number" />
  <button id="btn">Search</button>
  <pre id="out"></pre>

  <script src="https://app.wizerr.ai/wizerr-sdk.js"></script>
  <script>
    const client = new WizerrXref({
      apiKey: 'wzr_live_pk_abc123',
    });

    document.getElementById('btn').onclick = async () => {
      const pn = document.getElementById('pn').value;
      try {
        const res = await client.search(pn);
        document.getElementById('out').textContent =
          JSON.stringify(res.data.results, null, 2);
      } catch (err) {
        document.getElementById('out').textContent = err.message;
      }
    };
  </script>
</body>
</html>

SDK options

OptionDefaultDescription
apiKey-Your publishable key (required)
maxRetries0Auto-retry when the rate limit is reached (3 req/sec, 60 req/min). The SDK waits and resends the request automatically. Set to 2-3 for production use.
Your publishable key is locked to your account's email domain. The API will reject requests from any website outside that domain.