Skip to content

Latest commit

 

History

History
32 lines (21 loc) · 1.48 KB

File metadata and controls

32 lines (21 loc) · 1.48 KB
id access-apify-api
title Accessing Apify API
description Use the built-in Apify API client to access platform features not covered by the SDK.

import RunnableCodeBlock from '@site/src/components/RunnableCodeBlock';

import ActorClientExample from '!!raw-loader!roa-loader!./code/08_actor_client.py'; import ActorNewClientExample from '!!raw-loader!roa-loader!./code/08_actor_new_client.py';

The Apify SDK provides a built-in instance of the Apify API Client for accessing Apify platform features beyond what the SDK covers directly.

Actor client

To access the provided instance of ApifyClientAsync, you can use the Actor.apify_client property.

For example, to get the details of your user, you can use this snippet:

{ActorClientExample}

Actor new client

If you want to create a completely new instance of the client, for example, to get a client for a different user or change the configuration of the client, you can use the Actor.new_client method:

{ActorNewClientExample}

For the full API client documentation, see the Apify API Client for Python.