---
title: Accessing the Apify API
sidebar_label: Accessing Apify API
---

The Apify SDK contains many useful features for making Actor development easier.
However, it does not cover all the features the Apify API offers.

For working with the Apify API directly,
you can use the provided instance of the [Apify API Client](https://docs.apify.com/api/client/python) library.

## Actor.apify_client

To access the provided instance of [`ApifyClientAsync`](https://docs.apify.com/api/client/python/reference/class/ApifyClientAsync),
you can use the [`Actor.apify_client`](../../reference/class/Actor#apify_client) property.

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

```python title="src/main.py"
from apify import Actor

async def main():
    async with Actor:
        me = await Actor.apify_client.user('me').get()
        print(me)
```

## 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()`](../../reference/class/Actor#new_client) method:

```python title="src/main.py"
from apify import Actor

async def main():
    async with Actor:
        another_users_client = Actor.new_client(token='ANOTHER_USERS_TOKEN', max_retries=2)
        them = await another_users_client.user('me').get()
        print(them)
```
