1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "goalDescription": "Diesel BMW estates priced clearly under market, accident-free, under 150,000 km — cars I can resell within a month.",
12 "maxDiscoveryChargeUsd": 0.5,
13 "sourceMode": "list",
14 "itemsList": [
15 {
16 "id": "389104001",
17 "url": "https://suchen.mobile.de/fahrzeuge/details.html?id=389104001",
18 "shortTitle": "BMW 320d",
19 "subTitle": "Touring Sport Line Navi LED",
20 "make": "BMW",
21 "model": "320d",
22 "price": {
23 "value": 19490,
24 "currency": "EUR",
25 "negotiable": false
26 },
27 "attributes": [
28 {
29 "tag": "mileage",
30 "label": "Mileage",
31 "value": "96,000 km"
32 },
33 {
34 "tag": "firstRegistration",
35 "label": "First registration",
36 "value": "03/2018"
37 },
38 {
39 "tag": "power",
40 "label": "Power",
41 "value": "140 kW (190 hp)"
42 },
43 {
44 "tag": "fuel",
45 "label": "Fuel",
46 "value": "Diesel"
47 },
48 {
49 "tag": "numberOfPreviousOwners",
50 "label": "Number of vehicle owners",
51 "value": "2"
52 },
53 {
54 "tag": "hu",
55 "label": "HU",
56 "value": "03/2027"
57 },
58 {
59 "tag": "category",
60 "label": "Category",
61 "value": "Estate Car"
62 },
63 {
64 "tag": "color",
65 "label": "Colour",
66 "value": "Black"
67 }
68 ],
69 "accidentFree": true,
70 "currentlyDamaged": false,
71 "roadworthy": true,
72 "isNew": false,
73 "contact": {
74 "type": "Dealer",
75 "name": "Autohaus Brandl GmbH",
76 "address2": "80331 München",
77 "phones": [
78 "+49 89 5550 101"
79 ],
80 "rating": 4.6
81 },
82 "location": {
83 "city": "80331 München",
84 "postalCode": "80331"
85 },
86 "htmlDescription": "<p>Scheckheftgepflegt, Navi Professional, LED, Anhängerkupplung. Finanzierung möglich.</p>",
87 "priceRating": "FAIR_PRICE"
88 },
89 {
90 "id": "389104002",
91 "url": "https://suchen.mobile.de/fahrzeuge/details.html?id=389104002",
92 "shortTitle": "BMW 320d",
93 "subTitle": "Touring Advantage Aut. Klimaaut.",
94 "make": "BMW",
95 "model": "320d",
96 "price": {
97 "value": 18900,
98 "currency": "EUR",
99 "negotiable": false
100 },
101 "attributes": [
102 {
103 "tag": "mileage",
104 "label": "Mileage",
105 "value": "112,000 km"
106 },
107 {
108 "tag": "firstRegistration",
109 "label": "First registration",
110 "value": "05/2018"
111 },
112 {
113 "tag": "power",
114 "label": "Power",
115 "value": "140 kW (190 hp)"
116 },
117 {
118 "tag": "fuel",
119 "label": "Fuel",
120 "value": "Diesel"
121 },
122 {
123 "tag": "numberOfPreviousOwners",
124 "label": "Number of vehicle owners",
125 "value": "2"
126 },
127 {
128 "tag": "hu",
129 "label": "HU",
130 "value": "03/2027"
131 },
132 {
133 "tag": "category",
134 "label": "Category",
135 "value": "Estate Car"
136 },
137 {
138 "tag": "color",
139 "label": "Colour",
140 "value": "Black"
141 }
142 ],
143 "accidentFree": true,
144 "currentlyDamaged": false,
145 "roadworthy": true,
146 "isNew": false,
147 "contact": {
148 "type": "Dealer",
149 "name": "Autohaus Brandl GmbH",
150 "address2": "80331 München",
151 "phones": [
152 "+49 89 5550 101"
153 ],
154 "rating": 4.6
155 },
156 "location": {
157 "city": "80331 München",
158 "postalCode": "80331"
159 },
160 "htmlDescription": "<p>Automatik, Sitzheizung, PDC. HU/AU neu. Inzahlungnahme möglich.</p>",
161 "priceRating": "FAIR_PRICE"
162 },
163 {
164 "id": "389104003",
165 "url": "https://suchen.mobile.de/fahrzeuge/details.html?id=389104003",
166 "shortTitle": "BMW 320d",
167 "subTitle": "Touring Luxury Line HUD",
168 "make": "BMW",
169 "model": "320d",
170 "price": {
171 "value": 19950,
172 "currency": "EUR",
173 "negotiable": false
174 },
175 "attributes": [
176 {
177 "tag": "mileage",
178 "label": "Mileage",
179 "value": "101,000 km"
180 },
181 {
182 "tag": "firstRegistration",
183 "label": "First registration",
184 "value": "02/2018"
185 },
186 {
187 "tag": "power",
188 "label": "Power",
189 "value": "140 kW (190 hp)"
190 },
191 {
192 "tag": "fuel",
193 "label": "Fuel",
194 "value": "Diesel"
195 },
196 {
197 "tag": "numberOfPreviousOwners",
198 "label": "Number of vehicle owners",
199 "value": "2"
200 },
201 {
202 "tag": "hu",
203 "label": "HU",
204 "value": "03/2027"
205 },
206 {
207 "tag": "category",
208 "label": "Category",
209 "value": "Estate Car"
210 },
211 {
212 "tag": "color",
213 "label": "Colour",
214 "value": "Black"
215 }
216 ],
217 "accidentFree": true,
218 "currentlyDamaged": false,
219 "roadworthy": true,
220 "isNew": false,
221 "contact": {
222 "type": "Dealer",
223 "name": "Kraft Automobile",
224 "address2": "50667 Köln",
225 "phones": [
226 "+49 221 5550 202"
227 ],
228 "rating": 4.6
229 },
230 "location": {
231 "city": "50667 Köln",
232 "postalCode": "80331"
233 },
234 "htmlDescription": "<p>Head-up-Display, Leder, Harman Kardon. Unfallfrei, scheckheftgepflegt.</p>",
235 "priceRating": "FAIR_PRICE"
236 },
237 {
238 "id": "389104004",
239 "url": "https://suchen.mobile.de/fahrzeuge/details.html?id=389104004",
240 "shortTitle": "BMW 320d",
241 "subTitle": "Touring M Sport Panorama",
242 "make": "BMW",
243 "model": "320d",
244 "price": {
245 "value": 20490,
246 "currency": "EUR",
247 "negotiable": false
248 },
249 "attributes": [
250 {
251 "tag": "mileage",
252 "label": "Mileage",
253 "value": "88,000 km"
254 },
255 {
256 "tag": "firstRegistration",
257 "label": "First registration",
258 "value": "09/2018"
259 },
260 {
261 "tag": "power",
262 "label": "Power",
263 "value": "140 kW (190 hp)"
264 },
265 {
266 "tag": "fuel",
267 "label": "Fuel",
268 "value": "Diesel"
269 },
270 {
271 "tag": "numberOfPreviousOwners",
272 "label": "Number of vehicle owners",
273 "value": "2"
274 },
275 {
276 "tag": "hu",
277 "label": "HU",
278 "value": "03/2027"
279 },
280 {
281 "tag": "category",
282 "label": "Category",
283 "value": "Estate Car"
284 },
285 {
286 "tag": "color",
287 "label": "Colour",
288 "value": "Black"
289 }
290 ],
291 "accidentFree": true,
292 "currentlyDamaged": false,
293 "roadworthy": true,
294 "isNew": false,
295 "contact": {
296 "type": "Dealer",
297 "name": "Kraft Automobile",
298 "address2": "50667 Köln",
299 "phones": [
300 "+49 221 5550 202"
301 ],
302 "rating": 4.6
303 },
304 "location": {
305 "city": "50667 Köln",
306 "postalCode": "80331"
307 },
308 "htmlDescription": "<p>M Sportpaket, Panoramadach, 19 Zoll. Garantie 12 Monate.</p>",
309 "priceRating": "INCREASED_PRICE"
310 },
311 {
312 "id": "389104005",
313 "url": "https://suchen.mobile.de/fahrzeuge/details.html?id=389104005",
314 "shortTitle": "BMW 320d",
315 "subTitle": "Touring Aut. AHK Navi",
316 "make": "BMW",
317 "model": "320d",
318 "price": {
319 "value": 18490,
320 "currency": "EUR",
321 "negotiable": false
322 },
323 "attributes": [
324 {
325 "tag": "mileage",
326 "label": "Mileage",
327 "value": "118,000 km"
328 },
329 {
330 "tag": "firstRegistration",
331 "label": "First registration",
332 "value": "01/2018"
333 },
334 {
335 "tag": "power",
336 "label": "Power",
337 "value": "140 kW (190 hp)"
338 },
339 {
340 "tag": "fuel",
341 "label": "Fuel",
342 "value": "Diesel"
343 },
344 {
345 "tag": "numberOfPreviousOwners",
346 "label": "Number of vehicle owners",
347 "value": "2"
348 },
349 {
350 "tag": "hu",
351 "label": "HU",
352 "value": "03/2027"
353 },
354 {
355 "tag": "category",
356 "label": "Category",
357 "value": "Estate Car"
358 },
359 {
360 "tag": "color",
361 "label": "Colour",
362 "value": "Black"
363 }
364 ],
365 "accidentFree": true,
366 "currentlyDamaged": false,
367 "roadworthy": true,
368 "isNew": false,
369 "contact": {
370 "type": "Dealer",
371 "name": "Autohaus Meyer",
372 "address2": "30159 Hannover",
373 "phones": [
374 "+49 511 5550 303"
375 ],
376 "rating": 4.6
377 },
378 "location": {
379 "city": "30159 Hannover",
380 "postalCode": "80331"
381 },
382 "htmlDescription": "<p>Gepflegter Dienstwagen, Navi, Tempomat, AHK. Garantie möglich.</p>",
383 "priceRating": "FAIR_PRICE"
384 },
385 {
386 "id": "389104006",
387 "url": "https://suchen.mobile.de/fahrzeuge/details.html?id=389104006",
388 "shortTitle": "BMW 320d",
389 "subTitle": "Touring Advantage LED Kamera",
390 "make": "BMW",
391 "model": "320d",
392 "price": {
393 "value": 19250,
394 "currency": "EUR",
395 "negotiable": false
396 },
397 "attributes": [
398 {
399 "tag": "mileage",
400 "label": "Mileage",
401 "value": "104,000 km"
402 },
403 {
404 "tag": "firstRegistration",
405 "label": "First registration",
406 "value": "04/2018"
407 },
408 {
409 "tag": "power",
410 "label": "Power",
411 "value": "140 kW (190 hp)"
412 },
413 {
414 "tag": "fuel",
415 "label": "Fuel",
416 "value": "Diesel"
417 },
418 {
419 "tag": "numberOfPreviousOwners",
420 "label": "Number of vehicle owners",
421 "value": "2"
422 },
423 {
424 "tag": "hu",
425 "label": "HU",
426 "value": "03/2027"
427 },
428 {
429 "tag": "category",
430 "label": "Category",
431 "value": "Estate Car"
432 },
433 {
434 "tag": "color",
435 "label": "Colour",
436 "value": "Black"
437 }
438 ],
439 "accidentFree": true,
440 "currentlyDamaged": false,
441 "roadworthy": true,
442 "isNew": false,
443 "contact": {
444 "type": "Dealer",
445 "name": "Autohaus Meyer",
446 "address2": "30159 Hannover",
447 "phones": [
448 "+49 511 5550 303"
449 ],
450 "rating": 4.6
451 },
452 "location": {
453 "city": "30159 Hannover",
454 "postalCode": "80331"
455 },
456 "htmlDescription": "<p>Rückfahrkamera, LED, Sitzheizung vorn. Nichtraucherfahrzeug.</p>",
457 "priceRating": "FAIR_PRICE"
458 },
459 {
460 "id": "389104007",
461 "url": "https://suchen.mobile.de/fahrzeuge/details.html?id=389104007",
462 "shortTitle": "BMW 320d",
463 "subTitle": "Touring Aut. Navi Xenon, Privatverkauf",
464 "make": "BMW",
465 "model": "320d",
466 "price": {
467 "value": 14990,
468 "currency": "EUR",
469 "negotiable": true
470 },
471 "attributes": [
472 {
473 "tag": "mileage",
474 "label": "Mileage",
475 "value": "99,500 km"
476 },
477 {
478 "tag": "firstRegistration",
479 "label": "First registration",
480 "value": "03/2018"
481 },
482 {
483 "tag": "power",
484 "label": "Power",
485 "value": "140 kW (190 hp)"
486 },
487 {
488 "tag": "fuel",
489 "label": "Fuel",
490 "value": "Diesel"
491 },
492 {
493 "tag": "numberOfPreviousOwners",
494 "label": "Number of vehicle owners",
495 "value": "1"
496 },
497 {
498 "tag": "hu",
499 "label": "HU",
500 "value": "03/2027"
501 },
502 {
503 "tag": "category",
504 "label": "Category",
505 "value": "Estate Car"
506 },
507 {
508 "tag": "color",
509 "label": "Colour",
510 "value": "Black"
511 }
512 ],
513 "accidentFree": true,
514 "currentlyDamaged": false,
515 "roadworthy": true,
516 "isNew": false,
517 "contact": {
518 "type": "Private",
519 "name": "Thomas K.",
520 "address2": "85748 Garching",
521 "phones": [
522 "+49 170 5550 404"
523 ],
524 "rating": null
525 },
526 "location": {
527 "city": "85748 Garching",
528 "postalCode": "80331"
529 },
530 "htmlDescription": "<p>Scheckheftgepflegt, 1. Hand, HU neu, neue Bremsen. Privatverkauf, keine Garantie oder Rücknahme. Besichtigung nach Termin.</p>",
531 "priceRating": "VERY_GOOD_PRICE"
532 },
533 {
534 "id": "389104008",
535 "url": "https://suchen.mobile.de/fahrzeuge/details.html?id=389104008",
536 "shortTitle": "BMW 320d",
537 "subTitle": "Touring Sport Line Aut.",
538 "make": "BMW",
539 "model": "320d",
540 "price": {
541 "value": 16490,
542 "currency": "EUR",
543 "negotiable": false
544 },
545 "attributes": [
546 {
547 "tag": "mileage",
548 "label": "Mileage",
549 "value": "107,000 km"
550 },
551 {
552 "tag": "firstRegistration",
553 "label": "First registration",
554 "value": "06/2018"
555 },
556 {
557 "tag": "power",
558 "label": "Power",
559 "value": "140 kW (190 hp)"
560 },
561 {
562 "tag": "fuel",
563 "label": "Fuel",
564 "value": "Diesel"
565 },
566 {
567 "tag": "numberOfPreviousOwners",
568 "label": "Number of vehicle owners",
569 "value": "2"
570 },
571 {
572 "tag": "hu",
573 "label": "HU",
574 "value": "03/2027"
575 },
576 {
577 "tag": "category",
578 "label": "Category",
579 "value": "Estate Car"
580 },
581 {
582 "tag": "color",
583 "label": "Colour",
584 "value": "Black"
585 }
586 ],
587 "accidentFree": true,
588 "currentlyDamaged": false,
589 "roadworthy": true,
590 "isNew": false,
591 "contact": {
592 "type": "Dealer",
593 "name": "Autohaus Schulte",
594 "address2": "44137 Dortmund",
595 "phones": [
596 "+49 231 5550 505"
597 ],
598 "rating": 4.6
599 },
600 "location": {
601 "city": "44137 Dortmund",
602 "postalCode": "80331"
603 },
604 "htmlDescription": "<p>Hinweis: Das Fahrzeug wurde als Mietwagen genutzt. Navi, Klimaautomatik, Tempomat.</p>",
605 "priceRating": "GOOD_PRICE",
606 "priceDropFromLastSeen": 1200
607 },
608 {
609 "id": "389104009",
610 "url": "https://suchen.mobile.de/fahrzeuge/details.html?id=389104009",
611 "shortTitle": "BMW 320d",
612 "subTitle": "Touring Aut. Export Unfallfahrzeug",
613 "make": "BMW",
614 "model": "320d",
615 "price": {
616 "value": 13800,
617 "currency": "EUR",
618 "negotiable": false
619 },
620 "attributes": [
621 {
622 "tag": "mileage",
623 "label": "Mileage",
624 "value": "108,000 km"
625 },
626 {
627 "tag": "firstRegistration",
628 "label": "First registration",
629 "value": "05/2018"
630 },
631 {
632 "tag": "power",
633 "label": "Power",
634 "value": "140 kW (190 hp)"
635 },
636 {
637 "tag": "fuel",
638 "label": "Fuel",
639 "value": "Diesel"
640 },
641 {
642 "tag": "numberOfPreviousOwners",
643 "label": "Number of vehicle owners",
644 "value": "2"
645 },
646 {
647 "tag": "hu",
648 "label": "HU",
649 "value": "abgelaufen"
650 },
651 {
652 "tag": "category",
653 "label": "Category",
654 "value": "Estate Car"
655 },
656 {
657 "tag": "color",
658 "label": "Colour",
659 "value": "Black"
660 }
661 ],
662 "accidentFree": false,
663 "currentlyDamaged": true,
664 "roadworthy": false,
665 "isNew": false,
666 "contact": {
667 "type": "Dealer",
668 "name": "Autohandel Yildiz",
669 "address2": "45127 Essen",
670 "phones": [
671 "+49 201 5550 606"
672 ],
673 "rating": 4.6
674 },
675 "location": {
676 "city": "45127 Essen",
677 "postalCode": "80331"
678 },
679 "htmlDescription": "<p>Unfallschaden hinten rechts, nicht repariert. Nur Export oder Händler. Bastlerfahrzeug, Motor läuft unruhig.</p>",
680 "priceRating": "VERY_GOOD_PRICE"
681 },
682 {
683 "id": "389104010",
684 "url": "https://suchen.mobile.de/fahrzeuge/details.html?id=389104010",
685 "shortTitle": "Audi A4",
686 "subTitle": "Avant 35 TDI S line Matrix-LED",
687 "make": "Audi",
688 "model": "A4",
689 "price": {
690 "value": 28900,
691 "currency": "EUR",
692 "negotiable": false,
693 "net": 24286
694 },
695 "attributes": [
696 {
697 "tag": "mileage",
698 "label": "Mileage",
699 "value": "45,000 km"
700 },
701 {
702 "tag": "firstRegistration",
703 "label": "First registration",
704 "value": "07/2020"
705 },
706 {
707 "tag": "power",
708 "label": "Power",
709 "value": "140 kW (190 hp)"
710 },
711 {
712 "tag": "fuel",
713 "label": "Fuel",
714 "value": "Diesel"
715 },
716 {
717 "tag": "numberOfPreviousOwners",
718 "label": "Number of vehicle owners",
719 "value": "1"
720 },
721 {
722 "tag": "hu",
723 "label": "HU",
724 "value": "03/2027"
725 },
726 {
727 "tag": "category",
728 "label": "Category",
729 "value": "Estate Car"
730 },
731 {
732 "tag": "color",
733 "label": "Colour",
734 "value": "Grey"
735 }
736 ],
737 "accidentFree": true,
738 "currentlyDamaged": false,
739 "roadworthy": true,
740 "isNew": false,
741 "contact": {
742 "type": "Dealer",
743 "name": "Audi Zentrum Süd",
744 "address2": "70173 Stuttgart",
745 "phones": [
746 "+49 711 5550 707"
747 ],
748 "rating": 4.6
749 },
750 "location": {
751 "city": "70173 Stuttgart",
752 "postalCode": "80331"
753 },
754 "htmlDescription": "<p>Sehr gepflegt, Matrix-LED, virtuelles Cockpit, Servicepaket bis 2027.</p>",
755 "priceRating": "GOOD_PRICE",
756 "contactEmail": "verkauf@audi-zentrum-sued.example",
757 "contactWebsite": "https://www.audi-zentrum-sued.example"
758 },
759 {
760 "id": "389104011",
761 "url": "https://suchen.mobile.de/fahrzeuge/details.html?id=389104011",
762 "shortTitle": "VW Golf",
763 "subTitle": "VIII 2.0 TDI Life DSG",
764 "make": "VW",
765 "model": "Golf",
766 "price": {
767 "value": 21900,
768 "currency": "EUR",
769 "negotiable": false
770 },
771 "attributes": [
772 {
773 "tag": "mileage",
774 "label": "Mileage",
775 "value": "38,000 km"
776 },
777 {
778 "tag": "firstRegistration",
779 "label": "First registration",
780 "value": "10/2021"
781 },
782 {
783 "tag": "power",
784 "label": "Power",
785 "value": "110 kW (150 hp)"
786 },
787 {
788 "tag": "fuel",
789 "label": "Fuel",
790 "value": "Diesel"
791 },
792 {
793 "tag": "numberOfPreviousOwners",
794 "label": "Number of vehicle owners",
795 "value": "2"
796 },
797 {
798 "tag": "hu",
799 "label": "HU",
800 "value": "03/2027"
801 },
802 {
803 "tag": "category",
804 "label": "Category",
805 "value": "Small Car"
806 },
807 {
808 "tag": "color",
809 "label": "Colour",
810 "value": "Black"
811 }
812 ],
813 "accidentFree": true,
814 "currentlyDamaged": false,
815 "roadworthy": true,
816 "isNew": false,
817 "contact": {
818 "type": "Dealer",
819 "name": "Autohaus Brandl GmbH",
820 "address2": "80331 München",
821 "phones": [
822 "+49 89 5550 101"
823 ],
824 "rating": 4.6
825 },
826 "location": {
827 "city": "80331 München",
828 "postalCode": "80331"
829 },
830 "htmlDescription": "<p>Garantie bis 2026, Navi, ACC, Spurhalteassistent.</p>"
831 },
832 {
833 "id": "389104012",
834 "url": "https://suchen.mobile.de/fahrzeuge/details.html?id=389104012",
835 "shortTitle": "Skoda Octavia",
836 "subTitle": "Combi 2.0 TDI Style",
837 "make": "Skoda",
838 "model": "Octavia",
839 "price": {
840 "value": 17400,
841 "currency": "EUR",
842 "negotiable": false
843 },
844 "attributes": [
845 {
846 "tag": "mileage",
847 "label": "Mileage",
848 "value": "91,000 km"
849 },
850 {
851 "tag": "firstRegistration",
852 "label": "First registration",
853 "value": "11/2019"
854 },
855 {
856 "tag": "power",
857 "label": "Power",
858 "value": "110 kW (150 hp)"
859 },
860 {
861 "tag": "fuel",
862 "label": "Fuel",
863 "value": "Diesel"
864 },
865 {
866 "tag": "numberOfPreviousOwners",
867 "label": "Number of vehicle owners",
868 "value": "2"
869 },
870 {
871 "tag": "hu",
872 "label": "HU",
873 "value": "abgelaufen"
874 },
875 {
876 "tag": "category",
877 "label": "Category",
878 "value": "Estate Car"
879 },
880 {
881 "tag": "color",
882 "label": "Colour",
883 "value": "Black"
884 }
885 ],
886 "accidentFree": true,
887 "currentlyDamaged": false,
888 "roadworthy": true,
889 "isNew": false,
890 "contact": {
891 "type": "Dealer",
892 "name": "Autohaus Meyer",
893 "address2": "30159 Hannover",
894 "phones": [
895 "+49 511 5550 303"
896 ],
897 "rating": 4.6
898 },
899 "location": {
900 "city": "30159 Hannover",
901 "postalCode": "80331"
902 },
903 "htmlDescription": "<p>Fahrzeug ohne HU, Bremsen müssen gemacht werden.</p>"
904 }
905 ]
906};
907
908
909const run = await client.actor("rich_minds/used-car-deal-finder-ai").call(input);
910
911
912console.log('Results from dataset');
913console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
914const { items } = await client.dataset(run.defaultDatasetId).listItems();
915items.forEach((item) => {
916 console.dir(item);
917});
918
919