1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "queries": [
12 "spice wholesaler Hamburg",
13 "rice trader Deira",
14 "spice importer Hamburg"
15 ],
16 "maxGoogleRequests": 25,
17 "maxPerQuery": 20,
18 "sourceMode": "list",
19 "itemsList": [
20 {
21 "placeId": "demo-place-hh-0001",
22 "name": "Hanse Spice Import GmbH (sample)",
23 "address": "Demo-Kai 12, 20457 Hamburg, Germany",
24 "city": "Hamburg",
25 "postalCode": "20457",
26 "country": "DE",
27 "internationalPhoneNumber": "+49 40 9990 0101",
28 "nationalPhoneNumber": "040 99900101",
29 "website": "https://hanse-spice-import.example",
30 "rating": 3.9,
31 "reviewCount": 23,
32 "types": [
33 "wholesaler",
34 "store",
35 "point_of_interest",
36 "establishment"
37 ],
38 "primaryType": "wholesaler",
39 "category": "Wholesaler",
40 "businessStatus": "OPERATIONAL",
41 "placeUrl": "https://www.google.com/maps/search/?api=1&query=Hanse+Spice+Import+GmbH+Hamburg",
42 "url": "https://www.google.com/maps/place/Speicherstadt,+Hamburg,+Germany",
43 "foundBy": [
44 "spice wholesaler Hamburg",
45 "spice importer Hamburg"
46 ],
47 "bestEmail": "einkauf@hanse-spice-import.example",
48 "emails": [
49 "einkauf@hanse-spice-import.example",
50 "info@hanse-spice-import.example"
51 ],
52 "emailStatus": "sample",
53 "emailSource": "https://hanse-spice-import.example/impressum",
54 "description": "Sample business (invented). Importer of whole and ground spices from India, Vietnam and Sri Lanka: black pepper, cumin, turmeric, cardamom. Supplies food manufacturers and retailers in Northern Germany from its Hamburg warehouse."
55 },
56 {
57 "placeId": "demo-place-hh-0002",
58 "name": "Elbe Gewürzhandel KG (sample)",
59 "address": "Musterstraße 4, 22113 Hamburg, Germany",
60 "city": "Hamburg",
61 "postalCode": "22113",
62 "country": "DE",
63 "internationalPhoneNumber": "+49 40 9990 0202",
64 "nationalPhoneNumber": "040 99900202",
65 "rating": 4.2,
66 "reviewCount": 3,
67 "types": [
68 "food_store",
69 "store",
70 "point_of_interest",
71 "establishment"
72 ],
73 "primaryType": "food_store",
74 "category": "Spice store",
75 "businessStatus": "OPERATIONAL",
76 "placeUrl": "https://www.google.com/maps/search/?api=1&query=Elbe+Gew%C3%BCrzhandel+KG+Hamburg",
77 "foundBy": [
78 "spice wholesaler Hamburg"
79 ],
80 "website": "https://elbe-gewuerzhandel.example",
81 "bestEmail": "verkauf@elbe-gewuerzhandel.example",
82 "emails": [
83 "verkauf@elbe-gewuerzhandel.example"
84 ],
85 "emailStatus": "sample",
86 "emailSource": "https://elbe-gewuerzhandel.example/kontakt",
87 "description": "Sample business (invented). Spice wholesale trade since 1998: whole and seed spices, chilli and curry blends in 1 kg to 25 kg sacks for butchers, bakeries and Asian grocery stores in Hamburg and Schleswig-Holstein. Trade customers only."
88 },
89 {
90 "placeId": "demo-place-hh-0003",
91 "name": "Speicherstadt Curry House (sample)",
92 "address": "Beispielweg 9, 20457 Hamburg, Germany",
93 "city": "Hamburg",
94 "postalCode": "20457",
95 "country": "DE",
96 "internationalPhoneNumber": "+49 40 9990 0303",
97 "website": "https://speicherstadt-curry.example",
98 "rating": 4.4,
99 "reviewCount": 310,
100 "types": [
101 "indian_restaurant",
102 "restaurant",
103 "food",
104 "point_of_interest",
105 "establishment"
106 ],
107 "primaryType": "indian_restaurant",
108 "category": "Indian restaurant",
109 "businessStatus": "OPERATIONAL",
110 "placeUrl": "https://www.google.com/maps/search/?api=1&query=Speicherstadt+Curry+House+Hamburg",
111 "foundBy": [
112 "spice wholesaler Hamburg"
113 ]
114 },
115 {
116 "placeId": "demo-place-dxb-0004",
117 "name": "Al Noor Rice Trading L.L.C (sample)",
118 "address": "Demo Building 7, Al Ras, Deira, Dubai, United Arab Emirates",
119 "city": "Dubai",
120 "country": "AE",
121 "internationalPhoneNumber": "+971 4 999 0404",
122 "nationalPhoneNumber": "04 999 0404",
123 "website": "https://alnoor-rice-trading.example",
124 "reviewCount": 3,
125 "types": [
126 "store",
127 "point_of_interest",
128 "establishment"
129 ],
130 "primaryType": "store",
131 "category": "Rice wholesaler",
132 "businessStatus": "OPERATIONAL",
133 "placeUrl": "https://www.google.com/maps/search/?api=1&query=Al+Noor+Rice+Trading+L.L.C+Dubai",
134 "url": "https://www.google.com/maps/place/Spice+Souk,+Deira,+Dubai",
135 "foundBy": [
136 "rice trader Deira"
137 ],
138 "bestEmail": "sales@alnoor-rice-trading.example",
139 "emails": [
140 "sales@alnoor-rice-trading.example"
141 ],
142 "emailStatus": "sample",
143 "emailSource": "https://alnoor-rice-trading.example/contact",
144 "description": "Sample business (invented). Rice trading company in Al Ras, Deira: Indian basmati 1121 and sella, Pakistani long grain, in 5 kg to 40 kg bags. Re-exports to Oman, Qatar and East Africa."
145 },
146 {
147 "placeId": "demo-place-dxb-0005",
148 "name": "Gulf Grain Foodstuff Trading (sample)",
149 "address": "Example Street 21, Naif, Deira, Dubai, United Arab Emirates",
150 "city": "Dubai",
151 "country": "AE",
152 "internationalPhoneNumber": "+971 4 999 0505",
153 "reviewCount": 0,
154 "types": [
155 "wholesaler",
156 "point_of_interest",
157 "establishment"
158 ],
159 "primaryType": "wholesaler",
160 "category": "Wholesaler",
161 "businessStatus": "OPERATIONAL",
162 "placeUrl": "https://www.google.com/maps/search/?api=1&query=Gulf+Grain+Foodstuff+Trading+Dubai",
163 "foundBy": [
164 "rice trader Deira"
165 ],
166 "website": "https://gulf-grain-trading.example",
167 "description": "Sample business (invented). Foodstuff trading house in Naif, Deira: rice, sugar, lentils and cooking oil by the container and the pallet for supermarkets and restaurants across the UAE."
168 },
169 {
170 "placeId": "demo-place-dxb-0006",
171 "name": "Creekside Business Centre (sample)",
172 "address": "Demo Tower, Port Saeed, Deira, Dubai, United Arab Emirates",
173 "city": "Dubai",
174 "country": "AE",
175 "reviewCount": 2,
176 "types": [
177 "point_of_interest",
178 "establishment"
179 ],
180 "businessStatus": "OPERATIONAL",
181 "placeUrl": "https://www.google.com/maps/search/?api=1&query=Creekside+Business+Centre+Dubai",
182 "foundBy": [
183 "rice trader Deira"
184 ]
185 }
186 ],
187 "maxDiscoveryChargeUsd": 0.5
188};
189
190
191const run = await client.actor("rich_minds/local-business-leads-ai").call(input);
192
193
194console.log('Results from dataset');
195console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
196const { items } = await client.dataset(run.defaultDatasetId).listItems();
197items.forEach((item) => {
198 console.dir(item);
199});
200
201