Skip to content

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

SDKs // Python // Get started

Python SDK

Last verified

Use the official Reverse Contact Python SDK to enrich profiles, search within a budget, manage Lists and Bulk jobs, 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 jobs, 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.3.0.

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()
People auto-suggestionclient.search.people_auto_suggestion()
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()
Bulk enrichmentclient.bulk.enrich_persons()
Job historyclient.bulk.list(), client.bulk.list_all()
Get a jobclient.bulk.retrieve(), client.bulk.wait()
Download job resultsclient.bulk.results()
Read job results by pageclient.bulk.rows(), client.bulk.iter_rows()
Cancel a jobclient.bulk.cancel()
Polling a jobclient.jobs.retrieve(), client.jobs.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 enrichment examples are in Lists and Bulk enrichment 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 jobs: live fetch, Find Email and Find Phone

Save job.id, then call job.wait() to poll for free. The default deadline is 30 minutes. Failed jobs raise JobFailedError. See the examples in Async jobs: 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 enrichment

Lists and Bulk enrichment shows how to manage persistent Lists, run Bulk jobs, 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 job.wait() on the job that client.fetch.person_live() or client.contact.find_email() returns. The method polls for free until the job ends, up to 30 minutes by default. A failed job raises JobFailedError. Save job.id first so you can resume with client.jobs.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.