1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "input": [
12 {
13 "url": "https://www.tiktok.com/@MS4wLjABAAAAxDhA8QWkQ9XuHvP1CM7gRYovEReyVffxZHVL3fpqrMklzsKs7_us19HM9L9jQXzm/video/7346600892520467717",
14 "inputId": "bd85891d-8d55-cc56-e4c7-a9427007ec34"
15 },
16 {
17 "url": "https://www.tiktok.com/@MS4wLjABAAAA07z5ITZ_LmPz_J8EH7e5yCw9rL1lPUr7r7mF_VG71lvMpyu_og58145T1qKcqiL1/video/7325262360225041665",
18 "inputId": "f58a7ca0-5766-0089-8af9-f193b227c51b"
19 }
20 ]
21};
22
23
24const run = await client.actor("insiteco/social-insight-scraper").call(input);
25
26
27console.log('Results from dataset');
28console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
29const { items } = await client.dataset(run.defaultDatasetId).listItems();
30items.forEach((item) => {
31 console.dir(item);
32});
33
34