1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "proxyConfiguration": {
12 "useApifyProxy": true
13 },
14 "url": "https://www.copartmea.com/lotSearchResults?free=false&displayStr=Vehicles%20Under%207.5%20Tonnes,%5B0%20TO%209999999%5D,%5B2017%20TO%202027%5D&from=%2FvehicleFinder&fromSource=widget&qId=b5df7d38-16d5-4d90-948c-70d35e9352d6-1779093223350&searchCriteria=%7B%22query%22:%5B%22*%22%5D,%22filter%22:%7B%22ODM%22:%5B%22odometer_reading_received:%5B0%20TO%209999999%5D%22%5D,%22YEAR%22:%5B%22lot_year:%5B2017%20TO%202027%5D%22%5D,%22VEHT%22:%5B%22vehicle_type_code:VEHTYPE_V%22%5D,%22LOC%22:%5B%22yard_name:%5C%22Kizad%20-%20Abu%20Dhabi%5C%22%22%5D%7D,%22searchName%22:%22%22,%22watchListOnly%22:false,%22freeFormSearch%22:false%7D",
15 "maxItems": 7
16};
17
18
19const run = await client.actor("sargis_aleksanyan/copart-middle-east").call(input);
20
21
22console.log('Results from dataset');
23console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
24const { items } = await client.dataset(run.defaultDatasetId).listItems();
25items.forEach((item) => {
26 console.dir(item);
27});
28
29