{"id":18719,"library":"recombee-api-client","title":"Recombee API Client","description":"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.","status":"active","version":"6.2.0","language":"javascript","source_language":"en","source_url":"https://github.com/Recombee/node-api-client","tags":["javascript","recombee","recommendation engine","recommender engine","recommender as a service","machine learning","API","SDK","typescript"],"install":[{"cmd":"npm install recombee-api-client","lang":"bash","label":"npm"},{"cmd":"yarn add recombee-api-client","lang":"bash","label":"yarn"},{"cmd":"pnpm add recombee-api-client","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"ESM default export is not used; named import recommended. CJS via const { ApiClient } = require('recombee-api-client').","wrong":"const ApiClient = require('recombee-api-client')","symbol":"ApiClient","correct":"import { ApiClient } from 'recombee-api-client'"},{"note":"Namespace object containing all request classes (e.g., ListUsers, AddPurchase).","wrong":"const requests = require('recombee-api-client').requests;","symbol":"requests","correct":"import { requests } from 'recombee-api-client'"},{"note":"AddPurchase is not exported directly; access via requests.AddPurchase.","wrong":"import { AddPurchase } from 'recombee-api-client'","symbol":"AddPurchase","correct":"import { requests } from 'recombee-api-client'; const req = new requests.AddPurchase(...)"}],"quickstart":{"code":"import { ApiClient, requests } from 'recombee-api-client';\n\nconst client = new ApiClient(\n  process.env.RECOMBEE_DATABASE_ID ?? '',\n  process.env.RECOMBEE_DATABASE_PRIVATE_TOKEN ?? '',\n  { region: 'us-west' }\n);\n\nasync function main() {\n  try {\n    const users = await client.send(new requests.ListUsers({ count: 10 }));\n    console.log('Users:', users);\n  } catch (err) {\n    console.error(err);\n  }\n}\nmain();","lang":"typescript","description":"Initializes the Recombee client with environment variables and sends a ListUsers request."},"warnings":[{"fix":"Use async/await or .then() instead of callbacks.","message":"v6.0.0 removed callback-based API; all methods now return Promises.","severity":"breaking","affected_versions":">=6.0.0"},{"fix":"Use import { ApiClient, requests } from 'recombee-api-client' instead of import recombee from 'recombee-api-client'.","message":"v6.0.0 changed import structure: named exports from 'recombee-api-client' replaced default export.","severity":"breaking","affected_versions":">=6.0.0"},{"fix":"Upgrade Node to version 18 or later.","message":"v6.0.0 requires Node >=18. Older Node versions are unsupported.","severity":"breaking","affected_versions":">=6.0.0"},{"fix":"Use import { ApiClient, requests } from 'recombee-api-client' instead.","message":"Using require('recombee-api-client') is deprecated; ESM import is preferred.","severity":"deprecated","affected_versions":">=6.0.0"},{"fix":"Wrap multiple requests in new requests.Batch() before sending.","message":"Batch requests must be sent via client.send(new requests.Batch([...])). Directly sending an array of requests does not work.","severity":"gotcha","affected_versions":"*"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Use named import: import { ApiClient } from 'recombee-api-client'","cause":"Using default import instead of named import (e.g., import ApiClient from 'recombee-api-client')","error":"TypeError: ApiClient is not a constructor"},{"fix":"Run npm install recombee-api-client and ensure your node_modules includes it.","cause":"Package not installed or incorrect import path in older version","error":"Cannot find module 'recombee-api-client'"},{"fix":"Ensure you pass valid database ID and private token to new ApiClient(id, token, options).","cause":"Client not properly instantiated with database ID and token","error":"UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'send' of undefined"},{"fix":"Check the Recombee documentation for valid region codes and use one of the listed values.","cause":"Invalid region string passed in options","error":"Error: Region must be one of: us-west, us-east, ap-se, eu-west"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}