TypeScript and JavaScript SDK
Use the Reverse Contact TypeScript and JavaScript SDK to enrich profiles, search within a budget, find contacts, and manage Lists and async tasks.
Introduction
@reverse-contact/sdk is the official TypeScript and JavaScript client for the Reverse Contact API. It covers every endpoint with typed requests and results. The client handles safe retries, waits for asynchronous tasks, and pages through search results within a budget you set. It has no runtime dependencies.
- Package: @reverse-contact/sdk on npm
- Source code and issues: github.com/visum-run/reversecontact-node
- License: Apache-2.0
The SDK runs on Node.js 22 and later, Bun, Deno, and edge runtimes that provide the standard Fetch API, AbortController and crypto.randomUUID. It ships as ESM and CommonJS.
These guides describe the published SDK version 0.4.1. The Python SDK is also available for Python 3.11 and later. Keep API keys on your server: browser construction is rejected by default.
Install
Install
npm install @reverse-contact/sdkFirst call
Set RC_API_KEY on your server, then run this example. A successful person enrichment costs 2 credits. A lookup with no match is free.
First call
import ReverseContact from "@reverse-contact/sdk";
const client = new ReverseContact();
const result = await client.enrich.person({ email: "jane.doe@acme.com" });
console.log(result?.data.person ?? "No confident match");Endpoints and methods
| Endpoint | Method |
|---|---|
| Enrich profile | client.enrich.person() |
| Enrich company | client.enrich.company() |
| Person profile | client.fetch.person() |
| Person profile live | client.fetch.personLive() |
| Person profile status | client.fetch.checkPerson() |
| Company profile | client.fetch.company() |
| Company profile live | client.fetch.companyLive() |
| Company profile status | client.fetch.checkCompany() |
| People search | client.search.people(), client.search.iterPeople() |
| Agentic Search | client.search.peopleByPrompt(), client.search.iterPeopleByPrompt() |
| People lookalike | client.search.peopleLookalike(), client.search.iterPeopleLookalike() |
| People search count | client.search.countPeople() |
| Search autocomplete for your product | client.search.peopleAutoCompletionFields() |
| People search available fields | client.search.peopleFields() |
| Company search | client.search.organizations(), client.search.iterOrganizations() |
| Agentic Company Search | client.search.organizationsByPrompt(), client.search.iterOrganizationsByPrompt() |
| Company search count | client.search.countOrganizations() |
| Company search available fields | client.search.organizationsFields() |
| Find Email | client.contact.findEmail() |
| Verify Email | client.contact.verifyEmail() |
| Find Phone | client.contact.findPhone() |
| All Lists | client.lists.list(), client.lists.listAll() |
| Create a List | client.lists.create() |
| Get a List | client.lists.retrieve() |
| Delete a List | client.lists.delete() |
| List members | client.lists.members.list(), client.lists.members.listAll() |
| Add members | client.lists.members.add() |
| Remove members | client.lists.members.remove() |
| Import members and data | client.lists.importSignals() |
| Read a List operation | client.lists.operations.retrieve(), client.lists.operations.wait() |
| Cancel a List operation | client.lists.operations.cancel() |
| Export a List | client.lists.export() |
| Bulk | client.bulk.enrichPersons() |
| Task history | client.bulk.list(), client.bulk.listAll() |
| Get a task | client.bulk.retrieve(), client.bulk.wait() |
| Download task results | client.bulk.results() |
| Read task results by page | client.bulk.rows(), client.bulk.iterateRows() |
| Cancel a task | client.bulk.cancel() |
| Polling a task | client.tasks.retrieve(), client.tasks.wait() |
| Usage | client.usage.retrieve() |
Look for the TypeScript SDK tab in endpoint code examples. For now, the List and Bulk examples are in Lists and Bulk. Request fields use the API's camelCase names.
Where to go next
- Install and configure
- First call
- client.enrich
- client.fetch
- client.search
- client.contact
- client.lists
- client.bulk
- client.tasks
- client.usage
- Async tasks
- Lists and Bulk
- Search within a budget
- Filter values as constants
- Errors and retries
- Timeouts and cancellation
- Client options
- Without the SDK
API key
Keep the key on your server and pass apiKey, or let the client read RC_API_KEY. See Install and configure.
Lookups that find nothing
Check for null when a lookup finds no profile. See First call for response handling.
Async tasks: live fetch, Find Email and Find Phone
Use task.wait() to poll for free, for up to 30 minutes by default. A failed task raises TaskFailedError. Save task.id to resume with client.tasks.wait() after a restart. See Async tasks.
Webhook delivery instead of polling
Receive results at an HTTPS webhook and parse deliveries in Async tasks.
Lists and Bulk
Use Lists and Bulk to create Lists, track imports, and read Bulk results as they come or download them.
Search within a budget
Count for free, then use the required maxResults iterator option to cap requested results. See Search within a budget.
Filter values as constants
Use Filter values as constants to autocomplete supported values in your editor.
Errors and retries
The SDK retries per-minute limits and HTTP 500, 502, 503 and 504 up to 4 times. Daily limits, key credit limits and missing credits are not retried. Read Errors and retries.
Safe retries on Find Email and Find Phone
Contact lookups reuse an idempotency key across retries, including HTTP 409 IDEMPOTENCY_KEY_IN_USE. Outside per-minute rate limits, other 4xx errors are not retried. Read Errors and retries.
Timeouts and cancellation
See Timeouts and cancellation to set a timeout for each HTTP attempt or cancel local requests.
Client options
Set transport, logging, headers and per-request overrides with Client options.
Without the SDK
To call the API with an HTTP client or generate one from OpenAPI, see Without the SDK.
FAQ
Is there an official Reverse Contact SDK?
Yes. Reverse Contact publishes @reverse-contact/sdk on npm for TypeScript and JavaScript, and reversecontact on PyPI for Python 3.11 and later. The TypeScript and JavaScript SDK runs on Node.js 22 and later, Bun, Deno and edge runtimes. Both SDKs cover every API endpoint, handle safe retries, and wait for asynchronous tasks.
Can I use @reverse-contact/sdk in the browser?
No. Anyone can read an API key shipped in front-end code, so the @reverse-contact/sdk client throws when it is created in a browser. Call Reverse Contact from your server, keep the key in the RC_API_KEY environment variable, and send the browser only what it needs.
Does @reverse-contact/sdk retry failed requests?
Yes. @reverse-contact/sdk retries per-minute rate limits and 500, 502, 503 and 504 errors up to 4 times, after the delay the API asks for or with exponential backoff. It never retries daily limits, API key credit limits, missing credits or any other 4xx error except 409 IDEMPOTENCY_KEY_IN_USE.
How do I cap the credits a Reverse Contact search spends?
Call a free count method first, such as client.search.countPeople(). Then read results with a search iterator such as client.search.iterPeople(). The required maxResults option caps the number of profiles requested and billed.
How do I wait for a live fetch or Find Email result with the SDK?
Call task.wait() on the task that client.fetch.personLive() or client.contact.findEmail() returns. It polls for free until the task ends, 30 minutes at most by default, and raises TaskFailedError when the task fails. Save task.id first, to resume with client.tasks.wait() after a restart.
Last verified