Skip to content

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

SDKs // Python // Resources

client.fetch

Last verified

Fetch cached or live person and company profiles with the Python SDK, check profile status, and inspect each method, return type, error and cost.

Read cached person or company profiles, check availability, or start a live fetch job.

MethodEndpointCost
person()POST /v2/fetch/persons1 credit when the profile is found in the cache. A 404 is free.
person_live()POST /v2/fetch/persons/live2 credits per request, consumed when the job is created.
check_person()POST /v2/fetch/persons/checkFree. Needs at least 2 credits in the workspace: below that, 402 NO_CREDITS.
company()POST /v2/fetch/companies1 credit when the company is found in the cache. A 404 is free.
company_live()POST /v2/fetch/companies/live2 credits per request, consumed when the job is created.
check_company()POST /v2/fetch/companies/checkFree. Needs at least 2 credits in the workspace: below that, 402 NO_CREDITS.

Calling conventions

Examples assume RC_API_KEY is set. Replace example ids with ids returned by your own requests. Signatures show the published 0.3.0 synchronous methods. Use the same arguments with the Python async client.

models refers to reversecontact.types. NOT_GIVEN and NotGiven are the SDK's internal markers for omitted arguments. Leave these arguments out of your calls. For API body parameters, passing None sends an explicit null. Transport options use None to inherit their defaults. Timeout means a number of seconds or httpx.Timeout. Supply parameters marked Required to Python or to the API, even when the generated signature permits omission.

JSON response objects expose data, quotas, metadata and http_response. Check optional fields for None. See First call for the response envelope. CSV methods return text and iterators yield items.

HTTP failures raise an APIError subclass based on the response: BadRequestError, AuthenticationError, InsufficientCreditsError, PermissionDeniedError, NotFoundError, ConflictError, GoneError, UnprocessableEntityError, RateLimitError, DailyLimitError, KeyCreditLimitError, UnavailableForLegalReasonsError or InternalServerError. See the error mapping and retry rules.

person

Supply a person url or id.

Python SDK

Python SDK

def person(
    *,
    url: str | NotGiven | None = NOT_GIVEN,
    id: str | NotGiven | None = NOT_GIVEN,
    timeout: Timeout | None = None,
    max_retries: int | None = None,
    headers: Mapping[str, str] | None = None,
    **extra: object,
) -> Result[models.PersonFull] | None: ...

Parameters

NameTypeDescription
urlstr | NotGiven | NoneRequired for the selected strategy. Public Social profile URL (e.g. https://social.com/in/janedoe). Required unless id is given.
idstr | NotGiven | NoneRequired for the selected strategy. Reverse Contact person id from a previous response (e.g. prs_01jbd5vewyenebxgaz869ffe5t). Required unless url is given.
timeoutTimeout | NoneOptional. Seconds per HTTP attempt, or httpx.Timeout. Uses the client setting when None.
max_retriesint | NoneOptional. Retries after the first HTTP attempt. Uses the client setting when None.
headersMapping[str, str] | NoneOptional. Additional HTTP headers for this call.
**extraobjectOptional. Additional API keyword arguments, including camelCase aliases, passed through to the API.

Returns

Result[models.PersonFull] | None. data is the cached person profile. A no-match lookup returns None at no credit cost.

Errors

APIError subclasses follow the HTTP mapping above. APIConnectionError reports transport failures. APITimeoutError reports timed-out attempts. ReverseContactError covers invalid SDK options. No-match 404 responses return None. Other 404 responses raise NotFoundError. Malformed typed response data can raise Pydantic ValidationError.

Example

Python SDK

Python SDK

from reversecontact import ReverseContact

with ReverseContact() as client:
    result = client.fetch.person(url="https://social.com/in/janedoe")
    print(result.data if result is not None else None)

person_live

Start an asynchronous enrichment job with a person url or id.

Python SDK

Python SDK

def person_live(
    *,
    url: str | NotGiven | None = NOT_GIVEN,
    id: str | NotGiven | None = NOT_GIVEN,
    webhook_url: str | NotGiven | None = NOT_GIVEN,
    timeout: Timeout | None = None,
    max_retries: int | None = None,
    headers: Mapping[str, str] | None = None,
    **extra: object,
) -> Job[models.PersonFull]: ...

Parameters

NameTypeDescription
urlstr | NotGiven | NoneRequired for the selected strategy. Public Social profile URL (e.g. https://social.com/in/janedoe). Provide exactly one of url or id.
idstr | NotGiven | NoneRequired for the selected strategy. Reverse Contact person id (prs_…). The gateway resolves it to the current Social public slug before starting the scrape.
webhook_urlstr | NotGiven | NoneOptional. HTTPS push URL for webhook delivery. Omit this field to retrieve the result via polling (recommended). See the Webhooks guide when you need push delivery.
timeoutTimeout | NoneOptional. Seconds per HTTP attempt, or httpx.Timeout. Uses the client setting when None.
max_retriesint | NoneOptional. Retries after the first HTTP attempt. Uses the client setting when None.
headersMapping[str, str] | NoneOptional. Additional HTTP headers for this call.
**extraobjectOptional. Additional API keyword arguments, including camelCase aliases, passed through to the API.

Returns

Job[models.PersonFull]. A job acknowledgement with id, data, quotas, metadata, http_response and replayed. Save job.id before waiting. Call job.wait() to get Result[JobSnapshot[T]] with the final value in data.result. See Async jobs for details.

Errors

APIError subclasses follow the HTTP mapping above. APIConnectionError reports transport failures. APITimeoutError reports timed-out attempts. ReverseContactError covers invalid SDK options or a missing job id in the acknowledgement. wait() raises JobFailedError for an errored job and JobTimeoutError when its overall deadline expires. Malformed typed response data can raise Pydantic ValidationError.

Example

Python SDK

Python SDK

from reversecontact import ReverseContact

with ReverseContact() as client:
    job = client.fetch.person_live(url="https://social.com/in/janedoe")
    print("Save this job id:", job.id)
    done = job.wait()
    print(done.data.result if done.data else None)

check_person

Supply a person url or id. The call is free but requires at least 2 credits in the workspace.

Python SDK

Python SDK

def check_person(
    *,
    url: str | NotGiven | None = NOT_GIVEN,
    id: str | NotGiven | None = NOT_GIVEN,
    timeout: Timeout | None = None,
    max_retries: int | None = None,
    headers: Mapping[str, str] | None = None,
    **extra: object,
) -> Result[models.CheckPersonData]: ...

Parameters

NameTypeDescription
urlstr | NotGiven | NoneRequired for the selected strategy. Public Social profile URL (e.g. https://social.com/in/janedoe). Required unless id is given.
idstr | NotGiven | NoneRequired for the selected strategy. Reverse Contact person id from a previous response (e.g. prs_01jbd5vewyenebxgaz869ffe5t). Required unless url is given.
timeoutTimeout | NoneOptional. Seconds per HTTP attempt, or httpx.Timeout. Uses the client setting when None.
max_retriesint | NoneOptional. Retries after the first HTTP attempt. Uses the client setting when None.
headersMapping[str, str] | NoneOptional. Additional HTTP headers for this call.
**extraobjectOptional. Additional API keyword arguments, including camelCase aliases, passed through to the API.

Returns

Result[models.CheckPersonData]. data contains exists, last_update, experience_count, skill_count and school_count.

Errors

APIError subclasses follow the HTTP mapping above. APIConnectionError reports transport failures. APITimeoutError reports timed-out attempts. ReverseContactError covers invalid SDK options. Malformed typed response data can raise Pydantic ValidationError.

Example

Python SDK

Python SDK

from reversecontact import ReverseContact

with ReverseContact() as client:
    result = client.fetch.check_person(url="https://social.com/in/janedoe")
    print(result.data if result is not None else None)

company

Supply a company url or id.

Python SDK

Python SDK

def company(
    *,
    url: str | NotGiven | None = NOT_GIVEN,
    id: str | NotGiven | None = NOT_GIVEN,
    timeout: Timeout | None = None,
    max_retries: int | None = None,
    headers: Mapping[str, str] | None = None,
    **extra: object,
) -> Result[models.CompanyFull] | None: ...

Parameters

NameTypeDescription
urlstr | NotGiven | NoneRequired for the selected strategy. Public Social company URL (e.g. https://social.com/company/acme-corp). Required unless id is given.
idstr | NotGiven | NoneRequired for the selected strategy. Reverse Contact company id from a previous response (e.g. com_01jbd5vewyenebxgaz869ffe5t). Required unless url is given.
timeoutTimeout | NoneOptional. Seconds per HTTP attempt, or httpx.Timeout. Uses the client setting when None.
max_retriesint | NoneOptional. Retries after the first HTTP attempt. Uses the client setting when None.
headersMapping[str, str] | NoneOptional. Additional HTTP headers for this call.
**extraobjectOptional. Additional API keyword arguments, including camelCase aliases, passed through to the API.

Returns

Result[models.CompanyFull] | None. data is the cached company profile. A no-match lookup returns None at no credit cost.

Errors

APIError subclasses follow the HTTP mapping above. APIConnectionError reports transport failures. APITimeoutError reports timed-out attempts. ReverseContactError covers invalid SDK options. No-match 404 responses return None. Other 404 responses raise NotFoundError. Malformed typed response data can raise Pydantic ValidationError.

Example

Python SDK

Python SDK

from reversecontact import ReverseContact

with ReverseContact() as client:
    result = client.fetch.company(url="https://social.com/company/acme")
    print(result.data if result is not None else None)

company_live

Start an asynchronous enrichment job with a company url or id.

Python SDK

Python SDK

def company_live(
    *,
    url: str | NotGiven | None = NOT_GIVEN,
    id: str | NotGiven | None = NOT_GIVEN,
    webhook_url: str | NotGiven | None = NOT_GIVEN,
    timeout: Timeout | None = None,
    max_retries: int | None = None,
    headers: Mapping[str, str] | None = None,
    **extra: object,
) -> Job[models.CompanyFull]: ...

Parameters

NameTypeDescription
urlstr | NotGiven | NoneRequired for the selected strategy. Public Social company URL (e.g. https://social.com/company/acme-corp). Provide exactly one of url or id.
idstr | NotGiven | NoneRequired for the selected strategy. Reverse Contact company id (com_…). The gateway resolves it to the current Social public slug before starting the scrape.
webhook_urlstr | NotGiven | NoneOptional. HTTPS push URL for webhook delivery. Omit this field to retrieve the result via polling (recommended). See the Webhooks guide when you need push delivery.
timeoutTimeout | NoneOptional. Seconds per HTTP attempt, or httpx.Timeout. Uses the client setting when None.
max_retriesint | NoneOptional. Retries after the first HTTP attempt. Uses the client setting when None.
headersMapping[str, str] | NoneOptional. Additional HTTP headers for this call.
**extraobjectOptional. Additional API keyword arguments, including camelCase aliases, passed through to the API.

Returns

Job[models.CompanyFull]. A job acknowledgement with id, data, quotas, metadata, http_response and replayed. Save job.id before waiting. Call job.wait() to get Result[JobSnapshot[T]] with the final value in data.result. See Async jobs for details.

Errors

APIError subclasses follow the HTTP mapping above. APIConnectionError reports transport failures. APITimeoutError reports timed-out attempts. ReverseContactError covers invalid SDK options or a missing job id in the acknowledgement. wait() raises JobFailedError for an errored job and JobTimeoutError when its overall deadline expires. Malformed typed response data can raise Pydantic ValidationError.

Example

Python SDK

Python SDK

from reversecontact import ReverseContact

with ReverseContact() as client:
    job = client.fetch.company_live(url="https://social.com/company/acme")
    print("Save this job id:", job.id)
    done = job.wait()
    print(done.data.result if done.data else None)

check_company

Supply a company url or id. The call is free but requires at least 2 credits in the workspace.

Python SDK

Python SDK

def check_company(
    *,
    url: str | NotGiven | None = NOT_GIVEN,
    id: str | NotGiven | None = NOT_GIVEN,
    timeout: Timeout | None = None,
    max_retries: int | None = None,
    headers: Mapping[str, str] | None = None,
    **extra: object,
) -> Result[models.CheckCompanyData]: ...

Parameters

NameTypeDescription
urlstr | NotGiven | NoneRequired for the selected strategy. Public Social company URL (e.g. https://social.com/company/acme-corp). Required unless id is given.
idstr | NotGiven | NoneRequired for the selected strategy. Reverse Contact company id from a previous response (e.g. com_01jbd5vewyenebxgaz869ffe5t). Required unless url is given.
timeoutTimeout | NoneOptional. Seconds per HTTP attempt, or httpx.Timeout. Uses the client setting when None.
max_retriesint | NoneOptional. Retries after the first HTTP attempt. Uses the client setting when None.
headersMapping[str, str] | NoneOptional. Additional HTTP headers for this call.
**extraobjectOptional. Additional API keyword arguments, including camelCase aliases, passed through to the API.

Returns

Result[models.CheckCompanyData]. data contains exists, last_update and speciality_count.

Errors

APIError subclasses follow the HTTP mapping above. APIConnectionError reports transport failures. APITimeoutError reports timed-out attempts. ReverseContactError covers invalid SDK options. Malformed typed response data can raise Pydantic ValidationError.

Example

Python SDK

Python SDK

from reversecontact import ReverseContact

with ReverseContact() as client:
    result = client.fetch.check_company(url="https://social.com/company/acme")
    print(result.data if result is not None else None)

See the Python SDK overview, Async jobs and Jobs.

FAQ

How do I fetch a cached person profile in Python?

Call client.fetch.person() with url or id. The profile is in result.data. A no-match response is None and costs no credits.

How do I wait for a live profile in Python?

Call wait() on the job returned by client.fetch.person_live() or client.fetch.company_live(). Save job.id before waiting to resume polling later.

Does checking profile status cost credits?

client.fetch.check_person() and client.fetch.check_company() are free, but the workspace must have at least 2 credits.