Skip to content

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

SDKs // Python // More

Without the SDK

Last verified

Call the Reverse Contact API from Python with a standard HTTPS client, authenticate with a Bearer key, and use OpenAPI to generate your own models.

The API uses JSON over HTTPS and works with any HTTP client. Send your key in an Authorization: Bearer header, as shown in the cURL examples on each endpoint page. To generate your own typed models, use the OpenAPI spec at https://docs.reversecontact.com/openapi.json.

Follow the rules in Error handling & retries and Polling. The SDK handles these for you.

Send a request with httpx

The free Usage endpoint returns workspace credit information in quotas.

Python

Python

import os

import httpx

with httpx.Client(timeout=90.0) as client:
    response = client.get(
        "https://api.reversecontact.com/v2/usage",
        headers={"Authorization": f"Bearer {os.environ['RC_API_KEY']}"},
    )
    response.raise_for_status()
    print(response.json().get("quotas"))

Install httpx in your application before running this example. Raw HTTP responses use the API's camelCase fields. The SDK converts known fields to Python model attributes for you.

Choose what your integration handles

With a raw HTTP client, implement the API's retry and polling rules in your own code. The Python SDK error guide and Async jobs explain how reversecontact handles retries and jobs. For JavaScript or TypeScript applications, see the TypeScript SDK overview.

Return to the Python SDK overview.

FAQ

Can I call Reverse Contact from Python without the SDK?

The API uses JSON over HTTPS. Any Python HTTP client can send an Authorization: Bearer header with your API key.

Where can I get the Reverse Contact OpenAPI specification?

The OpenAPI specification is published at https://docs.reversecontact.com/openapi.json for generating your own typed models.

Does a raw HTTP client handle Reverse Contact jobs automatically?

With a raw HTTP client, you write the polling and retry logic. The reversecontact SDK provides typed results, retries and job waiting.