1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "records": [
12 {
13 "title": "Best wireless headphones 2024",
14 "body": "These wireless headphones deliver excellent sound quality and battery life for the price."
15 },
16 {
17 "title": "Best wireless headphones 2024",
18 "body": "These wireless headphones deliver excellent sound quality and battery life for the price."
19 },
20 {
21 "title": "Best wireless headphones of 2024",
22 "body": "These wireless headphones deliver great sound quality and long battery life for the price."
23 },
24 {
25 "title": "Top budget laptops this year",
26 "body": "A roundup of the best budget laptops you can buy right now, covering performance and battery."
27 }
28 ]
29};
30
31
32const run = await client.actor("that_red_bird/dataset-deduplicator").call(input);
33
34
35console.log('Results from dataset');
36console.log(`πΎ Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
37const { items } = await client.dataset(run.defaultDatasetId).listItems();
38items.forEach((item) => {
39 console.dir(item);
40});
41
42