1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "country": "US",
10 "enableCategorySearch": True,
11 "searchKeywords": [
12 "payroll software",
13 "seo tools",
14 "antivirus",
15 ],
16 "searchMaxResults": 10,
17 "searchFetchFullDetails": False,
18 "enableCategoryDetails": False,
19 "categoryUrls": [],
20 "enableReviews": False,
21 "reviewUrls": [],
22 "enableScrapeByUrl": False,
23 "scrapeUrls": ["https://www.local.com/seo-tools"],
24 "webhookFormat": "json",
25 "proxyConfiguration": {
26 "useApifyProxy": True,
27 "apifyProxyGroups": ["RESIDENTIAL"],
28 "apifyProxyCountry": "US",
29 },
30}
31
32
33run = client.actor("b2b_leads/local-real-time-data-scraper").call(run_input=run_input)
34
35
36print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
37for item in client.dataset(run.default_dataset_id).iterate_items():
38 print(item)
39
40