> ## Documentation Index
> Fetch the complete documentation index at: https://docs.repdata.com/llms.txt
> Use this file to discover all available pages before exploring further.

# JavaScript Libraries

> Client-side libraries that extend SEARCH fingerprinting and REVIEW behavioral tracking.

Research Defender ships two client-side libraries, hosted on `https://prod.rtymgt.com`.

| Library | Used with | File |
| - | - | - |
| SEARCH library (`rd_sys_util`, System Utility Library) | SEARCH | `rd_sys_util.min.js` |
| REVIEW library (`scReviewLib`, Interaction Library) | REVIEW | `sc_review_lib_secured_v1-3.min.js` |

***

## SEARCH Library (`rd_sys_util`, System Utility Library)

Extends fingerprint detection with signals the SEARCH API uses in its fraud logic: simulated access through tools such as Playwright, Puppeteer, or Selenium, browser Developer Tools, network conditions, and the respondent's actual IP address (via asynchronous calls).

```text theme={null}
https://prod.rtymgt.com/static/js/rd_sys_util.min.js?v=2.0.1
```

* Built as an ES **module** — load it with `import()` or `type="module"`.
* Call `init({ key, env })` with your publishable key and environment so the library starts collecting data.
* Wait about **1 second** after `init()` so the datasets are ready.
* `pass_params()` returns the combined, encrypted dataset from the respondent's browser. Send it on the SEARCH call **as the name of a parameter with an empty value**.

```js theme={null}
const { init, pass_params } = await import('https://prod.rtymgt.com/static/js/rd_sys_util.min.js?v=2.0.1')
await init({ key: '<publishable_key>', env: 'prod' })
await new Promise((resolve) => setTimeout(resolve, 1000))
const pass = pass_params()
```

See the [Advanced Integration guide](/research-defender/guides/search/03-advanced-integration) for the full GET and POST examples.

***

## REVIEW Library (`scReviewLib`, Interaction Library)

A lightweight library that tracks respondent behavior and authenticity from page load to submission. It runs silently in the background and writes an encoded result to a hidden form field for server-side processing.

```text theme={null}
https://prod.rtymgt.com/static/js/review/sc_review_lib_secured_v1-3.min.js
```

* UMD build — works with AMD loaders, CommonJS (`require`), and plain `<script>` tags. `type="module"` is **not** required.
* Instantiate with a valid publishable key. The key is authenticated against the platform API first; if authentication fails or times out, listeners return early and callbacks receive an error string instead of data.
* Four callback listeners are required:

| Listener | Fires when |
| - | - |
| `page_load_listener` | The page has loaded and the key is authenticated. |
| `copy_paste_listener` | The respondent pastes text into the review field. |
| `text_event_listener` | The respondent first focuses, clicks, or selects text in the review field. |
| `submit_event_listener` | The respondent clicks the submit button. |

* Behavioral tracking (keystrokes, mouse, scroll) starts on page load and is finalized on submit. The detected data is passed to REVIEW in the `p_fields` parameter.

For a complete page with the required elements and the REVIEW request, see the [Review Integration guide](/research-defender/guides/review/02-integration). For the element-ID configuration reference, see [Enabling JavaScript Interaction Library](/research-defender/guides/review/01-overview#enabling-javascript-interaction-library).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.