Skip to content

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

SDKs // Python // Guides

Filter values as constants

Last verified

Use Python string enums for industries, countries, job functions and other fixed search filters, while still accepting new API values as strings.

From version 0.1.6, you can use string enums for values from fixed lists: Industry, CountryCode, JobFunction, JobSubFunction, Seniority, ContractType, Area and EmailType. Each member equals its string value: Industry.SOFTWARE_DEVELOPMENT == "Software Development".

Member names use the value in capitals, with _ for spaces and punctuation and AND for &. Examples include Seniority.OWNER_FOUNDER, Area.MC_DACH and ContractType.FULL_TIME.

Python SDK

Filter with constants

import os

from reversecontact import Area, Industry, ReverseContact, Seniority

with ReverseContact(api_key=os.environ["RC_API_KEY"]) as client:
    count = client.search.count_people(
        current_company_industry=Industry.SOFTWARE_DEVELOPMENT,
        current_seniority=[Seniority.CXO, Seniority.OWNER_FOUNDER],
        location={"area": Area.MC_DACH},
    )
    print("Matches:", count.data.count if count.data else None)

Filters also accept plain strings. You can use a value added to a list after your SDK version without updating the package. A value the API does not know returns HTTP 422 and costs 0 credits.

Read available values

Call people_fields() or organizations_fields() on client.search to read the API's available search fields and allowed values. Both calls are free.

The package also exports EmailVerificationStatus for Verify Email verdicts. This enum describes results rather than search filters. For an example of searching with filters, see Search within a budget.

Return to the Python SDK overview.

FAQ

Which filter enums does the Python SDK export?

The SDK exports Industry, CountryCode, JobFunction, JobSubFunction, Seniority, ContractType, Area and EmailType as string enums.

Can I pass a string instead of a Python SDK enum?

Filters accept plain strings, so newly supported API values work without upgrading the SDK. An unknown API value returns HTTP 422 and costs no credits.

How do I list allowed search values in Python?

Call client.search.people_fields() or client.search.organizations_fields() to read the API's available fields and allowed values at no credit cost.