from apify_client import ApifyClient

client = ApifyClient("apify_api_Jdz4oXklx63ka85STsT9GwM56Giini3tye2s")

run_input = { "usernames": ["andrianirinadavida"] }

run = client.actor("apify/instagram-profile-scraper").call(run_input=run_input)

for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    username = item.get('username', 'N/A')
    followers_count = item.get('followersCount', 'N/A')
    follows_count = item.get('followsCount', 'N/A')
    posts_count = item.get('postsCount', 'N/A')
    
    print(f"Username: {username}")
    print(f"Followers Count: {followers_count}")
    print(f"Follows Count: {follows_count}")
    print(f"Posts Count: {posts_count}")
