1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "startUrls": [
10 { "url": "https://www.costco.com/kirkland-signature-paper-towels%2c-2-ply%2c-160-sheets%2c-12-individually-wrapped-rolls.product.100234271.html" },
11 { "url": "https://www.costco.com/p/-/kirkland-signature-organic-extra-virgin-olive-oil-2-l/100334841" },
12 { "url": "https://www.costco.com/kirkland-signature-100%25-colombian-coffee%2c-dark-roast%2c-1.75-oz%2c-42-count.product.100216589.html" },
13 ],
14 "maxItems": 25,
15 "maxItemsPerStartUrl": 25,
16 "maxSearchPagesPerStartUrl": 2,
17 "proxyConfiguration": {
18 "useApifyProxy": True,
19 "apifyProxyGroups": ["RESIDENTIAL"],
20 "apifyProxyCountry": "US",
21 },
22}
23
24
25run = client.actor("cirkit/costco-product-scraper").call(run_input=run_input)
26
27
28print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
29for item in client.dataset(run.default_dataset_id).iterate_items():
30 print(item)
31
32