Skip to main content
Raw TypeScript source · Workflow walkthrough · All examples

Run locally

Requires Node.js 22.18 or later. Run from the cloned repository; this file imports the shared client and contracts in src/. The default uses fictional local fixtures with no credentials, network calls, invitations, or spending.
For live calls, supply USERINTUITION_API_KEY securely in the environment and explicitly select --live. Follow the walkthrough for action-specific arguments and approvals. The B2/C1 adapters are illustrative pending release verification. Passing fixture checks does not establish live contract compatibility.

Inputs

Use —query with the research question. Optional —study, —cursor, —limit, and —fetch-source constrain or extend retrieval. Fixture mode returns a fixed match and does not execute the query.

Expected output

JSON containing mode, request, and response. The response includes results, next_cursor, and coverage. With —fetch-source, a second object contains source_kind and source or explains that there are no matches.

Side effects

Retrieves existing evidence; does not create studies, regenerate reports, invite people, or launch recruitment.

Failures

Invalid limits, missing live credentials, HTTP errors, invalid response shapes, and unresolved sources are failures. A successful empty results array is distinct from these errors.

Complete source file

The following is generated from examples/search-research/index.ts, not maintained as a separate snippet. SHA-256: 36c6a387b1ff89d12e48f9ae22f0f867e47424cb6214cfe40b7fb680e7f148d8.