1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "mode": "search",
10 "queries": ["valves"],
11 "urls": [
12 "https://www.thomasnet.com/suppliers/search?searchterm=valves&what=valves&cov=NA",
13 "https://www.thomasnet.com/suppliers/search?searchterm=valves&what=valves&cov=NA&pg=2",
14 "https://www.thomasnet.com/suppliers/search?searchterm=valves&what=valves&cov=NA&pg=2&heading=90370206",
15 "https://www.thomasnet.com/suppliers/usa/valves",
16 "https://www.thomasnet.com/suppliers/search?searchterm=valves&what=valves&cov=NA&where=OH",
17 "https://www.thomasnet.com/suppliers/search?searchterm=valves&what=valves&cov=NA&sort=company_az",
18 "https://www.thomasnet.com/suppliers/search?searchterm=valves&cov=NA&zip=44023&radius=50",
19 "https://www.thomasnet.com/suppliers/search?searchterm=valves&what=valves&cov=NA&ctype=M",
20 "https://www.thomasnet.com/suppliers/usa/ball-valves-90370206",
21 "https://www.thomasnet.com/suppliers/usa/ball-valves-90370206?pg=2",
22 "https://www.thomasnet.com/company/valve-parts-usa-ltd-30875713/profile",
23 "https://www.thomasnet.com/company/modern-fluid-power-inc-564168/brands?heading=90052002",
24 "https://www.thomasnet.com/profile/30875713",
25 "https://www.thomasnet.com/profile/720475",
26 "https://www.thomasnet.com/catalogs/valves-72190305",
27 "https://www.thomasnet.com/company/w-p-law-inc-19686/profile",
28 ],
29 "proxy": {
30 "useApifyProxy": True,
31 "apifyProxyGroups": [],
32 },
33 "incrementalMode": False,
34 "emitUnchanged": False,
35 "ignoreFieldsForChanges": [],
36}
37
38
39run = client.actor("abotapi/thomasnet-supplier-scraper").call(run_input=run_input)
40
41
42print(f"๐พ Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
43for item in client.dataset(run.default_dataset_id).iterate_items():
44 print(item)
45
46