!!!Joefree!!! 👑!

Checking actor accessibility

How to check if we have access to an actor, whether have trial access, free access or not have access at all.

For example:
client = ApifyClient(os.environ['APIFY_TOKEN'], api_url=os.environ['APIFY_API_BASE_URL'])
actor = client.actor('username/actor-name')  # other actor
info = actor.get()
if not info:
        print('ACTOR DOES NOT EXIST')
elif not actor.haveaccess(): # mock function. do we have access to the actor ?
        print('ACCESS DENIED')
else:
        print('GOOD TO GO')
        main_scraper() # run current actor
Was this page helpful?