Skip to main content

UserClient

Sub-client for managing user account information.

Provides methods to manage user account information, e.g. get user data or monthly usage. Obtain an instance via an appropriate method on the ApifyClient class.

Hierarchy

Index

Methods

__init__

  • __init__(*, base_url, public_base_url, http_client, resource_path, client_registry, resource_id, params): None
  • Initialize the resource client.


    Parameters

    • keyword-onlybase_url: str

      API base URL.

    • keyword-onlypublic_base_url: str

      Public CDN base URL.

    • keyword-onlyhttp_client: HttpClient

      HTTP client for making requests.

    • keyword-onlyresource_path: str

      Resource endpoint path (e.g., 'actors', 'datasets').

    • keyword-onlyclient_registry: ClientRegistry

      Bundle of client classes for dependency injection.

    • optionalkeyword-onlyresource_id: str | None = None

      Optional resource ID for single-resource clients.

    • optionalkeyword-onlyparams: dict | None = None

      Optional default parameters for all requests.

    Returns None

get

limits

monthly_usage

  • Return monthly usage of the user account.

    This includes a complete usage summary for the current usage cycle, an overall sum, as well as a daily breakdown of usage. It is the same information which is available on the account's Billing page. The information includes use of storage, data transfer, and request queue usage.

    https://docs.apify.com/api/v2/#/reference/users/monthly-usage


    Returns MonthlyUsage | None

    The retrieved request, or None, if it did not exist.

update_limits

  • update_limits(*, max_monthly_usage_usd, data_retention_days): None
  • Update the account's limits manageable on your account's Limits page.


    Parameters

    • optionalkeyword-onlymax_monthly_usage_usd: int | None = None
    • optionalkeyword-onlydata_retention_days: int | None = None

    Returns None

Properties

resource_id

resource_id: str | None

Get the resource ID.