Registry / ai-ml / recombee-api-client

recombee-api-client

JSON →
library6.3.0jsnpmunverified

Node.js SDK (v6.2.0) for the Recombee recommendation engine API. Provides a high-level client with batch operations, property management, and recommendation requests. Ships TypeScript types, requires Node >=18, and supports ESM & CJS. Major v6 dropped callbacks in favor of promises, and changed import paths. Regular releases on npm monthly.

npm install recombee-api-client
INSTALL
IMPORT
SIG · RECOMBEE-API-CLIEN
R
recombee-api-client
ai-mljavascriptv6.3.0
Install
—
Import
—
Disk
—
Pass rate
0/ 6
Env Coverage0 / 6
glibc
18–22
musl
18–22
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18–226 runs
build_error
glibc
node 18–226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

ApiClient
✓ import { ApiClient } from 'recombee-api-client'
✗ const ApiClient = require('recombee-api-client')
ESM default export is not used; named import recommended. CJS via const { ApiClient } = require('recombee-api-client').
requests
✓ import { requests } from 'recombee-api-client'
✗ const requests = require('recombee-api-client').requests;
Namespace object containing all request classes (e.g., ListUsers, AddPurchase).
AddPurchase
✓ import { requests } from 'recombee-api-client'; const req = new requests.AddPurchase(...)
✗ import { AddPurchase } from 'recombee-api-client'
AddPurchase is not exported directly; access via requests.AddPurchase.

Initializes the Recombee client with environment variables and sends a ListUsers request.

import { ApiClient, requests } from 'recombee-api-client'; const client = new ApiClient( process.env.RECOMBEE_DATABASE_ID ?? '', process.env.RECOMBEE_DATABASE_PRIVATE_TOKEN ?? '', { region: 'us-west' } ); async function main() { try { const users = await client.send(new requests.ListUsers({ count: 10 })); console.log('Users:', users); } catch (err) { console.error(err); } } main();
Debug
Known issues
breakingv6.0.0 removed callback-based API; all methods now return Promises.
fix
Use async/await or .then() instead of callbacks.
affects: >=6.0.0
breakingv6.0.0 changed import structure: named exports from 'recombee-api-client' replaced default export.
fix
Use import { ApiClient, requests } from 'recombee-api-client' instead of import recombee from 'recombee-api-client'.
affects: >=6.0.0
breakingv6.0.0 requires Node >=18. Older Node versions are unsupported.
fix
Upgrade Node to version 18 or later.
affects: >=6.0.0
deprecatedUsing require('recombee-api-client') is deprecated; ESM import is preferred.
fix
Use import { ApiClient, requests } from 'recombee-api-client' instead.
affects: >=6.0.0
gotchaBatch requests must be sent via client.send(new requests.Batch([...])). Directly sending an array of requests does not work.
fix
Wrap multiple requests in new requests.Batch() before sending.
affects: *
Errors
Common errors & fixes
TypeError: ApiClient is not a constructor
Using default import instead of named import (e.g., import ApiClient from 'recombee-api-client')
fix
Use named import: import { ApiClient } from 'recombee-api-client'
Cannot find module 'recombee-api-client'
Package not installed or incorrect import path in older version
fix
Run npm install recombee-api-client and ensure your node_modules includes it.
UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'send' of undefined
Client not properly instantiated with database ID and token
fix
Ensure you pass valid database ID and private token to new ApiClient(id, token, options).
Error: Region must be one of: us-west, us-east, ap-se, eu-west
Invalid region string passed in options
fix
Check the Recombee documentation for valid region codes and use one of the listed values.
Upgrade
Version history
6.3.0latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
22 hits · last 30 days
node
18
Amazon
1
OpenAI (training)
1
Resources
recombee-api-client — npm install recombee-api-client · libregistry