1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "data": [
12 {
13 "name": "ABC商店",
14 "price": "1,200",
15 "tags": [
16 "食品",
17 "セール"
18 ],
19 "address": {
20 "pref": "東京都",
21 "city": "千代田区"
22 },
23 "updated": "2026年10月7日"
24 },
25 {
26 "name": "XYZ Store",
27 "price": "980",
28 "tags": [
29 "雑貨"
30 ],
31 "address": {
32 "pref": "大阪府",
33 "city": "大阪市"
34 },
35 "updated": "2026/09/30"
36 },
37 {
38 "name": "ABC商店",
39 "price": "1,200",
40 "tags": [
41 "食品",
42 "セール"
43 ],
44 "address": {
45 "pref": "東京都",
46 "city": "千代田区"
47 },
48 "updated": "2026-10-07"
49 },
50 {
51 "name": "テスト㈱ 😀",
52 "price": "15000",
53 "tags": [],
54 "address": {
55 "pref": "北海道",
56 "city": "札幌市"
57 },
58 "updated": "2026-10-01"
59 }
60 ],
61 "filters": [],
62 "dedupeBy": [
63 "name"
64 ],
65 "renameFields": {
66 "address.pref": "都道府県"
67 },
68 "outputFormats": [
69 "xlsx",
70 "csv-excel"
71 ]
72};
73
74
75const run = await client.actor("masahishop/dataset-cleaner").call(input);
76
77
78console.log('Results from dataset');
79console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
80const { items } = await client.dataset(run.defaultDatasetId).listItems();
81items.forEach((item) => {
82 console.dir(item);
83});
84
85