1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "providedRecords": [
12 {
13 "title": "Owned demonstration article about product research",
14 "url": "https://example.com/owned-article/1",
15 "source": "curatedRss",
16 "summary": "This customer-authored example illustrates a supplied article record, not a live trend score.",
17 "itemType": "content_opportunity",
18 "canonicalUrl": "https://example.com/owned-article/1",
19 "sourceName": "Owned demonstration feed",
20 "discoveredAt": "2026-10-01T00:00:00Z",
21 "trendScore": 0,
22 "scoreVersion": "v1",
23 "scoreComponents": {
24 "recency": 0,
25 "engagementPercentile": null,
26 "engagementAvailable": false,
27 "engagementValue": null
28 },
29 "matchedQuery": "owned demonstration",
30 "dedupeKey": "owned-demonstration-content-1",
31 "contributingSources": [
32 "curatedRss"
33 ]
34 }
35 ],
36 "sources": [
37 "googleNews"
38 ]
39};
40
41
42const run = await client.actor("thescrapelab/content-opportunity-intelligence").call(input);
43
44
45console.log('Results from dataset');
46console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
47const { items } = await client.dataset(run.defaultDatasetId).listItems();
48items.forEach((item) => {
49 console.dir(item);
50});
51
52