1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "topics": [
12 {
13 "id": "section-301",
14 "name": "Section 301 China Tariffs",
15 "watchTerms": "section 301,chapter 99,additional duties",
16 "useUstrContext": true,
17 "federalRegister": {
18 "agencySlug": "trade-representative-office-of-united-states",
19 "documentTypes": "NOTICE",
20 "keywords": "tariff"
21 },
22 "hts": {
23 "searchTerm": "9903.88",
24 "htsCodes": "9903.88.01,9903.88.03,9903.88.05",
25 "maxMatches": 10
26 }
27 }
28 ]
29};
30
31
32const run = await client.actor("taroyamada/tariff-trade-change-digest").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