Hall
09/22/2024, 7:28 PMNirvanaRuns
09/22/2024, 7:28 PMRado Ch.
09/27/2024, 10:46 AMRado Ch.
09/27/2024, 10:47 AMpython
from apify_client import ApifyClient
# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")
# Prepare the Actor input
run_input = {
"profiles": ["apifyoffice"],
"resultsPerPage": 1,
}
# Run the Actor and wait for it to finish
run = client.actor("clockworks/tiktok-profile-scraper").call(run_input=run_input)
# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
print(item['authorMeta']['avatar'])
# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start