Apify API client for Python
Apify API client for Python.
The Apify API Client for Python is the official library to access Apify API from your Python applications. It provides useful features like automatic retries and convenience functions to improve your experience with the Apify API.
pip install apify-client
For example, the Apify API Client for Python makes it easy to run your own actors or actors from the Apify Store by simply using the
.call() method to start an actor and wait for it to finish.
from apify_client import ApifyClient
apify_client = ApifyClient('MY-APIFY-TOKEN')
# Start an actor and wait for it to finish
actor_call = apify_client.actor('john-doe/my-cool-actor').call()
# Fetch results from the actor run's default dataset
dataset_items = apify_client.dataset(actor_call['defaultDatasetId']).list_items().items