1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "mode": "search",
10 "searchTerm": "notebook",
11 "brands": [],
12 "urls": [
13 "https://www.mediamarkt.de/de/search.html?query=samsung%20galaxy%20s24",
14 "https://www.mediamarkt.de/de/search.html?query=samsung%20galaxy%20s24&page=2",
15 "https://www.mediamarkt.de/de/search.html?query=samsung%20galaxy%20s24&sort=price",
16 "https://www.mediamarkt.de/de/search.html?query=notebook",
17 "https://www.mediamarkt.de/de/category/laptops-notebooks-362.html",
18 "https://www.mediamarkt.de/de/category/laptops-notebooks-362.html?page=2",
19 "https://www.mediamarkt.de/de/category/laptops-notebooks-362.html?sort=price&brand=APPLE",
20 "https://www.mediamarkt.de/de/category/c-362.html",
21 "https://www.mediamarkt.de/de/product/_hp-omen-17-db1351ng-173-zoll-amd-ryzentm-ai-5-340-16-gb-1-tb-nvidia-geforce-rtxtm-5060-windows-11-home-3008418.html",
22 "https://www.mediamarkt.de/de/product/_p-3008418.html",
23 "https://www.mediamarkt.de/de/search.html?query=iphone&brand=APPLE",
24 "https://mediamarkt.de/de/category/laptops-notebooks-362.html",
25 "https://www.mediamarkt.de/de/category/laptops-notebooks-362.html?searchParams=%2FSearch.ff%3Fquery%3Dnotebook",
26 ],
27 "proxy": {
28 "useApifyProxy": True,
29 "apifyProxyGroups": ["RESIDENTIAL"],
30 "apifyProxyCountry": "DE",
31 },
32 "ignoreFieldsForChanges": [],
33}
34
35
36run = client.actor("abotapi/mediamarkt-de-scraper").call(run_input=run_input)
37
38
39print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
40for item in client.dataset(run.default_dataset_id).iterate_items():
41 print(item)
42
43