Skip to content

MaintenanceThe former company search endpoint goes into maintenance on November 9Migration guide

SDKs // TypeScript // Get started

Install and configure

Last verified

Install the Reverse Contact TypeScript SDK on Node.js, Bun, Deno or edge runtimes, configure your API key, and create a server-side client.

Install @reverse-contact/sdk and keep your API key in your server environment. These guides cover the published package version 0.3.0.

Install

Install

npm install @reverse-contact/sdk

On Deno, run your script with --allow-net. Add --allow-env if you read the key from the environment.

Runtime requirements

The SDK runs on Node.js 22 and later, Bun, Deno, and edge runtimes that provide the standard Fetch API, AbortController and crypto.randomUUID. The package ships as ESM and CommonJS and has no runtime dependencies.

API key

Pass your API key with the apiKey option, or omit the option to let the client read RC_API_KEY. These guides use that environment variable, but you can use any server-side source, such as a secret manager. If you serve several workspaces, create one client per key.

Keep the key on your server. Anyone can read a key shipped in front-end code, so the constructor throws when it runs in a browser. Setting dangerouslyAllowBrowser: true bypasses that check and exposes your key to every visitor. See Authentication to create a key.

Terminal

API key

export RC_API_KEY="your-api-key"

Create a client

TypeScript SDK

Create a client

import ReverseContact from "@reverse-contact/sdk";
// CommonJS: const { ReverseContact } = require("@reverse-contact/sdk");

const client = new ReverseContact({ apiKey: process.env.RC_API_KEY });
const usage = await client.usage.retrieve();
console.log("Credits left:", usage.quotas?.workspace.credits.left);

new ReverseContact() also reads RC_API_KEY automatically. The constructor raises ReverseContactError when no key is available. See Client options for configuration and First call for enrichment.

Return to the TypeScript SDK overview.

FAQ

Which runtimes support the Reverse Contact TypeScript SDK?

@reverse-contact/sdk supports Node.js 22 and later, Bun, Deno, and edge runtimes with the standard Fetch API, AbortController and crypto.randomUUID.

Which environment variable does the SDK use for the API key?

new ReverseContact() reads RC_API_KEY when the apiKey constructor option is omitted. An explicit apiKey can come from any server-side secret source.

Can I use @reverse-contact/sdk in the browser?

The SDK constructor rejects browsers by default. Setting dangerouslyAllowBrowser: true bypasses that check and exposes the key to visitors. Keep the SDK client on your server.