1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "items": [
12 {
13 "success": true,
14 "query_phrase": "star wars",
15 "trademark_wordmark": "star wars",
16 "serial_number": 73149856,
17 "status": "LIVE",
18 "filing_date": "1977-11-25",
19 "registration_date": "1979-10-30",
20 "classes": "25",
21 "__source": {
22 "actor": "dev00/uspto-trademark-api",
23 "actorId": "nhSY7qeLJUsvkXQTH",
24 "runId": "1UQYwy4rLd96omF0V",
25 "datasetId": "bV1vfVZVsUCA3PT1R",
26 "sampleRowIndex": 0,
27 "projection": "Public business-record fields only; observed values unchanged. Added __source is provenance, not upstream payload."
28 }
29 },
30 {
31 "success": true,
32 "query_phrase": "star wars",
33 "trademark_wordmark": "star wars",
34 "serial_number": 73487823,
35 "status": "LIVE",
36 "filing_date": "1984-06-29",
37 "registration_date": "1985-11-19",
38 "classes": "25",
39 "__source": {
40 "actor": "dev00/uspto-trademark-api",
41 "actorId": "nhSY7qeLJUsvkXQTH",
42 "runId": "1UQYwy4rLd96omF0V",
43 "datasetId": "bV1vfVZVsUCA3PT1R",
44 "sampleRowIndex": 1,
45 "projection": "Public business-record fields only; observed values unchanged. Added __source is provenance, not upstream payload."
46 }
47 },
48 {
49 "success": true,
50 "query_phrase": "star wars",
51 "trademark_wordmark": "star wars",
52 "serial_number": 75306994,
53 "status": "LIVE",
54 "filing_date": "1997-06-11",
55 "registration_date": "2002-01-29",
56 "classes": "25",
57 "__source": {
58 "actor": "dev00/uspto-trademark-api",
59 "actorId": "nhSY7qeLJUsvkXQTH",
60 "runId": "1UQYwy4rLd96omF0V",
61 "datasetId": "bV1vfVZVsUCA3PT1R",
62 "sampleRowIndex": 2,
63 "projection": "Public business-record fields only; observed values unchanged. Added __source is provenance, not upstream payload."
64 }
65 }
66 ]
67};
68
69
70const run = await client.actor("zinin/trademark-class-overlap-review").call(input);
71
72
73console.log('Results from dataset');
74console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
75const { items } = await client.dataset(run.defaultDatasetId).listItems();
76items.forEach((item) => {
77 console.dir(item);
78});
79
80