1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "includePostcodes": ["T6R*"],
10 "excludePostcodes": ["T6R 0A1"],
11 "countryCodes": ["CA"],
12 "data": [
13 {
14 "title": "Synthetic kept lead",
15 "postalCode": "t6r 2v4",
16 "countryCode": "CA",
17 },
18 {
19 "title": "Synthetic excluded lead",
20 "postalCode": "T6R 0A1",
21 "countryCode": "CA",
22 },
23 {
24 "title": "Synthetic outside lead",
25 "postalCode": "T5J 0N3",
26 "countryCode": "CA",
27 },
28 {
29 "title": "Synthetic missing postcode",
30 "countryCode": "CA",
31 },
32 ],
33}
34
35
36run = client.actor("mrtronson/google-maps-postcode-filter").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