1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "documents": [
12 {
13 "id": "risky-assembly",
14 "claimed_origin": "Vietnam",
15 "target_hts": "8544.42",
16 "text": "Product: finished wire harness. Components: copper wire (origin: China); plastic connectors (origin: China); terminals (origin: China). Processing: the Chinese components are assembled in Vietnam by simple assembly (crimping and plugging), then repackaged and relabeled as Made in Vietnam before export to the United States. Country of shipment: Vietnam."
17 },
18 {
19 "id": "genuine-transformation",
20 "claimed_origin": "Mexico",
21 "text": "Product: injection-molded automotive housing. Components: polypropylene resin (origin: South Korea). Processing: in Mexico the resin is injection molded, machined, and assembled into a new finished housing with a different name, character and use. Bill of materials with country of origin attached; manufacturing process flow chart and value-added cost breakdown on file; HTS classification of input and finished good documented."
22 }
23 ]
24};
25
26
27const run = await client.actor("jadelike_zine/origin-transshipment-risk-checker").call(input);
28
29
30console.log('Results from dataset');
31console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
32const { items } = await client.dataset(run.defaultDatasetId).listItems();
33items.forEach((item) => {
34 console.dir(item);
35});
36
37