Skip to content

Use the official Reverse Contact Python SDK to enrich profiles, search within a budget, manage Lists and Bulk tasks, and wait for async results.

Introduction

reversecontact is the official Python client for the Reverse Contact API. You can call every API endpoint with typed models. The SDK handles safe retries, waits for asynchronous tasks, and pages through search results within a budget you set. Choose the synchronous client, ReverseContact, or the asynchronous client, AsyncReverseContact. Both have the same methods.

The SDK needs Python 3.11 or later. These pages document reversecontact 0.4.1.

Install

Install

Install

pip install reversecontact

API key

Set RC_API_KEY or pass api_key to the client. Keep the key server-side. Follow Install and configure to set up your client.

First call

This lookup costs 2 credits when a person is found and nothing when no profile matches. With RC_API_KEY set:

Python SDK

Python SDK

from reversecontact import ReverseContact

with ReverseContact() as client:
    result = client.enrich.person(email="jane.doe@acme.com")
    if result is None:
        print("No confident match: nothing was charged")
    elif result.data and result.data.person:
        print(result.data.person.first_name, result.data.person.last_name)

First call explains the response fields, credit usage and request ids.

Endpoints and methods

EndpointMethod
Enrich profileclient.enrich.person()
Enrich companyclient.enrich.company()
Person profileclient.fetch.person()
Person profile liveclient.fetch.person_live()
Person profile statusclient.fetch.check_person()
Company profileclient.fetch.company()
Company profile liveclient.fetch.company_live()
Company profile statusclient.fetch.check_company()
People searchclient.search.people(), client.search.iter_people()
Agentic Searchclient.search.people_by_prompt(), client.search.iter_people_by_prompt()
People lookalikeclient.search.people_lookalike(), client.search.iter_people_lookalike()
People search countclient.search.count_people()
Search autocomplete for your productclient.search.people_auto_completion_fields()
People search available fieldsclient.search.people_fields()
Company searchclient.search.organizations(), client.search.iter_organizations()
Agentic Company Searchclient.search.organizations_by_prompt(), client.search.iter_organizations_by_prompt()
Company search countclient.search.count_organizations()
Company search available fieldsclient.search.organizations_fields()
Find Emailclient.contact.find_email()
Verify Emailclient.contact.verify_email()
Find Phoneclient.contact.find_phone()
All Listsclient.lists.list(), client.lists.list_all()
Create a Listclient.lists.create()
Get a Listclient.lists.retrieve()
Delete a Listclient.lists.delete()
List membersclient.lists.members.list(), client.lists.members.list_all()
Add membersclient.lists.members.add()
Remove membersclient.lists.members.remove()
Import members and dataclient.lists.import_signals()
Read a List operationclient.lists.operations.retrieve(), client.lists.operations.wait()
Cancel a List operationclient.lists.operations.cancel()
Export a Listclient.lists.export()
Bulkclient.bulk.enrich_persons()
Task historyclient.bulk.list(), client.bulk.list_all()
Get a taskclient.bulk.retrieve(), client.bulk.wait()
Download task resultsclient.bulk.results()
Read task results by pageclient.bulk.rows(), client.bulk.iter_rows()
Cancel a taskclient.bulk.cancel()
Polling a taskclient.tasks.retrieve(), client.tasks.wait()
Usageclient.usage.retrieve()

Each endpoint page shows its call in the Python SDK tab of its code examples. For now, the List and Bulk examples are in Lists and Bulk instead.

Where to go next

Async client

Use AsyncReverseContact with await and async for, as shown in Async client.

Lookups that find nothing

Enrich and cached Fetch return None when no profile matches, at no credit cost. See how to handle lookups that find nothing.

Async tasks: live fetch, Find Email and Find Phone

Save task.id, then call task.wait() to poll for free. The default deadline is 30 minutes. Failed tasks raise TaskFailedError. See the examples in Async tasks: live fetch, Find Email and Find Phone.

Webhook delivery instead of polling

Pass webhook_url and parse callbacks with parse_webhook_delivery, as shown in Webhook delivery.

Lists and Bulk

Lists and Bulk shows how to manage persistent Lists, run Bulk tasks, and read their results as they come or export them.

Search within a budget

Count for free, then cap paid results with the search iterator's required max_results argument. Follow the example in Search within a budget.

Filter values as constants

Use string enums for fixed search values or pass plain strings.

Errors and retries

The SDK retries per-minute rate limits and HTTP 500, 502, 503 and 504 up to four times. Daily limits, key credit limits, insufficient credits and other 4xx responses are not retried, except contact 409 IDEMPOTENCY_KEY_IN_USE. Read Errors and retries.

Safe retries on Find Email and Find Phone

Contact methods generate idempotency keys and reuse them on retries. See how this makes retries safe on Find Email and Find Phone.

Timeouts and cancellation

Timeouts and cancellation covers per-request timeouts, overall polling deadlines and cancelling local asyncio waits.

Client options

Configure connection pools, defaults and logging with Client options.

Without the SDK

To use an HTTPS client and the published OpenAPI specification, see Without the SDK.

FAQ

Is there an official Reverse Contact SDK?

Yes. The official Python SDK is reversecontact on PyPI and requires Python 3.11 or later. Install the package with pip install reversecontact. Choose the synchronous client, ReverseContact, or the asynchronous client, AsyncReverseContact. For TypeScript and JavaScript, the official SDK is @reverse-contact/sdk on npm.

Does the reversecontact Python SDK retry failed requests?

Yes. The reversecontact 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 in Python?

Call a free count method first, such as client.search.count_people(). Then read results with a search iterator such as client.search.iter_people(). The required max_results argument caps the number of profiles requested and billed.

How do I wait for a live fetch or Find Email result in Python?

Call task.wait() on the task that client.fetch.person_live() or client.contact.find_email() returns. The method polls for free until the task ends, up to 30 minutes by default. A failed task raises TaskFailedError. Save task.id first so you can resume with client.tasks.wait() after a restart.

What does the reversecontact SDK return when a lookup finds nothing?

client.enrich.person(), client.enrich.company(), client.fetch.person() and client.fetch.company() return None when nothing matches. That answer costs no credits, so there is nothing to retry.

Last verified