1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "urls": [
10 "https://www.gumtree.com/cars-vans-motorbikes/cars/uk/london",
11 "https://www.gumtree.com/cars-vans-motorbikes/cars/uk",
12 "https://www.gumtree.com/for-sale/uk",
13 "https://www.gumtree.com/for-sale/uk/london",
14 "https://www.gumtree.com/jobs/uk/london",
15 "https://www.gumtree.com/pets/uk/london",
16 "https://www.gumtree.com/property-to-rent/london",
17 "https://www.gumtree.com/cars-vans-motorbikes/cars/uk/london/page2",
18 "https://www.gumtree.com/cars-vans-motorbikes/cars/uk/london?sort=price_lowest_first&min_price=1000&max_price=5000",
19 "https://www.gumtree.com/search?search_category=all&q=iphone&search_location=london",
20 "https://www.gumtree.com/search?search_category=all&q=ford+focus",
21 "https://www.gumtree.com/search?q=iphone&search_location=london&page=2",
22 "https://www.gumtree.com/p/iphone/apple-iphone-17-pro-unlocked/1803255814",
23 ],
24 "location": "London",
25 "proxy": { "useApifyProxy": True },
26 "ignoreFieldsForChanges": [],
27}
28
29
30run = client.actor("abotapi/gumtree-uk-scraper").call(run_input=run_input)
31
32
33print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
34for item in client.dataset(run.default_dataset_id).iterate_items():
35 print(item)
36
37