1from apify_client import ApifyClient
2
3# Initialize the ApifyClient with your Apify API token
4# Replace '<YOUR_API_TOKEN>' with your token.
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7# Prepare the Actor input
8run_input ={
9"emails":[
10"test@gmail.com",
11"admin@mailinator.com",
12"sales@example.con",
13],
14"emailsText":"""ceo@openai.com
15admin@mailinator.com
16sales@example.con""",
17"urls":[
18"https://www.apify.com",
19"https://www.openai.com",
20],
21"urlsText":"""https://www.apify.com
22https://www.openai.com""",
23"peopleText":"""Sam, Altman, openai.com
24Melanie Perkins, canva.com""",
25"candidatePatterns":[
26"first.last",
27"firstlast",
28"flast",
29"firstl",
30"last.first",
31],
32}
33
34# Run the Actor and wait for it to finish
35run = client.actor("wearable_monkey/email-risk-validator-lead-cleaner").call(run_input=run_input)
36
37# Fetch and print Actor results from the run's dataset (if there are any)
38print("πΎ Check your data here: https://console.apify.com/storage/datasets/"+ run["defaultDatasetId"])
39for item in client.dataset(run["defaultDatasetId"]).iterate_items():
40print(item)
41
42# π Want to learn more π? Go to β https://docs.apify.com/api/client/python/docs/quick-start