1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "mode": "forward",
10 "query": "Eiffel Tower, Paris, France",
11 "street": "5th Avenue",
12 "city": "New York",
13 "state": "New York",
14 "country": "United States",
15 "postalcode": "10001",
16 "limit": 5,
17 "latitude": 48.8584,
18 "longitude": 2.2945,
19 "zoom": 18,
20 "osmIds": "5013364",
21 "osmType": "W",
22 "addresses": [
23 "Times Square, New York, USA",
24 "Big Ben, London, UK",
25 "Colosseum, Rome, Italy",
26 ],
27 "coordinates": [
28 {
29 "lat": 40.758,
30 "lon": -73.9855,
31 },
32 {
33 "lat": 51.5007,
34 "lon": -0.1246,
35 },
36 {
37 "lat": 41.8902,
38 "lon": 12.4922,
39 },
40 ],
41}
42
43
44run = client.actor("agenscrape/openstreetmap-address-geocoder").call(run_input=run_input)
45
46
47print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
48for item in client.dataset(run["defaultDatasetId"]).iterate_items():
49 print(item)
50
51